Sign inGet started

US 10DLC API Installation

10DLC is a local 10-digit phone number that requires Brand & Use Case registration and supports throughput levels suitable for A2P SMS campaigns. 10DLC is sanctioned by mobile carriers for A2P messaging and is intended to provide a reliable user experience, better deliverability, and higher messaging speed. To find out more about 10DLC see the following page
To setup a new channel to send SMS messages using a United states 10 digit long code number the following steps are required
Some of the following requests will lead to additional workspace charges. Ensure you understand the costs before proceeding

API Access

The following API requests can only be made using a valid access key and attached to an access role with the an access policy that at least specifies the permissions to the resources outlined in each section below.

Find an available number

If you do not already have a US 10DLC number available in your workspace you can find one to purchase .You can filter by country, prefix, number type and number capabilities.
GET
/organizations/{organizationId}/numbers-stock-items
List all available numbers in stock.
查询参数
limit
integer
Limits the number of results to return.
pageToken
string
The cursor that keeps track of the current position in the results.
countryCodes
array
types
array
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.
features
array
The number capabilities, which can be voice, SMS, and MMS for inbound, outbound, or two-way communication, plus WhatsApp.
prefix
string
Used to filter numbers by area code. Accepts either bare area code digits (e.g. 205 for Alabama) or a full E.164 prefix (e.g. +1205). Partial prefixes are supported for autocomplete use cases (e.g. +120 matches all numbers in area codes 202, 203, 205, 206, 207, 208, 209). Must be used together with the countryCodes filter.
testing
boolean
响应载荷
results
array of object
必填
显示子属性
results.id
string
必填
The unique identifier of the stock item.
results.countryCode
string
必填
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.numberString
string
必填
results.capabilities
object
必填
Capabilities of the phone number. It shows if the phone number supports voice, sms and/or mms.
显示子属性
results.capabilities.voice
object
必填
显示子属性
results.capabilities.voice.inbound
boolean
必填
Whether the number supports inbound use cases.
results.capabilities.voice.outbound
boolean
必填
Whether the number supports outbound use cases.
results.capabilities.sms
object
必填
显示子属性
results.capabilities.sms.inbound
boolean
必填
Whether the number supports inbound use cases.
results.capabilities.sms.outbound
boolean
必填
Whether the number supports outbound use cases.
results.capabilities.mms
object
必填
显示子属性
results.capabilities.mms.inbound
boolean
必填
Whether the number supports inbound use cases.
results.capabilities.mms.outbound
boolean
必填
Whether the number supports outbound use cases.
results.capabilities.whatsapp
object
显示子属性
results.capabilities.whatsapp.inbound
boolean
必填
Whether the number supports inbound use cases.
results.capabilities.whatsapp.outbound
boolean
必填
Whether the number supports outbound use cases.
results.monthlyPrice
object
必填
Money combines an amount of money with its currency.
显示子属性
results.monthlyPrice.currencyCode
string
必填
Currency as ISO 4217 code (three digits). An example would be EUR for Euro.
Possible values: EUR, USD, GBP, AUD, SGD, IDR, INR, MXN
results.monthlyPrice.amount
integer
必填
results.monthlyPrice.exponent
integer
必填
Usually a negative number to specify the exponent for decimal precision. e.g., 1540 * (10^-2) = 15.4
results.backOrderRequired
boolean
Whether back order is required for this item, available but it is not in the local inventory
results.backOrderStockId
string
The stock id of the back order item, to be used when creating back order
nextPageToken
string
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.
代码示例
curl -X GET 'https://api.bird.com/organizations/{organizationId}/numbers-stock-items' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'

Example

The following example will return the first available US local number required for use with 10DLC registration.
代码示例
curl --location 'https://api.bird.com/workspaces/<your-workspace-id>/numbers-available?limit=1&country=US&type=local' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>'

Purchase a number

