Long Code Numbers
Last updated
Was this helpful?
Last updated
Was this helpful?
The current concept of Number
represents the so-called Long Code Number
. Long Code Number always relates to the Number
purchased or ordered from the Inventory. This is any number, that has a country prefix at the beginning. The term Number
is renamed to LongCodeNumber.
The following API requests can only be made using a valid access key, and attached to an access role, with an access policy that at least specifies the permissions to the resources outlined in each section below. Learn more about API access.
In order to retrieve a list of long code numbers available in your workspace you can use this request.
curl "https://api.bird.com/workspaces/{workpaceId}/numbers-long-code/"
-H 'Authorization: Bearer '
{
"results": [
{
"id": "uuid",
"numberString": "string",
"countryCode": "string",
"type": "local|mobile|toll-free|national",
"capabilities": {
"voice": {
"inbound": true,
"outbound": true
},
"sms": {
"inbound": true,
"outbound": false
},
"mms": {
"inbound": false,
"outbound": true
}
},
"endpointId": "uuid",
"createdAt": "2023-10-20T10:27:22.489-03:00",
"updatedAt": "2023-10-20T10:27:22.489-03:00",
"endpoint": {
"id": "uuid",
"type": "long-code-number",
"instanceId": "uuid",
"name": "string",
"createdAt": "2023-10-20T10:27:22.489-03:00",
"updatedAt": "2023-10-20T10:27:22.489-03:00",
"capabilities": [
{
"name": "voice",
"inbound": {
"status": "inactive",
"subscriptions": [
"main"
]
},
"outbound": {
"status": "inactive",
"subscriptions": [
"main"
],
"destinationStatuses": {
"inactive": 249
}
}
},
{
"name": "sms",
"inbound": {
"status": "inactive",
"subscriptions": [
"main"
]
},
"outbound": null
},
{
"name": "mms",
"inbound": null,
"outbound": {
"status": "inactive",
"subscriptions": [
"main"
],
"destinationStatuses": {
"inactive": 249
}
}
}
]
}
},
{
"id": "uuid",
"numberString": "string",
"countryCode": "string",
"type": "local|mobile|toll-free|national",
"capabilities": {
"voice": {
"inbound": true,
"outbound": true
},
"sms": {
"inbound": true,
"outbound": false
},
"mms": {
"inbound": false,
"outbound": true
}
},
"endpointId": "uuid",
"createdAt": "2023-10-20T10:27:22.469-03:00",
"updatedAt": "2023-10-20T10:27:22.469-03:00",
"endpoint": {
"id": "uuid",
"type": "long-code-number",
"instanceId": "uuid",
"name": "sting",
"createdAt": "2023-10-20T10:27:22.469-03:00",
"updatedAt": "2023-10-20T10:27:22.469-03:00",
"capabilities": [
{
"name": "voice",
"inbound": {
"status": "inactive",
"subscriptions": [
"main"
]
},
"outbound": {
"status": "inactive",
"subscriptions": [
"main"
],
"destinationStatuses": {
"inactive": 249
}
}
},
{
"name": "sms",
"inbound": {
"status": "inactive",
"subscriptions": [
"main"
]
},
"outbound": null
},
{
"name": "mms",
"inbound": null,
"outbound": {
"status": "inactive",
"subscriptions": [
"main"
],
"destinationStatuses": {
"inactive": 249
}
}
}
]
}
}
]
}
In order to retrieve the details of a long code number available in your workspace you can use this request.
curl "https://api.bird.com/workspaces/{workspaceId}/numbers-long-code/{longCodeId}" \
-H 'Authorization: Bearer <your-access-key>'
{
"id": "uuid",
"numberString": "string",
"countryCode": "string",
"type": "local|mobile|toll-free|national",
"capabilities": {
"voice": {
"inbound": true,
"outbound": true
},
"sms": {
"inbound": true,
"outbound": false
},
"mms": {
"inbound": false,
"outbound": true
}
},
"endpointId": "uuid",
"createdAt": "2023-10-20T10:27:22.469-03:00",
"updatedAt": "2023-10-20T10:27:22.469-03:00",
"endpoint": {
"id": "uuid",
"type": "long-code-number",
"instanceId": "uuid",
"name": "sting",
"createdAt": "2023-10-20T10:27:22.469-03:00",
"updatedAt": "2023-10-20T10:27:22.469-03:00",
"capabilities": [
{
"name": "voice",
"inbound": {
"status": "inactive",
"subscriptions": [
"main"
]
},
"outbound": {
"status": "inactive",
"subscriptions": [
"main"
],
"destinationStatuses": {
"inactive": 249
}
}
},
{
"name": "sms",
"inbound": {
"status": "inactive",
"subscriptions": [
"main"
]
},
"outbound": null
},
{
"name": "mms",
"inbound": null,
"outbound": {
"status": "inactive",
"subscriptions": [
"main"
],
"destinationStatuses": {
"inactive": 249
}
}
}
]
}
}
/workspaces/{workspaceId}/numbers-long-code
Limits the number of results to return
Pagination token that keeps of track of the current position in the list
Order in which to retrieve the results
curl -L \
--url '/workspaces/{workspaceId}/numbers-long-code' \
--header 'Authorization: Bearer jwt'
{
"nextPageToken": "text",
"results": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"endpointId": "123e4567-e89b-12d3-a456-426614174000",
"numberString": "text",
"countryCode": "text",
"type": "local",
"capabilities": {
"voice": {
"inbound": true,
"outbound": true
},
"sms": {
"inbound": true,
"outbound": true
},
"mms": {
"inbound": true,
"outbound": true
}
},
"createdAt": "2025-02-21T18:24:06.225Z",
"updatedAt": "2025-02-21T18:24:06.225Z",
"order": {
"countryCode": "text",
"type": "local",
"prefix": "text",
"status": "draft",
"createdAt": "2025-02-21T18:24:06.225Z",
"updatedAt": "2025-02-21T18:24:06.225Z",
"capabilities": [
"voice"
]
},
"deprovisionAt": "2025-02-21T18:24:06.225Z",
"endpoint": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "long-code-number",
"instanceId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"provisioningStatus": "provisioned",
"createdAt": "2025-02-21T18:24:06.225Z",
"updatedAt": "2025-02-21T18:24:06.225Z",
"capabilities": [
{
"name": "sms",
"inbound": {
"status": "active",
"issues": [
"subscription-is-not-active"
]
},
"outbound": {
"status": "active",
"supportsDestinations": true,
"issues": [
"subscription-is-not-active"
],
"destinationStatuses": {
"active": 1,
"inactive": 1,
"available": 1,
"unavailable": 1
}
}
}
],
"dependencies": [
{
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text",
"type": "connector",
"capabilities": [
"voice"
]
}
],
"issues": [
"subscription-is-not-active"
]
}
}
]
}
OK
/workspaces/{workspaceId}/numbers-long-code/{longCodeNumberId}
curl -L \
--url '/workspaces/{workspaceId}/numbers-long-code/{longCodeNumberId}' \
--header 'Authorization: Bearer jwt'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"endpointId": "123e4567-e89b-12d3-a456-426614174000",
"numberString": "text",
"countryCode": "text",
"type": "local",
"capabilities": {
"voice": {
"inbound": true,
"outbound": true
},
"sms": {
"inbound": true,
"outbound": true
},
"mms": {
"inbound": true,
"outbound": true
}
},
"createdAt": "2025-02-21T18:24:06.225Z",
"updatedAt": "2025-02-21T18:24:06.225Z",
"order": {
"countryCode": "text",
"type": "local",
"prefix": "text",
"status": "draft",
"createdAt": "2025-02-21T18:24:06.225Z",
"updatedAt": "2025-02-21T18:24:06.225Z",
"capabilities": [
"voice"
]
},
"deprovisionAt": "2025-02-21T18:24:06.225Z",
"endpoint": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "long-code-number",
"instanceId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"provisioningStatus": "provisioned",
"createdAt": "2025-02-21T18:24:06.225Z",
"updatedAt": "2025-02-21T18:24:06.225Z",
"capabilities": [
{
"name": "sms",
"inbound": {
"status": "active",
"issues": [
"subscription-is-not-active"
]
},
"outbound": {
"status": "active",
"supportsDestinations": true,
"issues": [
"subscription-is-not-active"
],
"destinationStatuses": {
"active": 1,
"inactive": 1,
"available": 1,
"unavailable": 1
}
}
}
],
"dependencies": [
{
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text",
"type": "connector",
"capabilities": [
"voice"
]
}
],
"issues": [
"subscription-is-not-active"
]
}
}
OK