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