numbers

Provision a new phone number from the account's configured SMS provider (or an iMessage line with type=imessage). Optional externalId tags the number with your own identifier; see PATCH /v1/numbers/{id}.

post/v1/numbers

Request

  • Base URL
    https://api.agentphone.ai
  • URL
    https://api.agentphone.ai/v1/numbers
  • Auth
    HTTP bearer

Request body

countrystring
areaCodestring nullable
agentIdstring nullable
externalIdstring nullable
type'sms' | 'imessage' nullable
imessageType'inbound' | 'outbound' nullable
expiresAtstring date-time nullable

Response

Successful Response

idstring required
phoneNumberstring required
countrystring required
statusstring required
typestring
agentIdstring nullable
outboundSms'enabled' | 'activating' | 'registration_required'
inboundCallsEnabledboolean
readReceiptsEnabledboolean
whatsappEnabledboolean
externalIdstring nullable
rcsFallbackForAliasstring nullable
expiresAtstring nullable
createdAtstring date-time required
purchasedAtstring date-time nullable
renewsAtstring nullable

Scheduled renewal of this number's monthly fee, ISO 8601 UTC. Null when no renewal is scheduled or its date is not known.

Changes