Trillet AI logo

Purchase Phone Number

Purchase a phone number for your workspace.

POSThttps://api.trillet.ai/v1/api/twilio/purchase-number

Headers

x-api-keystringrequired

API key used for authenticating requests to the API.

x-workspace-idstringrequired

Workspace identifier for the API.

Request Body

countrystringrequired

Country code for the phone number (e.g., "US", "CA").

typestringrequired

Type of phone number. Options: "local", "tollFree", "mobile".

phoneNumberstringrequired

The specific phone number to purchase in E.164 format.

addressSidstring

Address SID for regulatory compliance (required for some countries).

couponstring

Coupon code for a discount.

Response Fields

successboolean

Whether the purchase was successful.

phoneNumberobject

The purchased phone number details.

_idstring

Unique identifier for the phone number record.

phoneNumberstring

The purchased phone number in E.164 format.

countrystring

Country code.

typestring

Phone number type.

{
  "success": true,
  "phoneNumber": {
    "_id": "665a1b2c3d4e5f6a7b8c9d0e",
    "phoneNumber": "+14155551234",
    "country": "US",
    "type": "local",
    "status": "active",
    "workspaceId": "664a1b2c3d4e5f6a7b8c9d0e"
  }
}