Once you have found an available number you can purchase this by providing the number (in E.1624 format) and the country (using a two digit ISO code).
A successful request to this endpoint will start a recurring monthly subscription based on the monthly cost of the 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.
请求载荷
numberStockItemIds
array of string
必填
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.
响应载荷
results
array of object
必填
显示子属性
results.id
string
必填
The unique identifier of the long code number. The endpoint ID is the same.
results.endpointId
string
必填
The unique identifier of the endpoint. The long conde ID is the same.
results.numberString
string
必填
The phone number in E.164 format.
results.countryCode
string
必填
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
必填
Capabilities of the phone number. It shows if the phone number supports voice, sms and/or mms.
显示子属性
results.capabilities.voice
object
必填
显示子属性
results.capabilities.voice.inbound
boolean
必填
Whether the number supports inbound use cases.
results.capabilities.voice.outbound
boolean
必填
Whether the number supports outbound use cases.
results.capabilities.sms
object
必填
显示子属性
results.capabilities.sms.inbound
boolean
必填
Whether the number supports inbound use cases.
results.capabilities.sms.outbound
boolean
必填
Whether the number supports outbound use cases.
results.capabilities.mms
object
必填
显示子属性
results.capabilities.mms.inbound
boolean
必填
Whether the number supports inbound use cases.
results.capabilities.mms.outbound
boolean
必填
Whether the number supports outbound use cases.
results.capabilities.whatsapp
object
显示子属性
results.capabilities.whatsapp.inbound
boolean
必填
Whether the number supports inbound use cases.
results.capabilities.whatsapp.outbound
boolean
必填
Whether the number supports outbound use cases.
results.createdAt
string
必填
results.updatedAt
string
必填
results.order
object
The order that created this long code number. It contains information such as the capabilities, order status and type.
显示子属性
results.order.countryCode
string
必填
The country code in ISO 3166-1 alpha-2 format.
results.order.type
string
必填
The type of long code number.
Possible values: local, national, toll-free, mobile
results.order.capabilities
array of string
必填
results.order.prefix
string
results.order.status
string
必填
Possible values: draft, submitted, processing, fulfilled, rejected, cancelled
results.order.createdAt
string
必填
results.order.updatedAt
string
必填
results.deprovisionAt
string
The date and time when the long code number should be deprovisioned.
results.endpoint
object
必填
A representation of an endpoint. It contains details such as the capabilities, dependencies, and more.
显示子属性
results.endpoint.id
string
必填
The ID of the endpoint.
results.endpoint.type
string
必填
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
必填
The unique identifier of the instance.
results.endpoint.name
string
必填
The name of the endpoint. For some cases it will be the number in international format as string.
results.endpoint.capabilities
array of object
必填
显示子属性
results.endpoint.capabilities.name
string
必填
Possible values: sms
results.endpoint.capabilities.inbound
object
显示子属性
results.endpoint.capabilities.inbound.status
string
必填
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.inbound.issues
array of string
results.endpoint.capabilities.outbound
object
显示子属性
results.endpoint.capabilities.outbound.status
string
必填
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.outbound.destinationStatuses
object
显示子属性
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.
显示子属性
results.endpoint.dependencies.type
string
Possible values: connector
results.endpoint.dependencies.connectorId
string
必填
results.endpoint.dependencies.connectorTemplateRef
string
必填
results.endpoint.dependencies.capabilities
array of string
results.endpoint.issues
array of string
results.endpoint.provisioningStatus
string
必填
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.
显示子属性
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
必填
results.endpoint.updatedAt
string
必填
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/numbers-long-code' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
The following example will purchase the number if it still available and you have sufficient balance in your workspace wallet. Provide number in E.1624 format and country in 2 digit ISO code (e.g. US)
代码示例
curl --location 'https://api.bird.com/workspaces/<your-workspace-id>/numbers' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
  "numbers": [
    {
      "number": "",
      "country": ""
    }
  ]
}'

(Optional) Set up 10DLC webhook subscriptions

You can set up a Web Hook subscription to be notified of any brand or campaign event. Brand and camping creation work in sync, and subscribing to all related events will automate the 10DLC registration process.
POST
/organizations/{organizationId}/workspaces/{workspaceId}/webhook-subscriptions
To start receiving notifications via webhooks, the first step is to create a subscription. A webhook subscription specifies the destination URL for events and defines how they should be filtered. During setup, you can select which events to send to the specified URL. You can create multiple webhook subscriptions to route different types of events to various URLs as needed. Event filters are applied using AND operators, meaning that all specified criteria must be met for an event to be sent. If you want to handle multiple interactionTypes, you'll need to create separate webhook subscriptions for each.
请求载荷
service
string
必填
The service that the webhook is subscribed to. For example, to get events regarding channels, the service would be channels.
Possible values: channels, numbers, payments, conversations, templates
event
string
必填
The event name identifies the webhook event, such as sms.outbound for notifications about SMS messages being sent.
eventFilters
array of object
Filters to apply to the events that are sent to the webhook. This is a key-value list of filters that are specific to the service that the webhook is subscribed to. One example would be a key of channelId and a value of a UUID (in string format) that represents a channel.
显示子参数
eventFilters.key
string
必填
Possible values: channelId, platformId, channelStatus, interactionType, messageStatus, status, eventDestination, navigatorId
eventFilters.value
string
必填
template
string
url
string
必填
The URL of the webhook is used to send events to the webhook. The URL must be a valid URL that respects the established pattern and is accessible from the internet.
signingKey
string
The signing key for the webhook and can be used to verify the authenticity of the webhook.
oauth2
object
OAuth 2.0 client credentials configuration.
显示子参数
oauth2.tokenUrl
string
必填
The OAuth 2.0 token endpoint where access tokens are requested.
oauth2.clientId
string
必填
The OAuth 2.0 client identifier.
oauth2.clientSecret
string
必填
The OAuth 2.0 client secret.
oauth2.scopes
array of string
OAuth 2.0 scopes to request.
响应载荷
id
string
必填
The unique identifier for the webhook subscription. This identifier is used to reference the webhook subscription in other API calls.
organizationId
string
必填
workspaceId
string
必填
service
string
必填
The service that the webhook is subscribed to. For example, to get events regarding channels, the service would be channels.
Possible values: channels, numbers, payments, conversations, templates
event
string
必填
The event name identifies the webhook event, such as sms.outbound for notifications about SMS messages being sent.
eventFilters
array of object
显示子属性
eventFilters.key
string
必填
Possible values: channelId, platformId, channelStatus, interactionType, messageStatus, status, eventDestination, navigatorId
eventFilters.value
string
必填
template
string
Used for our Exit APIs for Twilio and Sinch. More information can be found here for Twilio and here for Sinch.
url
string
必填
The URL of the webhook is used to send events to the webhook. The URL must be a valid URL that respects the established pattern and is accessible from the internet.
signingKey
string
The signing key for the webhook and can be used to verify the authenticity of the webhook.
oauth2
object
OAuth 2.0 client credentials configuration.
显示子属性
oauth2.tokenUrl
string
必填
The OAuth 2.0 token endpoint where access tokens are requested.
oauth2.clientId
string
必填
The OAuth 2.0 client identifier.
oauth2.scopes
array of string
OAuth 2.0 scopes to request.
status
string
必填
Possible values: active, inactive
statusReason
string
A human-readable explanation for the current status of the webhook subscription.
createdAt
string
updatedAt
string
代码示例
curl -X POST 'https://api.bird.com/organizations/{organizationId}/workspaces/{workspaceId}/webhook-subscriptions' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'

