Sign inGet started

Buy a Number

POST
/workspaces/{workspaceId}/numbers-long-code
Assigns Long Code Numbers to the current workspace, charging the wallet for their subscription price. When creating LCNs as a User, all specified Number Stock Items should be reserved.
Payload permintaan
numberStockItemIds
array of string
wajib
The unique identifiers of the numbers you want to buy. You can buy up to 25 numbers at a time. This operation will incur wallet charges for the numbers. Before buying the number, you must reserve it.
Payload respons
results
array of object
wajib
Tampilkan atribut turunan
results.id
string
wajib
The unique identifier of the long code number. The endpoint ID is the same.
results.endpointId
string
wajib
The unique identifier of the endpoint. The long conde ID is the same.
results.numberString
string
wajib
The phone number in E.164 format.
results.countryCode
string
wajib
The country code in ISO 3166-1 alpha-2 format.
results.type
string
The type of long code number.
Possible values: local, national, toll-free, mobile
results.capabilities
object
wajib
Capabilities of the phone number. It shows if the phone number supports voice, sms and/or mms.
Tampilkan atribut turunan
results.capabilities.voice
object
wajib
Tampilkan atribut turunan
results.capabilities.voice.inbound
boolean
wajib
Whether the number supports inbound use cases.
results.capabilities.voice.outbound
boolean
wajib
Whether the number supports outbound use cases.
results.capabilities.sms
object
wajib
Tampilkan atribut turunan
results.capabilities.sms.inbound
boolean
wajib
Whether the number supports inbound use cases.
results.capabilities.sms.outbound
boolean
wajib
Whether the number supports outbound use cases.
results.capabilities.mms
object
wajib
Tampilkan atribut turunan
results.capabilities.mms.inbound
boolean
wajib
Whether the number supports inbound use cases.
results.capabilities.mms.outbound
boolean
wajib
Whether the number supports outbound use cases.
results.capabilities.whatsapp
object
Tampilkan atribut turunan
results.capabilities.whatsapp.inbound
boolean
wajib
Whether the number supports inbound use cases.
results.capabilities.whatsapp.outbound
boolean
wajib
Whether the number supports outbound use cases.
results.createdAt
string
wajib
results.updatedAt
string
wajib
results.order
object
The order that created this long code number. It contains information such as the capabilities, order status and type.
Tampilkan atribut turunan
results.order.countryCode
string
wajib
The country code in ISO 3166-1 alpha-2 format.
results.order.type
string
wajib
The type of long code number.
Possible values: local, national, toll-free, mobile
results.order.capabilities
array of string
wajib
results.order.prefix
string
results.order.status
string
wajib
Possible values: draft, submitted, processing, fulfilled, rejected, cancelled
results.order.createdAt
string
wajib
results.order.updatedAt
string
wajib
results.deprovisionAt
string
The date and time when the long code number should be deprovisioned.
results.endpoint
object
wajib
A representation of an endpoint. It contains details such as the capabilities, dependencies, and more.
Tampilkan atribut turunan
results.endpoint.id
string
wajib
The ID of the endpoint.
results.endpoint.type
string
wajib
The type of the endpoint. It can be a long code number, short code number, alpha number, ip pool, or rcs google agent.
Possible values: long-code-number, short-code-number, alpha-number, ip-pool, rcs-google-agent
results.endpoint.instanceId
string
wajib
The unique identifier of the instance.
results.endpoint.name
string
wajib
The name of the endpoint. For some cases it will be the number in international format as string.
results.endpoint.capabilities
array of object
wajib
Tampilkan atribut turunan
results.endpoint.capabilities.name
string
wajib
Possible values: sms
results.endpoint.capabilities.inbound
object
Tampilkan atribut turunan
results.endpoint.capabilities.inbound.status
string
wajib
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.inbound.issues
array of string
results.endpoint.capabilities.outbound
object
Tampilkan atribut turunan
results.endpoint.capabilities.outbound.status
string
wajib
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.outbound.destinationStatuses
object
Tampilkan atribut turunan
results.endpoint.capabilities.outbound.destinationStatuses.active
number
results.endpoint.capabilities.outbound.destinationStatuses.inactive
number
results.endpoint.capabilities.outbound.destinationStatuses.available
number
results.endpoint.capabilities.outbound.destinationStatuses.unavailable
number
results.endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
results.endpoint.capabilities.outbound.issues
array of string
results.endpoint.dependencies
array of object
The dependencies of the endpoint. It shows the connectors that the endpoint is connected to.
Tampilkan atribut turunan
results.endpoint.dependencies.type
string
Possible values: connector
results.endpoint.dependencies.connectorId
string
wajib
results.endpoint.dependencies.connectorTemplateRef
string
wajib
results.endpoint.dependencies.capabilities
array of string
results.endpoint.issues
array of string
results.endpoint.provisioningStatus
string
wajib
Possible values: provisioned, provisioning, deprovisioned, deprovisioning
results.endpoint.whatsApp
object
WhatsApp pre-verification details for this endpoint, if applicable. Only present for long code numbers from WhatsApp-capable providers.
Tampilkan atribut turunan
results.endpoint.whatsApp.whatsAppId
string
results.endpoint.whatsApp.status
string
WhatsApp number status
Possible values: unknown, already-exists, installed, verified, not-verified, expired
results.endpoint.whatsApp.stage
string
results.endpoint.whatsApp.attempt
integer
results.endpoint.whatsApp.nextAttemptAt
string
results.endpoint.whatsApp.verificationExpiresAt
string
results.endpoint.whatsApp.requestedCodeAt
string
results.endpoint.whatsApp.createdAt
string
results.endpoint.whatsApp.updatedAt
string
results.endpoint.createdAt
string
wajib
results.endpoint.updatedAt
string
wajib
Contoh kode
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/numbers-long-code' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'