> ## Documentation Index
> Fetch the complete documentation index at: https://help.avoca.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Speed-to-Lead Pause Webhook

> Pause AI outreach for a specific lead that booked or closed outside Avoca

## Overview

The Speed-to-Lead pause webhook lets you stop AI outreach for a specific lead you previously sent through the [intake webhook](/api-reference/webhooks/lead-intake) — for example, the lead booked or was closed out in your own system. It targets one lead's active campaign enrollment; it does not touch any other lead.

Two endpoints, mirroring the intake webhook's own pattern:

```
POST https://api.prod.avoca.ai/api/outbound/speed-to-lead/pause
POST https://api.prod.avoca.ai/api/outbound/speed-to-lead/pause/<source_key>
```

If you were given a dedicated source URL when your integration was set up, use that (the URL identifies your team; `team_id` isn't needed in the body). Otherwise use the bare endpoint and include `team_id`.

## Authentication

Same as the intake webhook — authenticate with either header:

```bash theme={null}
Authorization: Bearer $AVOCA_API_KEY
# or
X-API-Key: $AVOCA_API_KEY
```

See [Authentication](/api-reference/webhooks/lead-intake#authentication) for how your key is issued. There is no documented rate limit on this endpoint.

## Request

| Field          | Type    | Required                  | Description                                                                                                                                                           |
| -------------- | ------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `phone_number` | string  | **Yes**                   | The lead's phone number. Any common US format is accepted. Must be the same lead you're targeting — see [Identity and matching](#identity-and-matching).              |
| `external_id`  | string  | **Yes**                   | Your reference id for this lead, exactly as originally sent to the intake webhook.                                                                                    |
| `team_id`      | integer | Only on the bare endpoint | The numeric id of the team this lead belongs to. Not accepted on the source-key endpoint — sending it there has no effect, since the URL already identifies the team. |

```bash theme={null}
# Using your dedicated source URL
curl -X POST https://api.prod.avoca.ai/api/outbound/speed-to-lead/pause/<source_key> \
  -H "Authorization: Bearer $AVOCA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "(555) 123-4567",
    "external_id": "form-8812"
  }'
```

```bash theme={null}
# Using the bare endpoint (portfolio/enterprise callers naming their own team)
curl -X POST https://api.prod.avoca.ai/api/outbound/speed-to-lead/pause \
  -H "Authorization: Bearer $AVOCA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "team_id": 123,
    "phone_number": "(555) 123-4567",
    "external_id": "form-8812"
  }'
```

## Response

### Success (`200 OK`)

```json theme={null}
{
  "success": true,
  "data": {
    "paused": true,
    "workflow_campaign_audience_ids": [900]
  },
  "request_id": "3f1a9c2e-6b7d-4e2a-9c3f-8d5b1a2e4f6c"
}
```

| Field                                 | Type          | Always present | Description                                                                                                                                                                                              |
| ------------------------------------- | ------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `success`                             | boolean       | Yes            | `true` for every `200` response.                                                                                                                                                                         |
| `data.paused`                         | boolean       | Yes            | `true` if an active enrollment was found and paused; `false` if the lead exists but had nothing active to pause (already paused, already completed, or never enrolled). Always present, even on `false`. |
| `data.workflow_campaign_audience_ids` | integer\[]    | Yes            | Internal enrollment ids that were paused. Empty array (not omitted) when `paused` is `false`. Informational only — there's no corresponding "resume by id" call.                                         |
| `request_id`                          | string (UUID) | Yes            | Correlates this request with Avoca-side logs if you need to escalate an issue.                                                                                                                           |

<Accordion title="Example: nothing to pause">
  ```json theme={null}
  {
    "success": true,
    "data": { "paused": false, "workflow_campaign_audience_ids": [] },
    "request_id": "7c2e4a1b-9d3f-4a6c-8e1b-2f5d9a7c3e6b"
  }
  ```

  This is not an error. It means the lead exists but has no active enrollment right now — it may already be paused, already finished its campaign, or was never enrolled in the first place.
</Accordion>

### Errors

| Status | Body shape                                                              | Meaning                                                                                                                                                                                     |
| ------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400    | `{ "success": false, "error": string, "request_id": string }`           | Missing/invalid `phone_number` or `external_id`; an unparseable `phone_number`; missing or invalid `team_id` on the bare endpoint; or an unrecognized source key on the source-key endpoint |
| 401    | `{ "success": false, "error": string, "request_id": string }`           | Missing or invalid API key                                                                                                                                                                  |
| 403    | `{ "success": false, "error": string, "request_id": string }`           | `team_id` in the body is outside the scope your API key is allowed to act on                                                                                                                |
| 404    | `{ "success": false, "error": "Lead not found", "request_id": string }` | No lead matches `phone_number` + `external_id` for the resolved team                                                                                                                        |
| 500    | `{ "success": false, "error": string, "request_id": string }`           | Unexpected server-side failure                                                                                                                                                              |

## Identity and Matching

This endpoint targets the exact same lead identity the intake webhook uses to [merge repeat deliveries](/api-reference/webhooks/lead-intake#duplicate-and-repeat-deliveries): `team + phone_number + external_id`. There's no fuzzy or partial lookup — send the same `phone_number` and `external_id` you originally sent for this lead. A different `external_id` for the same phone number is a different, unrelated lead as far as Avoca is concerned, and this call won't affect it.

## No Resume Endpoint

Pausing here is one-directional. To re-enable outreach for the same inquiry, re-POST it to the [intake webhook](/api-reference/webhooks/lead-intake) with `bypass_deduplication: true` — this forces a fresh enrollment even though the phone number and `external_id` are unchanged. A genuinely new inquiry (a new `external_id`) was never affected by this pause and enrolls normally on its own.