Brand Subscriptions

The Following example will Create a subscrscrition listing to all Brand Related events
代码示例
curl --location 'https://api.bird.com/organizations/<your-organization-id>/workspaces/<your-workspace-id>/webhook-subscriptions' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
    "signingKey": "my-signing-key",
    "eventFilters": [

    ],
    "event": "10dlc.brand",
    "service": "numbers",
    "url": "<your-webhook-url>"
    }'

Campaign Subscription

The Following example will Create a subscription listing to all Brand Related events
代码示例
curl --location 'https://api.bird.com/organizations/<your-organization-id>/workspaces/<your-workspace-id>/webhook-subscriptions' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
    "signingKey": "my-signing-key",
    "eventFilters": [

    ],
    "event": "10dlc.campaign",
    "service": "numbers",
    "url": "<your-webhook-url>"
    }'

Register a new brand with the campaign registry

A-Sync : this will start a background process that may require some time to complete. A Get call may be required to to retrieve the final result .
Before you can use a US 10DLC number to send SMS messages, you must be register a brand and campaign with an external registry called the campaign registry.
After creating a brand, this will be submitted for approval by the campaign registry. The brand must be approved before you can register a campaign with the campaign registry. Brand registration may take some time.
You can find the full list of brand management endpoints here
A successful request to this endpoint will mean you are charged a brand registration fee. If you later need to update or resubmit your brand there may be additional fees.
POST
/workspaces/{workspaceId}/tcr-brands
Create a brand at workspace level. This means it will be available only for this workspace. A brand registration is mandatory due to compliance requirements.
请求载荷
entityType
string
必填
Legal entity type. It can't be updated when the brand is approved.
Possible values: PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, GOVERNMENT, ``
firstName
string
First or given name. Applicable to entity type.
lastName
string
Last or Surname. Applicable to entity type.
displayName
string
必填
Display or marketing name your brand.
companyName
string
必填
Legal company name. This should match the legal company name used to register your EIN/Tax ID.
ein
string
必填
Government assigned corporate tax ID. EIN is 9-digits in the U.S.
einIssuingCountry
string
必填
The 2 letter ISO country of registration submitted with your EIN / Tax ID registration.
phone
string
必填
Valid phone number in e.164 international format.
street
string
必填
Street number and name.
city
string
必填
City name
state
string
必填
State. Must be a 2 letter state code for US states.
postalCode
string
必填
Postal code. Must be a 5 digit zip code for the United States.
country
string
必填
ISO 2 character country code.
email
string
必填
Valid email address of brand support contact.
stockSymbol
string
Stock symbol. Required for entityType PUBLIC.
stockExchange
string
Stock exchange. Required for entityType PUBLIC.
Possible values: NONE, NASDAQ, NYSE, AMEX, AMX, ASX, B3, BME, BSE, FRA, ICEX, JPX, JSE, KRX, LON, NSE, OMX, SEHK, SGX, SSE, STO, SWX, SZSE, TSX, TWSE, VSE, OTHER, ``
website
string
必填
Brand website URL.
vertical
string
Vertical or industry segment of the brand.
altBusinessId
string
Alternate business identifier.
altBusinessIdType
string
Alternate business identifier type. Required if altBusinessId is provided.
Possible values: NONE, DUNS, GIIN, LEI, ``
businessContactEmail
string
Business contact email.
响应载荷
id
string
The ID of the number.
tcrBrandId
string
The Campaign Registry brand ID.
organizationId
string
createdAt
string
Timestamp (UTC) when the brand was created.
updatedAt
string
Timestamp (UTC) when the brand was last updated.
status
string
Brand status
Possible values: FAILED, PENDING, REJECTED, APPROVED, DELETED, DRAFT
authPlusStatus
string
Brand Auth+ status
Possible values: NOT_APPLICABLE, NEEDS_CHARGE, NEEDS_TRIGGER, DONE
entityType
string
必填
Legal entity type. It can't be updated when the brand is approved.
Possible values: PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, GOVERNMENT, ``
firstName
string
First or given name. Applicable to entity type.
lastName
string
Last or Surname. Applicable to entity type.
displayName
string
必填
Display or marketing name your brand.
companyName
string
必填
Legal company name. This should match the legal company name used to register your EIN/Tax ID.
ein
string
必填
Government assigned corporate tax ID. EIN is 9-digits in the U.S.
einIssuingCountry
string
必填
The 2 letter ISO country of registration submitted with your EIN / Tax ID registration.
phone
string
必填
Valid phone number in e.164 international format.
street
string
必填
Street number and name.
city
string
必填
City name
state
string
必填
State. Must be a 2 letter state code for US states.
postalCode
string
必填
Postal code. Must be a 5 digit zip code for the United States.
country
string
必填
ISO 2 character country code.
email
string
必填
Valid email address of brand support contact.
stockSymbol
string
Stock symbol.
stockExchange
string
Stock exchange. Required for entityType PUBLIC.
Possible values: NONE, NASDAQ, NYSE, AMEX, AMX, ASX, B3, BME, BSE, FRA, ICEX, JPX, JSE, KRX, LON, NSE, OMX, SEHK, SGX, SSE, STO, SWX, SZSE, TSX, TWSE, VSE, OTHER, ``
website
string
必填
Brand website URL.
vertical
string
Vertical or industry segment of the brand.
altBusinessId
string
Alternate business identifier.
altBusinessIdType
string
Alternate business identifier type. Required if altBusinessId is provided.
Possible values: NONE, DUNS, GIIN, LEI, ``
businessContactEmail
string
Business contact email.
businessContactEmailVerifiedDate
string
Timestamp (UTC) when the brand businessContactEmail was verified.
rejection
object
Rejection details
显示子属性
rejection.description
string
必填
Rejection description
rejection.code
string
Rejection code
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/tcr-brands' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
The following example will create a new brand that will be submitted for registration with the campaign registry.
代码示例
curl --location 'https://api.bird.com/workspaces/<your-workspace-id>/tcr-brands' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
  "entityType": "",
  "firstName": "",
  "lastName": "",
  "displayName": "",
  "companyName": "",
  "ein": "",
  "einIssuingCountry": "",
  "phone": "",
  "street": "",
  "city": "",
  "state": "",
  "postalCode": "",
  "country": "",
  "email": "",
  "stockSymbol": "",
  "stockExchange": "",
  "website": "",
  "vertical": "",
  "altBusinessId": "",
  "altBusinessIdType": ""
}

