# Long Code Numbers

## Overview

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.

## API Access  <a href="#api-access" id="api-access"></a>

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](https://docs.messagebird.com/api/api-access).

## List Long Code Numbers <a href="#list-long-code-numbers" id="list-long-code-numbers"></a>

In order to retrieve a list of long code numbers available in your workspace you can use this request.

## List Workspace Long Code Numbers

> Get a list of all Long code numbers assigned to your workspace. You can filter your list of numbers by country code,\
> types (e.g. a local, mobile, or toll-free number), supported capabilities and the number leading digits. The results can be paginated. To learn more about the pagination, please refer to the pagination section on API Access Common API Usage section.<br>

```json
{"openapi":"3.0.3","info":{"title":"Numbers","version":"v1"},"tags":[{"description":"Manage long code numbers.","name":"long_code_numbers"}],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"parameters":{"queryLimit":{"description":"Limits the number of results to return per page. The default value is 10 and maximum is 99. If the nextPageToken is defined on response, you can use it to get remaining numbers. To know more, refer to the pagination section.\n","in":"query","name":"limit","schema":{"default":10,"maximum":99,"minimum":1,"type":"integer"}},"queryCursor":{"description":"Pagination token that keeps of track of the current position in the list. Use it to query remaining results. If not provided, the first page is returned. To learn more about the pagination, please refer to the pagination section on API Access Common API Usage section.","in":"query","name":"pageToken","schema":{"maxLength":8000,"type":"string"}},"queryDirection":{"description":"Order in which to retrieve the results. By default, the orders are in ascending order date. To get the results in descending order, set this parameter to true.","in":"query","name":"reverse","schema":{"default":false,"type":"boolean"}},"queryLongCodeNumberString":{"allowEmptyValue":false,"description":"Used to filter numbers by their leading digits. The \"+\" prefix is optional, but the country code is required.","in":"query","name":"numberString","schema":{"type":"string"}},"queryLongCodeNumberTypes":{"allowEmptyValue":false,"description":"The number type depending on its purpose. Local for regional use, national for countrywide use, mobile for mobile networks, or toll-free for caller-free charging.","in":"query","name":"types","schema":{"items":{"$ref":"#/components/schemas/LongCodeNumberType"},"type":"array"}},"queryCountryCodes":{"allowEmptyValue":false,"in":"query","name":"countryCodes","schema":{"description":"A 2-digit ISO 3166-1 country code array.","items":{"$ref":"#/components/schemas/NumbersCountryCode"},"type":"array"}},"queryLongCodeNumberProviderIds":{"allowEmptyValue":false,"in":"query","name":"providerIds","schema":{"items":{"format":"uuid","minItems":1,"type":"string"},"type":"array"}},"queryCapabilities":{"allowEmptyValue":false,"in":"query","name":"capabilities","schema":{"items":{"$ref":"#/components/schemas/EndpointCapabilityName"},"type":"array"}}},"schemas":{"LongCodeNumberType":{"type":"string","description":"The type of long code number.","enum":["local","national","toll-free","mobile"]},"NumbersCountryCode":{"type":"string","format":"iso3166-1","description":"The country code in ISO 3166-1 alpha-2 format."},"EndpointCapabilityName":{"type":"string","enum":["voice","sms","mms","whatsapp","email","rcs-google"]},"pagination":{"properties":{"nextPageToken":{"description":"The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display. To know more, refer to the pagination section.","type":"string"}},"type":"object"},"WorkspaceLongCodeNumber":{"type":"object","allOf":[{"$ref":"#/components/schemas/LongCodeNumberFragment"},{"type":"object","required":["endpoint"],"properties":{"endpoint":{"$ref":"#/components/schemas/EndpointFragment"}}}]},"LongCodeNumberFragment":{"type":"object","required":["id","endpointId","numberString","countryCode","capabilities","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the long code number. The endpoint ID is the same."},"endpointId":{"type":"string","format":"uuid","description":"The unique identifier of the endpoint. The long conde ID is the same."},"numberString":{"type":"string","description":"The phone number in E.164 format."},"countryCode":{"$ref":"#/components/schemas/NumbersCountryCode"},"type":{"$ref":"#/components/schemas/LongCodeNumberType"},"capabilities":{"$ref":"#/components/schemas/PhoneNumberCapabilities"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"order":{"$ref":"#/components/schemas/LongCodeNumberOrder","description":"The order that created this long code number. It contains information such as the capabilities, order status and type."},"deprovisionAt":{"type":"string","format":"date-time","description":"The date and time when the long code number should be deprovisioned."}}},"PhoneNumberCapabilities":{"type":"object","description":"Capabilities of the phone number. It shows if the phone number supports voice, sms and/or mms.","required":["voice","sms","mms"],"properties":{"voice":{"$ref":"#/components/schemas/PhoneNumberCapability"},"sms":{"$ref":"#/components/schemas/PhoneNumberCapability"},"mms":{"$ref":"#/components/schemas/PhoneNumberCapability"},"whatsapp":{"$ref":"#/components/schemas/PhoneNumberCapability"}}},"PhoneNumberCapability":{"type":"object","required":["inbound","outbound"],"properties":{"inbound":{"type":"boolean","description":"Whether the number supports inbound use cases."},"outbound":{"type":"boolean","description":"Whether the number supports outbound use cases."}}},"LongCodeNumberOrder":{"type":"object","required":["countryCode","type","capabilities","status","createdAt","updatedAt"],"properties":{"countryCode":{"$ref":"#/components/schemas/NumbersCountryCode"},"type":{"$ref":"#/components/schemas/LongCodeNumberType"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EndpointCapabilityName"}},"prefix":{"type":"string"},"status":{"$ref":"#/components/schemas/LongCodeNumberOrderStatus"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"LongCodeNumberOrderStatus":{"type":"string","enum":["draft","submitted","processing","fulfilled","rejected","cancelled"]},"EndpointFragment":{"type":"object","description":"A representation of an endpoint. It contains details such as the capabilities, dependencies, and more.","required":["id","type","instanceId","name","capabilities","provisioningStatus","createdAt","updatedAt"],"properties":{"id":{"$ref":"#/components/schemas/EndpointId"},"type":{"$ref":"#/components/schemas/EndpointType"},"instanceId":{"$ref":"#/components/schemas/InstanceId"},"name":{"$ref":"#/components/schemas/EndpointName"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EndpointCapability"}},"dependencies":{"type":"array","description":"The dependencies of the endpoint. It shows the connectors that the endpoint is connected to.","items":{"$ref":"#/components/schemas/EndpointDependency"}},"issues":{"type":"array","items":{"$ref":"#/components/schemas/EndpointIssue"}},"provisioningStatus":{"$ref":"#/components/schemas/EndpointProvisioningStatus"},"whatsApp":{"description":"WhatsApp pre-verification details for this endpoint, if applicable. Only present for long code numbers from WhatsApp-capable providers.","nullable":true,"$ref":"#/components/schemas/WorkspaceWhatsAppNumber"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"EndpointId":{"type":"string","format":"uuid","description":"The ID of the endpoint."},"EndpointType":{"type":"string","description":"The type of the endpoint. It can be a long code number, short code number, alpha number, ip pool, or rcs google agent.","enum":["long-code-number","short-code-number","alpha-number","ip-pool","rcs-google-agent"]},"InstanceId":{"type":"string","format":"uuid","description":"The unique identifier of the instance."},"EndpointName":{"type":"string","description":"The name of the endpoint. For some cases it will be the number in international format as string."},"EndpointCapability":{"type":"object","description":"The capability of the endpoint. It shows what capabilities the endpoint supports and which direction (inbound, which means receiving messages, and outbound, which means sending messages). Also, it shows the status for that capability/direction combination.","discriminator":{"propertyName":"name","mapping":{"sms":"#/components/schemas/EndpointCapabilitySMS","mms":"#/components/schemas/EndpointCapabilityMMS","voice":"#/components/schemas/EndpointCapabilityVoice","whatsapp":"#/components/schemas/EndpointCapabilityWhatsapp","email":"#/components/schemas/EndpointCapabilityEmail","rcs-google":"#/components/schemas/EndpointCapabilityRcsGoogle"}},"oneOf":[{"$ref":"#/components/schemas/EndpointCapabilitySMS"},{"$ref":"#/components/schemas/EndpointCapabilityMMS"},{"$ref":"#/components/schemas/EndpointCapabilityVoice"},{"$ref":"#/components/schemas/EndpointCapabilityWhatsapp"},{"$ref":"#/components/schemas/EndpointCapabilityEmail"},{"$ref":"#/components/schemas/EndpointCapabilityRcsGoogle"}]},"EndpointCapabilitySMS":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["sms"]}}}]},"EndpointCapabilityFields":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/EndpointCapabilityName"},"inbound":{"$ref":"#/components/schemas/InboundEndpointCapability"},"outbound":{"$ref":"#/components/schemas/OutboundEndpointCapability"}}},"InboundEndpointCapability":{"type":"object","nullable":true,"required":["status"],"properties":{"status":{"$ref":"#/components/schemas/EndpointCapabilityStatus"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/EndpointIssue"}}}},"EndpointCapabilityStatus":{"type":"string","enum":["active","inactive","available","unavailable"]},"EndpointIssue":{"type":"string","description":"The issue of the endpoint. It indicates what's wrong with the endpoint and the reason why traffic is deactivated in that case.","enum":["subscription-is-not-active","setup-fee-is-not-paid","capability-is-not-supported","compliance-requirement-not-satisfied","brand-not-ready","destination-brand-not-ready","use-case-not-ready","kyc-form-grace-period-has-ended","whatsapp-not-pre-verified"]},"OutboundEndpointCapability":{"type":"object","nullable":true,"required":["status"],"properties":{"status":{"$ref":"#/components/schemas/EndpointCapabilityStatus"},"destinationStatuses":{"type":"object","properties":{"active":{"type":"number"},"inactive":{"type":"number"},"available":{"type":"number"},"unavailable":{"type":"number"}}},"supportsDestinations":{"type":"boolean","description":"Whether the number supports destinations"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/EndpointIssue"}}}},"EndpointCapabilityMMS":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["mms"]}}}]},"EndpointCapabilityVoice":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["voice"]},"useCaseType":{"$ref":"#/components/schemas/EndpointVoiceUseCaseType"}}}]},"EndpointVoiceUseCaseType":{"type":"string","enum":["contact-centre"]},"EndpointCapabilityWhatsapp":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["whatsapp"]}}}]},"EndpointCapabilityEmail":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["email"]}}}]},"EndpointCapabilityRcsGoogle":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["rcs-google"]}}}]},"EndpointDependency":{"type":"object","discriminator":{"propertyName":"type","mapping":{"connector":"#/components/schemas/EndpointDependencyConnector"}},"oneOf":[{"$ref":"#/components/schemas/EndpointDependencyConnector"}]},"EndpointDependencyConnector":{"type":"object","required":["connectorId","connectorTemplateRef"],"properties":{"type":{"type":"string","enum":["connector"]},"connectorId":{"type":"string","format":"uuid"},"connectorTemplateRef":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EndpointCapabilityName"}}}},"EndpointProvisioningStatus":{"type":"string","enum":["provisioned","provisioning","deprovisioned","deprovisioning"]},"WorkspaceWhatsAppNumber":{"type":"object","description":"WhatsApp number pre-verification details.","properties":{"whatsAppId":{"type":"string"},"status":{"$ref":"#/components/schemas/WhatsAppNumberStatus"},"stage":{"type":"string"},"attempt":{"type":"integer"},"nextAttemptAt":{"type":"string","format":"date-time"},"verificationExpiresAt":{"type":"string","format":"date-time","nullable":true},"requestedCodeAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"WhatsAppNumberStatus":{"type":"string","description":"WhatsApp number status","enum":["unknown","already-exists","installed","verified","not-verified","expired"]}}},"paths":{"/workspaces/{workspaceId}/numbers-long-code":{"get":{"operationId":"listWorkspaceLongCodeNumbers","description":"Get a list of all Long code numbers assigned to your workspace. You can filter your list of numbers by country code,\ntypes (e.g. a local, mobile, or toll-free number), supported capabilities and the number leading digits. The results can be paginated. To learn more about the pagination, please refer to the pagination section on API Access Common API Usage section.\n","parameters":[{"$ref":"#/components/parameters/queryLimit"},{"$ref":"#/components/parameters/queryCursor"},{"$ref":"#/components/parameters/queryDirection"},{"$ref":"#/components/parameters/queryLongCodeNumberString"},{"$ref":"#/components/parameters/queryLongCodeNumberTypes"},{"$ref":"#/components/parameters/queryCountryCodes"},{"$ref":"#/components/parameters/queryLongCodeNumberProviderIds"},{"$ref":"#/components/parameters/queryCapabilities"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/pagination"},{"properties":{"results":{"items":{"$ref":"#/components/schemas/WorkspaceLongCodeNumber"},"type":"array"}},"required":["results"],"type":"object"}]}}},"description":"OK"}},"summary":"List Workspace Long Code Numbers","tags":["long_code_numbers"]}}}}
```

{% tabs %}
{% tab title="Request" %}

```
curl "https://api.bird.com/workspaces/{workpaceId}/numbers-long-code/"
-H 'Authorization: Bearer '
```

{% endtab %}

{% tab title="Response" %}

```
{
    "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
                            }
                        }
                    }
                ]
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get a Long Code Number

In order to retrieve the details of a long code number available in your workspace you can use this request.

## Get Long Code number by ID

> This endpoint returns the information of a Long Code Number assigned to the workspace given its ID. \
> You may use the EndpointID as well to search for your long code number.<br>

```json
{"openapi":"3.0.3","info":{"title":"Numbers","version":"v1"},"tags":[{"description":"Manage long code numbers.","name":"long_code_numbers"}],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"WorkspaceLongCodeNumber":{"type":"object","allOf":[{"$ref":"#/components/schemas/LongCodeNumberFragment"},{"type":"object","required":["endpoint"],"properties":{"endpoint":{"$ref":"#/components/schemas/EndpointFragment"}}}]},"LongCodeNumberFragment":{"type":"object","required":["id","endpointId","numberString","countryCode","capabilities","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the long code number. The endpoint ID is the same."},"endpointId":{"type":"string","format":"uuid","description":"The unique identifier of the endpoint. The long conde ID is the same."},"numberString":{"type":"string","description":"The phone number in E.164 format."},"countryCode":{"$ref":"#/components/schemas/NumbersCountryCode"},"type":{"$ref":"#/components/schemas/LongCodeNumberType"},"capabilities":{"$ref":"#/components/schemas/PhoneNumberCapabilities"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"order":{"$ref":"#/components/schemas/LongCodeNumberOrder","description":"The order that created this long code number. It contains information such as the capabilities, order status and type."},"deprovisionAt":{"type":"string","format":"date-time","description":"The date and time when the long code number should be deprovisioned."}}},"NumbersCountryCode":{"type":"string","format":"iso3166-1","description":"The country code in ISO 3166-1 alpha-2 format."},"LongCodeNumberType":{"type":"string","description":"The type of long code number.","enum":["local","national","toll-free","mobile"]},"PhoneNumberCapabilities":{"type":"object","description":"Capabilities of the phone number. It shows if the phone number supports voice, sms and/or mms.","required":["voice","sms","mms"],"properties":{"voice":{"$ref":"#/components/schemas/PhoneNumberCapability"},"sms":{"$ref":"#/components/schemas/PhoneNumberCapability"},"mms":{"$ref":"#/components/schemas/PhoneNumberCapability"},"whatsapp":{"$ref":"#/components/schemas/PhoneNumberCapability"}}},"PhoneNumberCapability":{"type":"object","required":["inbound","outbound"],"properties":{"inbound":{"type":"boolean","description":"Whether the number supports inbound use cases."},"outbound":{"type":"boolean","description":"Whether the number supports outbound use cases."}}},"LongCodeNumberOrder":{"type":"object","required":["countryCode","type","capabilities","status","createdAt","updatedAt"],"properties":{"countryCode":{"$ref":"#/components/schemas/NumbersCountryCode"},"type":{"$ref":"#/components/schemas/LongCodeNumberType"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EndpointCapabilityName"}},"prefix":{"type":"string"},"status":{"$ref":"#/components/schemas/LongCodeNumberOrderStatus"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"EndpointCapabilityName":{"type":"string","enum":["voice","sms","mms","whatsapp","email","rcs-google"]},"LongCodeNumberOrderStatus":{"type":"string","enum":["draft","submitted","processing","fulfilled","rejected","cancelled"]},"EndpointFragment":{"type":"object","description":"A representation of an endpoint. It contains details such as the capabilities, dependencies, and more.","required":["id","type","instanceId","name","capabilities","provisioningStatus","createdAt","updatedAt"],"properties":{"id":{"$ref":"#/components/schemas/EndpointId"},"type":{"$ref":"#/components/schemas/EndpointType"},"instanceId":{"$ref":"#/components/schemas/InstanceId"},"name":{"$ref":"#/components/schemas/EndpointName"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EndpointCapability"}},"dependencies":{"type":"array","description":"The dependencies of the endpoint. It shows the connectors that the endpoint is connected to.","items":{"$ref":"#/components/schemas/EndpointDependency"}},"issues":{"type":"array","items":{"$ref":"#/components/schemas/EndpointIssue"}},"provisioningStatus":{"$ref":"#/components/schemas/EndpointProvisioningStatus"},"whatsApp":{"description":"WhatsApp pre-verification details for this endpoint, if applicable. Only present for long code numbers from WhatsApp-capable providers.","nullable":true,"$ref":"#/components/schemas/WorkspaceWhatsAppNumber"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"EndpointId":{"type":"string","format":"uuid","description":"The ID of the endpoint."},"EndpointType":{"type":"string","description":"The type of the endpoint. It can be a long code number, short code number, alpha number, ip pool, or rcs google agent.","enum":["long-code-number","short-code-number","alpha-number","ip-pool","rcs-google-agent"]},"InstanceId":{"type":"string","format":"uuid","description":"The unique identifier of the instance."},"EndpointName":{"type":"string","description":"The name of the endpoint. For some cases it will be the number in international format as string."},"EndpointCapability":{"type":"object","description":"The capability of the endpoint. It shows what capabilities the endpoint supports and which direction (inbound, which means receiving messages, and outbound, which means sending messages). Also, it shows the status for that capability/direction combination.","discriminator":{"propertyName":"name","mapping":{"sms":"#/components/schemas/EndpointCapabilitySMS","mms":"#/components/schemas/EndpointCapabilityMMS","voice":"#/components/schemas/EndpointCapabilityVoice","whatsapp":"#/components/schemas/EndpointCapabilityWhatsapp","email":"#/components/schemas/EndpointCapabilityEmail","rcs-google":"#/components/schemas/EndpointCapabilityRcsGoogle"}},"oneOf":[{"$ref":"#/components/schemas/EndpointCapabilitySMS"},{"$ref":"#/components/schemas/EndpointCapabilityMMS"},{"$ref":"#/components/schemas/EndpointCapabilityVoice"},{"$ref":"#/components/schemas/EndpointCapabilityWhatsapp"},{"$ref":"#/components/schemas/EndpointCapabilityEmail"},{"$ref":"#/components/schemas/EndpointCapabilityRcsGoogle"}]},"EndpointCapabilitySMS":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["sms"]}}}]},"EndpointCapabilityFields":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/EndpointCapabilityName"},"inbound":{"$ref":"#/components/schemas/InboundEndpointCapability"},"outbound":{"$ref":"#/components/schemas/OutboundEndpointCapability"}}},"InboundEndpointCapability":{"type":"object","nullable":true,"required":["status"],"properties":{"status":{"$ref":"#/components/schemas/EndpointCapabilityStatus"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/EndpointIssue"}}}},"EndpointCapabilityStatus":{"type":"string","enum":["active","inactive","available","unavailable"]},"EndpointIssue":{"type":"string","description":"The issue of the endpoint. It indicates what's wrong with the endpoint and the reason why traffic is deactivated in that case.","enum":["subscription-is-not-active","setup-fee-is-not-paid","capability-is-not-supported","compliance-requirement-not-satisfied","brand-not-ready","destination-brand-not-ready","use-case-not-ready","kyc-form-grace-period-has-ended","whatsapp-not-pre-verified"]},"OutboundEndpointCapability":{"type":"object","nullable":true,"required":["status"],"properties":{"status":{"$ref":"#/components/schemas/EndpointCapabilityStatus"},"destinationStatuses":{"type":"object","properties":{"active":{"type":"number"},"inactive":{"type":"number"},"available":{"type":"number"},"unavailable":{"type":"number"}}},"supportsDestinations":{"type":"boolean","description":"Whether the number supports destinations"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/EndpointIssue"}}}},"EndpointCapabilityMMS":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["mms"]}}}]},"EndpointCapabilityVoice":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["voice"]},"useCaseType":{"$ref":"#/components/schemas/EndpointVoiceUseCaseType"}}}]},"EndpointVoiceUseCaseType":{"type":"string","enum":["contact-centre"]},"EndpointCapabilityWhatsapp":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["whatsapp"]}}}]},"EndpointCapabilityEmail":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["email"]}}}]},"EndpointCapabilityRcsGoogle":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["rcs-google"]}}}]},"EndpointDependency":{"type":"object","discriminator":{"propertyName":"type","mapping":{"connector":"#/components/schemas/EndpointDependencyConnector"}},"oneOf":[{"$ref":"#/components/schemas/EndpointDependencyConnector"}]},"EndpointDependencyConnector":{"type":"object","required":["connectorId","connectorTemplateRef"],"properties":{"type":{"type":"string","enum":["connector"]},"connectorId":{"type":"string","format":"uuid"},"connectorTemplateRef":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EndpointCapabilityName"}}}},"EndpointProvisioningStatus":{"type":"string","enum":["provisioned","provisioning","deprovisioned","deprovisioning"]},"WorkspaceWhatsAppNumber":{"type":"object","description":"WhatsApp number pre-verification details.","properties":{"whatsAppId":{"type":"string"},"status":{"$ref":"#/components/schemas/WhatsAppNumberStatus"},"stage":{"type":"string"},"attempt":{"type":"integer"},"nextAttemptAt":{"type":"string","format":"date-time"},"verificationExpiresAt":{"type":"string","format":"date-time","nullable":true},"requestedCodeAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"WhatsAppNumberStatus":{"type":"string","description":"WhatsApp number status","enum":["unknown","already-exists","installed","verified","not-verified","expired"]},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n","minLength":5},"message":{"type":"string","minLength":5,"description":"A human-readable message that describes the error. An example is 'The request body is missing the required field `service`.'\n"},"details":{"type":"object","additionalProperties":true,"description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n"}}}}},"paths":{"/workspaces/{workspaceId}/numbers-long-code/{longCodeNumberId}":{"get":{"operationId":"getWorkspaceLongCodeNumber","description":"This endpoint returns the information of a Long Code Number assigned to the workspace given its ID. \nYou may use the EndpointID as well to search for your long code number.\n","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceLongCodeNumber"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Long Code Number not found"}},"summary":"Get Long Code number by ID","tags":["long_code_numbers"]}}}}
```

{% tabs %}
{% tab title="Request" %}

```
curl "https://api.bird.com/workspaces/{workspaceId}/numbers-long-code/{longCodeId}" \
     -H 'Authorization: Bearer <your-access-key>'
```

{% endtab %}

{% tab title="Response" %}

```
{
    "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
                    }
                }
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}
