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