---
title: "Buy Number"
method: POST
path: "/api/channels/twilio/numbers/buy"
tags: ["channels", "channels", "twilio-voice"]
---

# Buy Number

`POST /api/channels/twilio/numbers/buy`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/channels/twilio/numbers/buy`
- Auth: none declared

Purchase a Twilio number and point its Voice webhook at our gateway.

Sets VoiceUrl on the new IncomingPhoneNumber so the user can immediately
receive calls once they finish /setup. Accepts either raw creds (manual
paste path) or `account_id` (Connect resume path).

## Request body

- TwilioBuyRequest: Request body for purchasing a Twilio phone number.
  - `twilio_account_sid` string, nullable
  - `twilio_auth_token` string, nullable
  - `account_id` integer, nullable
  - `phone_number` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/d84e7dc9977d?raw)