(Optional) Submit brand for external vetting

A-Sync : this will start a background process that may require some time to complete. A Get call may be required to to retrieve the final result .
The final result of If your brand is not being accepted or your company is not part of the Russell 3000 stock index you can also request additional vetting. For brands that are not part of the Russell 3000 stock index this can provide access to higher messaging throughputs (depending on your vetting score)
A successful request to this endpoint will mean you are charged a brand vetting fee.
POST
/workspaces/{workspaceId}/tcr-brands/{brandId}/vettings
Create a brand vetting in a workspace. Brand vetting should be requested when the brand is not getting approved, or if the customer needs a higher throughput.
请求载荷
class
string
必填
Identifies the vetting classification.
Possible values: STANDARD
vettingProviderId
string
External vetting provider ID for the brand.
响应载荷
id
string
必填
Unique ID that identifies a vetting transaction performed by a vetting provider.
brandId
string
必填
createdAt
string
必填
Vetting submission date (UTC). This is the date when the vetting request is generated
updatedAt
string
Timestamp (UTC) when the brand vetting was last updated.
status
string
必填
Identifies the vetting request status.
Possible values: PENDING, REJECTED, FAILED, APPROVED, EXPIRED
vettingProviderId
string
必填
External vetting provider ID for the Brand vetting.
token
string
score
string
必填
Brand vetting score (0-100). Higher is better.
class
string
必填
Identifies the vetting classification.
Possible values: STANDARD
reasons
array of string
A list of reasons for FAILED vetting.
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/tcr-brands/{brandId}/vettings' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
The following example will create a new brand vetting request that will be submitted for registration with the campaign registry. You must have previously created a brand
代码示例
curl --location 'https://api.bird.com/workspaces/<your-workspace-id>/tcr-brands/<your-brand-id>/vettings' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
  "class": "STANDARD",
  "vettingProviderId": "AEGIS"
}

Register a new campaign with the campaign registry

To reduce the likelihood of rejection, ensure you are familiar with 10dlc registration examples and best practices. Specifically
  • Check this article for tips on how to write an effective Campaign description
  • Check this article on how to write an effective messageFlow
Most 10DLC rejections are caused by unclear or incomplete description and/or messageFlow
A-Sync : this will start a background process that may require some time to complete. A Get call may be required to to retrieve the final result .
Once your brand status is approved you can then create your first campaign. Brands can have multiple campaigns. A campaign describes what types of messages you will send from your SMS channel.
Handling Attachments
You will need to attach proof of opt-in and/or consent collection. To facilitate troubleshooting by both your team and the Bird team, we strongly recommend including a URL (e.g., to a third-party hosting service like Google Drive) directly in the messageFlow JSON field.
Note: The attachment vector is only supported via the UI and is not currently supported via API POST requests.

Optional: acting as Reseller

If you are registering a 10DLC campaign on behalf of third parties (e.g., your clients), you are required to also include your own contact information as part of the registration process. You can do so by including a resellerId in your POST campaign calls
The Reseller ID is a unique value to be shared by all workspaces, all brands, and all campaigns created under your Organization.
  • If you operate as a reseller you only need to obtain a reseller UUID once and reuse it in all your requests
  • If you intend to register one or more brands (for example multiple branches of your company) for your internal use you can NULL the field
You can create and manage your Reseller information via the UI when creating a campaign
you can retrieve information via the following method
Ensure your reseller status is active before creating a campaign with it
GET
/workspaces/{workspaceId}/tcr-resellers
List resellers in a workspace
查询参数
limit
integer
Limits the number of results to return.
pageToken
string
The cursor that keeps track of the current position in the results.
reverse
boolean
Reverses the order in which the results are returned.
响应载荷
nextPageToken
string
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.
results
array of object
必填
显示子属性
results.id
string
UUID of the reseller.
results.organizationId
string
results.status
string
Reseller status
Possible values: FAILED, PENDING, ACTIVE, DELETED
results.companyName
string
必填
Legal company name. This should match the legal company name used to register your EIN/Tax ID.
results.phone
string
必填
Valid phone number in e.164 international format.
results.email
string
必填
Valid email address of support contact.
results.createdAt
string
Timestamp (UTC) when the reseller was created.
results.updatedAt
string
Timestamp (UTC) when the reseller was last updated.
代码示例
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/tcr-resellers' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'

Creating a New Campaign

