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

# Configure a Twilio number's webhook

> Point an imported Twilio number's voice webhook and status callback at Verbeo, inside your own Twilio account.

Sets the voice webhook and the status callback of a [number imported from Twilio](/api-reference/phone-numbers/import-twilio) to Verbeo's, using the Twilio credentials stored with the number. Until this has run, calls to the number do not reach Verbeo.

Run it once after the import, and again whenever the number's webhook has been changed in the Twilio console — a number pointed elsewhere silently stops reaching your assistant.

It applies to a number whose `provider` is `twilio`. A SIP-trunk number has no Twilio webhook: its calls are routed by the trunk.

## Path parameters

<ParamField path="id" type="string" required>
  UUID of the phone number.
</ParamField>

## Request

The request has no body.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.verbeo.ai/v1/phone-number/7d9f3b52-4c1e-4a8e-9b1a-2f6c0d4e8a11/twilio-webhook" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const id = "7d9f3b52-4c1e-4a8e-9b1a-2f6c0d4e8a11";
  const res = await fetch(`https://api.verbeo.ai/v1/phone-number/${id}/twilio-webhook`, {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.VERBEO_API_KEY}` },
  });
  const { data: webhook } = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  number_id = "7d9f3b52-4c1e-4a8e-9b1a-2f6c0d4e8a11"
  webhook = requests.post(
      f"https://api.verbeo.ai/v1/phone-number/{number_id}/twilio-webhook",
      headers={"Authorization": f"Bearer {os.environ['VERBEO_API_KEY']}"},
  ).json()["data"]
  ```
</CodeGroup>

## Response

`200 OK` with the two URLs the number now points at.

```json theme={null}
{
  "success": true,
  "data": {
    "voice_url": "https://…/functions/v1/twilio-webhook-inbound",
    "status_callback_url": "https://…/functions/v1/twilio-call-status"
  }
}
```

<ResponseField name="voice_url" type="string" required>
  Where Twilio now sends the number's incoming calls.
</ResponseField>

<ResponseField name="status_callback_url" type="string" required>
  Where Twilio now reports each call's status.
</ResponseField>

## Errors

| Code | Status | When |
| - | - | - |
| `VALIDATION_FAILED` | 422 | The number was not imported from Twilio; it has no stored credentials; Twilio rejected the Account SID or Auth Token; or the number is not in that Twilio account. The message says which. |
| `NOT_FOUND` | 404 | No such phone number, or it belongs to another workspace. |
| `BAD_GATEWAY` | 502 | Twilio could not be reached, or answered with an error of its own. The message carries its status. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.