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.
Treść żądania
numberStockItemIds
array of string
wymagane
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.
Treść odpowiedzi
results
array of object
wymagane
Pokaż atrybuty podrzędne
results.id
string
wymagane
The unique identifier of the long code number. The endpoint ID is the same.
results.endpointId
string
wymagane
The unique identifier of the endpoint. The long conde ID is the same.
results.numberString
string
wymagane
The phone number in E.164 format.
results.countryCode
string
wymagane
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
wymagane
Capabilities of the phone number. It shows if the phone number supports voice, sms and/or mms.
Pokaż atrybuty podrzędne
results.capabilities.voice
object
wymagane
Pokaż atrybuty podrzędne
results.capabilities.voice.inbound
boolean
wymagane
Whether the number supports inbound use cases.
results.capabilities.voice.outbound
boolean
wymagane
Whether the number supports outbound use cases.
results.capabilities.sms
object
wymagane
Pokaż atrybuty podrzędne
results.capabilities.sms.inbound
boolean
wymagane
Whether the number supports inbound use cases.
results.capabilities.sms.outbound
boolean
wymagane
Whether the number supports outbound use cases.
results.capabilities.mms
object
wymagane
Pokaż atrybuty podrzędne
results.capabilities.mms.inbound
boolean
wymagane
Whether the number supports inbound use cases.
results.capabilities.mms.outbound
boolean
wymagane
Whether the number supports outbound use cases.
results.capabilities.whatsapp
object
Pokaż atrybuty podrzędne
results.capabilities.whatsapp.inbound
boolean
wymagane
Whether the number supports inbound use cases.
results.capabilities.whatsapp.outbound
boolean
wymagane
Whether the number supports outbound use cases.
results.createdAt
string
wymagane
results.updatedAt
string
wymagane
results.order
object
The order that created this long code number. It contains information such as the capabilities, order status and type.
Pokaż atrybuty podrzędne
results.order.countryCode
string
wymagane
The country code in ISO 3166-1 alpha-2 format.
results.order.type
string
wymagane
The type of long code number.
Possible values: local, national, toll-free, mobile
results.order.capabilities
array of string
wymagane
results.order.prefix
string
results.order.status
string
wymagane
Possible values: draft, submitted, processing, fulfilled, rejected, cancelled
results.order.createdAt
string
wymagane
results.order.updatedAt
string
wymagane
results.deprovisionAt
string
The date and time when the long code number should be deprovisioned.
results.endpoint
object
wymagane
A representation of an endpoint. It contains details such as the capabilities, dependencies, and more.
Pokaż atrybuty podrzędne
results.endpoint.id
string
wymagane
The ID of the endpoint.
results.endpoint.type
string
wymagane
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
wymagane
The unique identifier of the instance.
results.endpoint.name
string
wymagane
The name of the endpoint. For some cases it will be the number in international format as string.
results.endpoint.capabilities
array of object
wymagane
Pokaż atrybuty podrzędne
results.endpoint.capabilities.name
string
wymagane
Possible values: sms
results.endpoint.capabilities.inbound
object
Pokaż atrybuty podrzędne
results.endpoint.capabilities.inbound.status
string
wymagane
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.inbound.issues
array of string
results.endpoint.capabilities.outbound
object
Pokaż atrybuty podrzędne
results.endpoint.capabilities.outbound.status
string
wymagane
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.outbound.destinationStatuses
object
Pokaż atrybuty podrzędne
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.
Pokaż atrybuty podrzędne
results.endpoint.dependencies.type
string
Possible values: connector
results.endpoint.dependencies.connectorId
string
wymagane
results.endpoint.dependencies.connectorTemplateRef
string
wymagane
results.endpoint.dependencies.capabilities
array of string
results.endpoint.issues
array of string
results.endpoint.provisioningStatus
string
wymagane
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.
Pokaż atrybuty podrzędne
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
wymagane
results.endpoint.updatedAt
string
wymagane
Przykład kodu
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/numbers-long-code' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'