After creating a campaign, this will be submitted for approval by the campaign registry. The campaign must be approved before you can associate this with an SMS channel. Campaign registration can take 1-2 weeks to be approved.
You can find the full list of campaign management endpoints here
A successful request to this endpoint will mean you are charged a campaign registration fee and a three month minimum commitment fee. If you later need to update or resubmit your brand there may be additional fees.
POST
/workspaces/{workspaceId}/tcr-brands/{brandId}/campaigns
To create a campaign, it is essential to ensure that the brand has already been approved. Campaigns can only be initiated under the umbrella of brands that meet this prerequisite. Once a campaign is created, it cannot begin directing traffic immediately. Instead, it must go through a formal approval process. Only after the campaign has been reviewed and approved it will be authorized to send traffic.
Attachments: You can include up to 5 file attachments (max 10MB each) by providing URLs in the attachmentUrls field. Both internal media service URLs and external URLs (e.g., Azure Blob Storage, AWS S3) are supported. External files are automatically downloaded and uploaded to the media service.
请求载荷
name
string
必填
Campaign name
usecase
string
必填
A use case that best matches the purpose of the campaign.
subUsecases
array of string
If use case is MIXED or LOW_VOLUME mixed an array of 2-5 use cases.
description
string
必填
A detailed description of what the campaign is for.
embeddedLink
boolean
Whether messages will contain links. Provide at least one sample containing a link.
embeddedPhone
boolean
Whether messages will contain phone number. Provide at least one sample containing a phone number.
numberPool
boolean
Whether a campaign will be associated with more than 50 numbers e.g. customer service use case.
ageGated
boolean
Whether a campaign contains age-gated content based on carrier/ctia guidelines.
directLending
boolean
Whether a campaign includes content related to direct lending or loan arrangements.
subscriberOptin
boolean
Confirm customer opt in is collected and processed.
subscriberOptout
boolean
Confirm customer opt out is collected and processed.
subscriberHelp
boolean
Confirm an info message is returned if a customer sends "HELP".
samples
array of string
必填
Between 1-5 sample messages, each 20-1024 characters. If directLending, embeddedPhone, embeddedLink is true provide relevant examples.
attachmentUrls
array of string
Up to 5 attachment URLs (max 10MB each). Supports both internal media service URLs and external URLs.
Internal URLs: Obtained via POST /workspaces/&#123;workspaceId&#125;/tcr-brands/&#123;brandId&#125;/pre-signed-upload
External URLs: Any publicly accessible HTTPS URL (e.g., Azure Blob Storage, AWS S3). External files are automatically downloaded and uploaded to the media service.
Examples:
  • https://channels.messagebird.com/v1/media/temp/abc123 (internal)
  • https://mybucket.blob.core.windows.net/files/consent.pdf?signature=... (external)
messageFlow
string
必填
Provide details of how the customer will opt into this campaign. If you have a live web opt-in provide the URL and ensure the page has details on the T&Cs/data collection for opting in, and how to opt out.
helpMessage
string
必填
Help message of the campaign. A help message shall state the name of the service, contact (email or call centre), OPT IN and OPT OUT keywords.
helpKeywords
string
A comma separated list of keywords. Support of the word HELP is the minimum requirement for requesting help/info.
optoutKeywords
string
A comma separated list of keywords. Support of the word STOP is the minimum requirement for OPT OUT.
optinKeywords
string
A comma separated list of keywords. Support of the word START is the minimum requirement for OPT OUT.
optinMessage
string
Provide an example of the message that will be sent after a customer has opted in.
optoutMessage
string
Provide an example of the message that will be sent after a customer has opted out.
termsAndConditions
boolean
必填
Indicates the campaign follows CTIA messaging principles and best practices.
Possible values: true
resellerId
string
UUID of the reseller associated with this campaign. The specified reseller MUST be ACTIVE.
响应载荷
id
string
UUID of the campaign.
name
string
Campaign name
subscription
object
Describes status of Campaign Subscription
显示子属性
subscription.status
string
Possible values: active, inactive, canceling
subscription.subscribedAt
string
Timestamp (UTC) when the subscription became active.
subscription.updatedAt
string
Timestamp (UTC) when the subscription was last updated.
subscription.cancelledAt
string
Timestamp (UTC) when the subscription was cancelled.
status
string
Campaign status
Possible values: DRAFT, FAILED, PENDING, REJECTED, APPROVED, DECLINED, SUSPENDED, DELETED, EXPIRED
usecase
string
A use case that best matches the purpose of the campaign.
subUsecases
array of string
If use case is MIXED or LOW_VOLUME mixed an array of 2-5 use cases.
description
string
A detailed description of what the campaign is for.
embeddedLink
boolean
Whether messages will contain links. Provide at least one sample containing a link.
embeddedPhone
boolean
Whether messages will contain phone number. Provide at least one sample containing a phone number.
numberPool
boolean
Whether a campaign will be associated with more than 50 numbers e.g. customer service use case.
ageGated
boolean
Whether a campaign contains age-gated content based on carrier/ctia guidelines.
directLending
boolean
Whether a campaign includes content related to direct lending or loan arrangements.
subscriberOptin
boolean
Confirm customer opt in is collected and processed.
subscriberOptout
boolean
Confirm customer opt out is collected and processed.
subscriberHelp
boolean
Confirm an info message is returned if a customer sends "HELP".
samples
array of string
Between 1-5 sample messages, each up to 1024 characters (empty until the campaign is submitted). If directLending, embeddedPhone, embeddedLink is true provide relevant examples.
messageFlow
string
Provide details of how the customer will opt into this campaign. If you have a live web opt-in provide the URL and ensure the page has details on the T&Cs/data collection for opting in, and how to opt out.
helpMessage
string
Help message of the campaign. A help message shall state the name of the service, contact (email or call centre), OPT IN and OPT OUT keywords.
helpKeywords
string
A comma separated list of keywords. Support of the word HELP is the minimum requirement for requesting help/info.
optoutKeywords
string
A comma separated list of keywords. Support of the word STOP is the minimum requirement for OPT OUT.
optinKeywords
string
A comma separated list of keywords. Support of the word START is the minimum requirement for OPT OUT.
optinMessage
string
Provide an example of the message that will be sent after a customer has opted in.
optoutMessage
string
Provide an example of the message that will be sent after a customer has opted out.
termsAndConditions
boolean
Indicates the campaign follows CTIA messaging principles and best practices.
brandId
string
UUID of the brand associated with this campaign. The specified brand MUST be APPROVED.
resellerId
string
UUID of the reseller associated with this campaign. The specified reseller MUST be ACTIVE.
rejection
object
Rejection details
显示子属性
rejection.description
string
必填
Rejection description
rejection.code
string
Rejection code
attachments
array of object
Attachments associated with this campaign.
显示子属性
attachments.id
string
必填
The ID of the attachment.
attachments.status
string
必填
Attachment status
Possible values: PENDING, ACTIVE, PENDING_DELETION, DELETED, FAILED, FAILED_DELETION
attachments.createdAt
string
必填
Timestamp (UTC) when the attachment was created.
attachments.updatedAt
string
必填
Timestamp (UTC) when the attachment was last updated.
attachments.filename
string
必填
The original name of the file when it was uploaded.
attachments.mediaUrl
string
The URL to download the attachment.
attachments.contentType
string
必填
The detected MIME type of the file.
createdAt
string
Timestamp (UTC) when the campaign was created.
updatedAt
string
Timestamp (UTC) when the campaign was last updated.
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/tcr-brands/{brandId}/campaigns' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
The following example will create a new campaign that will be submitted for registration with the campaign registry. Your associated brand must be approved
代码示例
curl --location 'https://api.bird.com/workspaces/<your-workspace-id>/tcr-brands/<your-brand-id>/campaigns' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
  "name": "",
  "usecase": "",
  "subUsecases": [
    ""
  ],
  "description": "",
  "embeddedLink": ,
  "embeddedPhone": ,
  "numberPool": ,
  "ageGated": ,
  "directLending": ,
  "subscriberOptin": ,
  "subscriberOptout": ,
  "subscriberHelp": ,
  "samples": [
    ""
  ],
  "messageFlow": "",
  "helpMessage": "",
  "helpKeywords": "",
  "optoutKeywords": "",
  "optinKeywords": "",
  "optinMessage": "",
  "optoutMessage": "",
  "termsAndConditions": true
}'
Same as done before, you can create a workspace subscription to listen to Channel Status changes

Channel Updates Subscription

The example below will create a workspace-wide subscription tracking all updates regarding your channels you can use to track channels' status changes
代码示例
curl --location 'https://api.bird.com/organizations/<your-organization-id>/workspaces/<your-workspace-id>/webhook-subscriptions' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
  "service": "channels",
  "event": "channel.updated",
  "url": "myURL.com",
  "signingKey": "mysecretkey",
  "eventFilters": [
  ]
}'

Install a channel connector

A-Sync : this will start a background process that may require some time to complete. A Get call may be required to to retrieve the final result .
POST
/workspaces/{workspaceId}/connectors
Create a new connector from a template.
请求载荷
name
string
必填
connectorTemplateRef
string
arguments
object
For SMS connectors (sms-messagebird:1), channelMessageType is required and must be one of promotional, transactional, conversational, emergency, 2fa.
securityArguments
object
Provide the arguments required by the security scheme(s) on the connector template.
channelConversationalStatusEnabled
boolean
invitationToken
string
响应载荷
id
string
必填
The ID of this connector.
workspaceId
string
The ID of the workspace this connector belongs to.
routingKey
string
name
string
必填
The Name of this connector.
region
string
The Region in which this connector was installed in.
description
string
The Description of this connector.
arguments
object
Pre-configured arguments for this connector.
channel
object
显示子属性
channel.channelId
string
必填
channel.platform
string
必填
number
object
显示子属性
number.profileId
string
必填
number.numberId
string
必填
number.phoneNumber
string
number.variables
object
number.capabilities
string
Capabilities of a number. That would be represented with joined string of capabilities with comma.
number.numberType
string
Type of the number; could be mobile, tollfree, local, etc.
number.endpointType
string
Type of the endpoint; could be long-code-number, short-code-number, alpha-number, etc.
number.country
string
Country code of the number.
number.profileAttachments
array of object
显示子属性
number.profileAttachments.capability
string
number.profileAttachments.profileId
string
number.profileAttachments.variables
object
显示子属性
number.profileAttachments.variables.connectorId
string
connectorTemplateSlug
string
The slug for the template this connector is based on.
connectorTemplateRef
string
The ref for the template this connector is based on.
dataFetching
object
显示子属性
dataFetching.schedule
string
dataFetching.streams
array of object
显示子属性
dataFetching.streams.eventName
string
dataFetching.streams.streamName
string
dataFetching.streams.eventStreamName
string
dataFetching.streams.filter
string
dataFetching.streams.initialState
string
dataFetching.streams.endCondition
string
dataFetching.streams.incremental
boolean
dataFetching.streams.duplicatesFilterCapacity
number
dataFetching.streams.cursorField
string
dataCapture
object
显示子属性
dataCapture.captureEndpoint
string
createdAt
string
必填
When the connector was created.
updatedAt
string
When the connector was last updated.
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/connectors' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
The following example will create a new SMS connector with an approved 10DLC campaign and US local number:
代码示例
curl --location 'https://api.bird.com/workspaces/<your-workspace-id>/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
    "connectorTemplateRef": "sms-messagebird:1",
    "name": "SMS channel",
    "arguments": {
        "phoneNumberId": "",
        "useCaseId": "",
        "channelMessageType": "",
    },
    "channelConversationalStatusEnabled": true
}

Get your channel id

Once you have created your SMS connector, this will create an SMS channel. You can then get your channel ID to before setting up channel webhooks
If you are listening to channels events the channelId will be returned with the first channel updated event
GET
/workspaces/{workspaceId}/connectors/{connectorId}
Show the details of a specific connector.
响应载荷
id
string
必填
The ID of this connector.
workspaceId
string
The ID of the workspace this connector belongs to.
routingKey
string
name
string
必填
The Name of this connector.
region
string
The Region in which this connector was installed in.
description
string
The Description of this connector.
arguments
object
Pre-configured arguments for this connector.
channel
object
显示子属性
channel.channelId
string
必填
channel.platform
string
必填
number
object
显示子属性
number.profileId
string
必填
number.numberId
string
必填
number.phoneNumber
string
number.variables
object
number.capabilities
string
Capabilities of a number. That would be represented with joined string of capabilities with comma.
number.numberType
string
Type of the number; could be mobile, tollfree, local, etc.
number.endpointType
string
Type of the endpoint; could be long-code-number, short-code-number, alpha-number, etc.
number.country
string
Country code of the number.
number.profileAttachments
array of object
显示子属性
number.profileAttachments.capability
string
number.profileAttachments.profileId
string
number.profileAttachments.variables
object
显示子属性
number.profileAttachments.variables.connectorId
string
connectorTemplateSlug
string
The slug for the template this connector is based on.
connectorTemplateRef
string
The ref for the template this connector is based on.
dataFetching
object
显示子属性
dataFetching.schedule
string
dataFetching.streams
array of object
显示子属性
dataFetching.streams.eventName
string
dataFetching.streams.streamName
string
dataFetching.streams.eventStreamName
string
dataFetching.streams.filter
string
dataFetching.streams.initialState
string
dataFetching.streams.endCondition
string
dataFetching.streams.incremental
boolean
dataFetching.streams.duplicatesFilterCapacity
number
dataFetching.streams.cursorField
string
dataCapture
object
显示子属性
dataCapture.captureEndpoint
string
createdAt
string
必填
When the connector was created.
updatedAt
string
When the connector was last updated.
代码示例
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/connectors/{connectorId}' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
The following example will get the connector you have created in the previous step. Parse the channel.channelId to get the id of your new SMS channel
代码示例
curl --location 'https://api.bird.com/workspaces/<your-workspace-id>/connectors/<your-connector-id>' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>'

Setup channel message webhooks

Once your channel has been installed you will then need to setup a webhook subscription to receive status updates and inbound messages
POST
/organizations/{organizationId}/workspaces/{workspaceId}/webhook-subscriptions
To start receiving notifications via webhooks, the first step is to create a subscription. A webhook subscription specifies the destination URL for events and defines how they should be filtered. During setup, you can select which events to send to the specified URL. You can create multiple webhook subscriptions to route different types of events to various URLs as needed. Event filters are applied using AND operators, meaning that all specified criteria must be met for an event to be sent. If you want to handle multiple interactionTypes, you'll need to create separate webhook subscriptions for each.
请求载荷
service
string
必填
The service that the webhook is subscribed to. For example, to get events regarding channels, the service would be channels.
Possible values: channels, numbers, payments, conversations, templates
event
string
必填
The event name identifies the webhook event, such as sms.outbound for notifications about SMS messages being sent.
eventFilters
array of object
Filters to apply to the events that are sent to the webhook. This is a key-value list of filters that are specific to the service that the webhook is subscribed to. One example would be a key of channelId and a value of a UUID (in string format) that represents a channel.
显示子参数
eventFilters.key
string
必填
Possible values: channelId, platformId, channelStatus, interactionType, messageStatus, status, eventDestination, navigatorId
eventFilters.value
string
必填
template
string
url
string
必填
The URL of the webhook is used to send events to the webhook. The URL must be a valid URL that respects the established pattern and is accessible from the internet.
signingKey
string
The signing key for the webhook and can be used to verify the authenticity of the webhook.
oauth2
object
OAuth 2.0 client credentials configuration.
显示子参数
oauth2.tokenUrl
string
必填
The OAuth 2.0 token endpoint where access tokens are requested.
oauth2.clientId
string
必填
The OAuth 2.0 client identifier.
oauth2.clientSecret
string
必填
The OAuth 2.0 client secret.
oauth2.scopes
array of string
OAuth 2.0 scopes to request.
响应载荷
id
string
必填
The unique identifier for the webhook subscription. This identifier is used to reference the webhook subscription in other API calls.
organizationId
string
必填
workspaceId
string
必填
service
string
必填
The service that the webhook is subscribed to. For example, to get events regarding channels, the service would be channels.
Possible values: channels, numbers, payments, conversations, templates
event
string
必填
The event name identifies the webhook event, such as sms.outbound for notifications about SMS messages being sent.
eventFilters
array of object
显示子属性
eventFilters.key
string
必填
Possible values: channelId, platformId, channelStatus, interactionType, messageStatus, status, eventDestination, navigatorId
eventFilters.value
string
必填
template
string
Used for our Exit APIs for Twilio and Sinch. More information can be found here for Twilio and here for Sinch.
url
string
必填
The URL of the webhook is used to send events to the webhook. The URL must be a valid URL that respects the established pattern and is accessible from the internet.
signingKey
string
The signing key for the webhook and can be used to verify the authenticity of the webhook.
oauth2
object
OAuth 2.0 client credentials configuration.
显示子属性
oauth2.tokenUrl
string
必填
The OAuth 2.0 token endpoint where access tokens are requested.
oauth2.clientId
string
必填
The OAuth 2.0 client identifier.
oauth2.scopes
array of string
OAuth 2.0 scopes to request.
status
string
必填
Possible values: active, inactive
statusReason
string
A human-readable explanation for the current status of the webhook subscription.
createdAt
string
updatedAt
string
代码示例
curl -X POST 'https://api.bird.com/organizations/{organizationId}/workspaces/{workspaceId}/webhook-subscriptions' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
The following request example will create a new SMS subscription for inbound and outbound messages
Inbound messages
代码示例
curl --location 'https://api.bird.com/organizations/<your-organization-id>/workspaces/<your-workspace-id>/webhook-subscriptions' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
    "signingKey": "my-signing-key",
    "eventFilters": [
        {
            "key": "channelId",
            "value": "<your-channel-id>"
        }
    ],
    "event": "sms.inbound",
    "service": "channels",
    "url": "<your-webhook-url>"
}'
Outbound messages
代码示例
curl --location 'https://api.bird.com/organizations/<your-organization-id>/workspaces/<your-workspace-id>/webhook-subscriptions' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
    "signingKey": "my-signing-key",
    "eventFilters": [
        {
            "key": "channelId",
            "value": "<your-channel-id>"
        }
    ],
    "event": "sms.outbound",
    "service": "channels",
    "url": "<your-webhook-url>"
}'

Confirm a 10DLC Channels Readiness to send SMS traffic

A-Sync : this will start a background process that may require some time to complete. A Get call may be required to retrieve the final result
10DLC numbers can only send traffic to the USA when linked to a campaign. Number Campaign link is an A-sync process requiring confirmations from multiple carriers.
The bird will only consider a number linked if all major USA carriers acknowledge the links. Delays in carrier acknowledgment can vary between 15 minutes to several hours and are usually longer around peak linking hours (afternoon/evening USA Pacific time)
Based on whether you have subscribed or not to channel events, you can determine the readiness of a given channel in 2 ways

Option 1: you are subscribed to channel updates

if you have a "channel.updated" event subscription, each change in a channel status will trigger an event. You can associate those events to the number you have used to install the channel by referring to "identifier" field. A channel ready to send SMS will have "status": "active".
代码示例
{
  "service": "channels",
  "event": "channel.created",
  "payload": {
    "id": "f5d391a8-29b6-5092-940c-9a1cd7d06f30",
    "status": "active",
    "platformId": "sms-messagebird",
    "name": "SMS - 🇺🇸 +19802683122",
    "connectorId": "c8a93146-68e5-4e60-a77c-659877768bec",
    "identifier": "+19802683122",
    "preferences": {
      "disableProfileFetching": false,
      "explicitMarketingOptOut": false,
      "trackAdInitiatedThreads": false
    },
    "capabilities": {
      "messaging": {
        "displayName": "Messaging capabilities",
        "status": "active",
        "name": "",
        "expiresAt": "1970-01-01T00:00:00Z",
        "version": 0,
        "createdAt": "0001-01-01T00:00:00Z",
        "updatedAt": "0001-01-01T00:00:00Z",
        "outgoing": {
          "displayName": "Capability to send outgoing messages",
          "status": "active",
          "name": "",
          "version": 0,
          "createdAt": "1970-01-01T00:00:00Z",
          "updatedAt": "1970-01-01T00:00:00Z",
          "mms": {
            "displayName": "Capability to send outgoing mms messages",
            "status": "inactive",
            "name": "",
            "version": 0,
            "createdAt": "1970-01-01T00:00:00Z",
            "updatedAt": "1970-01-01T00:00:00Z"
          }
        },
        "incoming": {
          "displayName": "Capability to receive messages",
          "status": "active",
          "name": "",
          "version": 0,
          "createdAt": "1970-01-01T00:00:00Z",
          "updatedAt": "1970-01-01T00:00:00Z"
        }
      }
    },
    "useCaseId": "b43d79ab-3cbb-4a4a-9461-5da533f0cb18",
    "useCaseType": "marketing",
    "createdAt": "2024-09-20T12:08:57.098Z",
    "updatedAt": "2024-09-20T12:08:57.098Z"
  }
}

Option 2: you are NOT subscribed to channel updates

if so you can query the GET connector status endpoint and wait for the "useCaseStatus" to turn to "ok"

The channel cannot terminate SMS to the USA

This could happen if the number linked to its campaigns is not acknowledged or the 10DLC registration experiences issues. In this case, the "useCaseStatus" 's value will not be "ok"
代码示例
"name": "useCaseStatus",
                "displayName": "UseCase Status",
                "assertions": [
                    {
                        "name": "brand",
                        "displayName": "",
                        "description": "",
                        "status": "ok"
                    },
                    {
                        "name": "campaign",
                        "displayName": "",
                        "description": "",
                        "status": "ok"
                    },
                    {
                        "name": "checks whether number is linked to campaign",
                        "displayName": "",
                        "description": "",
                        "status": "warning",
                        "message": "Number status is INACTIVE"
                    }
                ],
                "status": "warning"

The channel can terminate messages to the USA

In this case "useCaseStatus" will be "ok"
代码示例
"name": "useCaseStatus",
                "displayName": "UseCase Status",
                "assertions": [
                    {
                        "name": "brand",
                        "displayName": "",
                        "description": "",
                        "status": "ok"
                    },
                    {
                        "name": "campaign",
                        "displayName": "",
                        "description": "",
                        "status": "ok"
                    },
                    {
                        "name": "checks whether number is linked to campaign",
                        "displayName": "",
                        "description": "",
                        "status": "ok"
                    }
                ],
                "status": "ok"
```