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.
Parametri di query
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
Payload della risposta
results
array of object
obbligatorio
Mostra attributi secondari
results.id
string
obbligatorio
The unique identifier of the stock item.
results.countryCode
string
obbligatorio
The country code in ISO 3166-1 alpha-2 format.
results.type
string
obbligatorio
The type of long code number.
Possible values: local, national, toll-free, mobile
results.numberString
string
obbligatorio
results.capabilities
object
obbligatorio
Capabilities of the phone number. It shows if the phone number supports voice, sms and/or mms.
Mostra attributi secondari
results.capabilities.voice
object
obbligatorio
Mostra attributi secondari
results.capabilities.voice.inbound
boolean
obbligatorio
Whether the number supports inbound use cases.
results.capabilities.voice.outbound
boolean
obbligatorio
Whether the number supports outbound use cases.
results.capabilities.sms
object
obbligatorio
Mostra attributi secondari
results.capabilities.sms.inbound
boolean
obbligatorio
Whether the number supports inbound use cases.
results.capabilities.sms.outbound
boolean
obbligatorio
Whether the number supports outbound use cases.
results.capabilities.mms
object
obbligatorio
Mostra attributi secondari
results.capabilities.mms.inbound
boolean
obbligatorio
Whether the number supports inbound use cases.
results.capabilities.mms.outbound
boolean
obbligatorio
Whether the number supports outbound use cases.
results.capabilities.whatsapp
object
Mostra attributi secondari
results.capabilities.whatsapp.inbound
boolean
obbligatorio
Whether the number supports inbound use cases.
results.capabilities.whatsapp.outbound
boolean
obbligatorio
Whether the number supports outbound use cases.
results.monthlyPrice
object
obbligatorio
Money combines an amount of money with its currency.
Mostra attributi secondari
results.monthlyPrice.currencyCode
string
obbligatorio
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
obbligatorio
results.monthlyPrice.exponent
integer
obbligatorio
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.
Esempio di codice
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.
Esempio di codice
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.
Payload della richiesta
numberStockItemIds
array of string
obbligatorio
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.
Payload della risposta
results
array of object
obbligatorio
Mostra attributi secondari
results.id
string
obbligatorio
The unique identifier of the long code number. The endpoint ID is the same.
results.endpointId
string
obbligatorio
The unique identifier of the endpoint. The long conde ID is the same.
results.numberString
string
obbligatorio
The phone number in E.164 format.
results.countryCode
string
obbligatorio
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
obbligatorio
Capabilities of the phone number. It shows if the phone number supports voice, sms and/or mms.
Mostra attributi secondari
results.capabilities.voice
object
obbligatorio
Mostra attributi secondari
results.capabilities.voice.inbound
boolean
obbligatorio
Whether the number supports inbound use cases.
results.capabilities.voice.outbound
boolean
obbligatorio
Whether the number supports outbound use cases.
results.capabilities.sms
object
obbligatorio
Mostra attributi secondari
results.capabilities.sms.inbound
boolean
obbligatorio
Whether the number supports inbound use cases.
results.capabilities.sms.outbound
boolean
obbligatorio
Whether the number supports outbound use cases.
results.capabilities.mms
object
obbligatorio
Mostra attributi secondari
results.capabilities.mms.inbound
boolean
obbligatorio
Whether the number supports inbound use cases.
results.capabilities.mms.outbound
boolean
obbligatorio
Whether the number supports outbound use cases.
results.capabilities.whatsapp
object
Mostra attributi secondari
results.capabilities.whatsapp.inbound
boolean
obbligatorio
Whether the number supports inbound use cases.
results.capabilities.whatsapp.outbound
boolean
obbligatorio
Whether the number supports outbound use cases.
results.createdAt
string
obbligatorio
results.updatedAt
string
obbligatorio
results.order
object
The order that created this long code number. It contains information such as the capabilities, order status and type.
Mostra attributi secondari
results.order.countryCode
string
obbligatorio
The country code in ISO 3166-1 alpha-2 format.
results.order.type
string
obbligatorio
The type of long code number.
Possible values: local, national, toll-free, mobile
results.order.capabilities
array of string
obbligatorio
results.order.prefix
string
results.order.status
string
obbligatorio
Possible values: draft, submitted, processing, fulfilled, rejected, cancelled
results.order.createdAt
string
obbligatorio
results.order.updatedAt
string
obbligatorio
results.deprovisionAt
string
The date and time when the long code number should be deprovisioned.
results.endpoint
object
obbligatorio
A representation of an endpoint. It contains details such as the capabilities, dependencies, and more.
Mostra attributi secondari
results.endpoint.id
string
obbligatorio
The ID of the endpoint.
results.endpoint.type
string
obbligatorio
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
obbligatorio
The unique identifier of the instance.
results.endpoint.name
string
obbligatorio
The name of the endpoint. For some cases it will be the number in international format as string.
results.endpoint.capabilities
array of object
obbligatorio
Mostra attributi secondari
results.endpoint.capabilities.name
string
obbligatorio
Possible values: sms
results.endpoint.capabilities.inbound
object
Mostra attributi secondari
results.endpoint.capabilities.inbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.inbound.issues
array of string
results.endpoint.capabilities.outbound
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.outbound.destinationStatuses
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.destinationStatuses.active
number
results.endpoint.capabilities.outbound.destinationStatuses.inactive
number
results.endpoint.capabilities.outbound.destinationStatuses.available
number
results.endpoint.capabilities.outbound.destinationStatuses.unavailable
number
results.endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
results.endpoint.capabilities.outbound.issues
array of string
results.endpoint.capabilities.name
string
obbligatorio
Possible values: mms
results.endpoint.capabilities.inbound
object
Mostra attributi secondari
results.endpoint.capabilities.inbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.inbound.issues
array of string
results.endpoint.capabilities.outbound
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.outbound.destinationStatuses
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.destinationStatuses.active
number
results.endpoint.capabilities.outbound.destinationStatuses.inactive
number
results.endpoint.capabilities.outbound.destinationStatuses.available
number
results.endpoint.capabilities.outbound.destinationStatuses.unavailable
number
results.endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
results.endpoint.capabilities.outbound.issues
array of string
results.endpoint.capabilities.name
string
obbligatorio
Possible values: voice
results.endpoint.capabilities.inbound
object
Mostra attributi secondari
results.endpoint.capabilities.inbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.inbound.issues
array of string
results.endpoint.capabilities.outbound
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.outbound.destinationStatuses
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.destinationStatuses.active
number
results.endpoint.capabilities.outbound.destinationStatuses.inactive
number
results.endpoint.capabilities.outbound.destinationStatuses.available
number
results.endpoint.capabilities.outbound.destinationStatuses.unavailable
number
results.endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
results.endpoint.capabilities.outbound.issues
array of string
results.endpoint.capabilities.useCaseType
string
Possible values: contact-centre
results.endpoint.capabilities.name
string
obbligatorio
Possible values: whatsapp
results.endpoint.capabilities.inbound
object
Mostra attributi secondari
results.endpoint.capabilities.inbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.inbound.issues
array of string
results.endpoint.capabilities.outbound
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.outbound.destinationStatuses
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.destinationStatuses.active
number
results.endpoint.capabilities.outbound.destinationStatuses.inactive
number
results.endpoint.capabilities.outbound.destinationStatuses.available
number
results.endpoint.capabilities.outbound.destinationStatuses.unavailable
number
results.endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
results.endpoint.capabilities.outbound.issues
array of string
results.endpoint.capabilities.name
string
obbligatorio
Possible values: email
results.endpoint.capabilities.inbound
object
Mostra attributi secondari
results.endpoint.capabilities.inbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.inbound.issues
array of string
results.endpoint.capabilities.outbound
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.outbound.destinationStatuses
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.destinationStatuses.active
number
results.endpoint.capabilities.outbound.destinationStatuses.inactive
number
results.endpoint.capabilities.outbound.destinationStatuses.available
number
results.endpoint.capabilities.outbound.destinationStatuses.unavailable
number
results.endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
results.endpoint.capabilities.outbound.issues
array of string
results.endpoint.capabilities.name
string
obbligatorio
Possible values: rcs-google
results.endpoint.capabilities.inbound
object
Mostra attributi secondari
results.endpoint.capabilities.inbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.inbound.issues
array of string
results.endpoint.capabilities.outbound
object
Mostra attributi secondari
results.endpoint.capabilities.outbound.status
string
obbligatorio
Possible values: active, inactive, available, unavailable
results.endpoint.capabilities.outbound.destinationStatuses
object
Mostra attributi secondari
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.
Mostra attributi secondari
results.endpoint.dependencies.type
string
Possible values: connector
results.endpoint.dependencies.connectorId
string
obbligatorio
results.endpoint.dependencies.connectorTemplateRef
string
obbligatorio
results.endpoint.dependencies.capabilities
array of string
results.endpoint.issues
array of string
results.endpoint.provisioningStatus
string
obbligatorio
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.
Mostra attributi secondari
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
obbligatorio
results.endpoint.updatedAt
string
obbligatorio
Esempio di codice
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)
Esempio di codice
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.
Payload della richiesta
service
string
obbligatorio
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
obbligatorio
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.
Mostra parametri secondari
eventFilters.key
string
obbligatorio
Possible values: channelId, platformId, channelStatus, interactionType, messageStatus, status, eventDestination, navigatorId
eventFilters.value
string
obbligatorio
template
string
url
string
obbligatorio
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.
Mostra parametri secondari
oauth2.tokenUrl
string
obbligatorio
The OAuth 2.0 token endpoint where access tokens are requested.
oauth2.clientId
string
obbligatorio
The OAuth 2.0 client identifier.
oauth2.clientSecret
string
obbligatorio
The OAuth 2.0 client secret.
oauth2.scopes
array of string
OAuth 2.0 scopes to request.
Payload della risposta
id
string
obbligatorio
The unique identifier for the webhook subscription. This identifier is used to reference the webhook subscription in other API calls.
organizationId
string
obbligatorio
workspaceId
string
obbligatorio
service
string
obbligatorio
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
obbligatorio
The event name identifies the webhook event, such as sms.outbound for notifications about SMS messages being sent.
eventFilters
array of object
Mostra attributi secondari
eventFilters.key
string
obbligatorio
Possible values: channelId, platformId, channelStatus, interactionType, messageStatus, status, eventDestination, navigatorId
eventFilters.value
string
obbligatorio
template
string
url
string
obbligatorio
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.
Mostra attributi secondari
oauth2.tokenUrl
string
obbligatorio
The OAuth 2.0 token endpoint where access tokens are requested.
oauth2.clientId
string
obbligatorio
The OAuth 2.0 client identifier.
oauth2.scopes
array of string
OAuth 2.0 scopes to request.
status
string
obbligatorio
Possible values: active, inactive
statusReason
string
A human-readable explanation for the current status of the webhook subscription.
createdAt
string
updatedAt
string
Esempio di codice
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
Esempio di codice
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
Esempio di codice
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.
Payload della richiesta
entityType
string
obbligatorio
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
obbligatorio
Display or marketing name your brand.
companyName
string
obbligatorio
Legal company name. This should match the legal company name used to register your EIN/Tax ID.
ein
string
obbligatorio
Government assigned corporate tax ID. EIN is 9-digits in the U.S.
einIssuingCountry
string
obbligatorio
The 2 letter ISO country of registration submitted with your EIN / Tax ID registration.
phone
string
obbligatorio
Valid phone number in e.164 international format.
street
string
obbligatorio
Street number and name.
city
string
obbligatorio
City name
state
string
obbligatorio
State. Must be a 2 letter state code for US states.
postalCode
string
obbligatorio
Postal code. Must be a 5 digit zip code for the United States.
country
string
obbligatorio
ISO 2 character country code.
email
string
obbligatorio
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
obbligatorio
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.
Payload della risposta
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
obbligatorio
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
obbligatorio
Display or marketing name your brand.
companyName
string
obbligatorio
Legal company name. This should match the legal company name used to register your EIN/Tax ID.
ein
string
obbligatorio
Government assigned corporate tax ID. EIN is 9-digits in the U.S.
einIssuingCountry
string
obbligatorio
The 2 letter ISO country of registration submitted with your EIN / Tax ID registration.
phone
string
obbligatorio
Valid phone number in e.164 international format.
street
string
obbligatorio
Street number and name.
city
string
obbligatorio
City name
state
string
obbligatorio
State. Must be a 2 letter state code for US states.
postalCode
string
obbligatorio
Postal code. Must be a 5 digit zip code for the United States.
country
string
obbligatorio
ISO 2 character country code.
email
string
obbligatorio
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
obbligatorio
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
Mostra attributi secondari
rejection.description
string
obbligatorio
Rejection description
rejection.code
string
Rejection code
Esempio di codice
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.
Esempio di codice
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.
Payload della richiesta
class
string
obbligatorio
Identifies the vetting classification.
Possible values: STANDARD
vettingProviderId
string
External vetting provider ID for the brand.
Payload della risposta
id
string
obbligatorio
Unique ID that identifies a vetting transaction performed by a vetting provider.
brandId
string
obbligatorio
createdAt
string
obbligatorio
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
obbligatorio
Identifies the vetting request status.
Possible values: PENDING, REJECTED, FAILED, APPROVED, EXPIRED
vettingProviderId
string
obbligatorio
External vetting provider ID for the Brand vetting.
token
string
score
string
obbligatorio
Brand vetting score (0-100). Higher is better.
class
string
obbligatorio
Identifies the vetting classification.
Possible values: STANDARD
reasons
array of string
A list of reasons for FAILED vetting.
Esempio di codice
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
Esempio di codice
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
Parametri di query
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.
Payload della risposta
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
obbligatorio
Mostra attributi secondari
results.id
string
UUID of the reseller.
results.organizationId
string
results.status
string
Reseller status
Possible values: FAILED, PENDING, ACTIVE, DELETED
results.companyName
string
obbligatorio
Legal company name. This should match the legal company name used to register your EIN/Tax ID.
results.phone
string
obbligatorio
Valid phone number in e.164 international format.
results.email
string
obbligatorio
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.
Esempio di codice
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.
Payload della richiesta
name
string
obbligatorio
Campaign name
usecase
string
obbligatorio
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
obbligatorio
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
obbligatorio
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/{workspaceId}/tcr-brands/{brandId}/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
obbligatorio
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
obbligatorio
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
obbligatorio
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.
Payload della risposta
id
string
UUID of the campaign.
name
string
Campaign name
subscription
object
Describes status of Campaign Subscription
Mostra attributi secondari
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
Mostra attributi secondari
rejection.description
string
obbligatorio
Rejection description
rejection.code
string
Rejection code
attachments
array of object
Attachments associated with this campaign.
Mostra attributi secondari
attachments.id
string
obbligatorio
The ID of the attachment.
attachments.status
string
obbligatorio
Attachment status
Possible values: PENDING, ACTIVE, PENDING_DELETION, DELETED, FAILED, FAILED_DELETION
attachments.createdAt
string
obbligatorio
Timestamp (UTC) when the attachment was created.
attachments.updatedAt
string
obbligatorio
Timestamp (UTC) when the attachment was last updated.
attachments.filename
string
obbligatorio
The original name of the file when it was uploaded.
attachments.mediaUrl
string
The URL to download the attachment.
attachments.contentType
string
obbligatorio
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.
Esempio di codice
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
Esempio di codice
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
}'(Optional) create a workspace subscription to list to channel related events
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
Esempio di codice
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.
Payload della richiesta
name
string
obbligatorio
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
Payload della risposta
id
string
obbligatorio
The ID of this connector.
workspaceId
string
The ID of the workspace this connector belongs to.
routingKey
string
name
string
obbligatorio
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
Mostra attributi secondari
channel.channelId
string
obbligatorio
channel.platform
string
obbligatorio
number
object
Mostra attributi secondari
number.profileId
string
obbligatorio
number.numberId
string
obbligatorio
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
Mostra attributi secondari
number.profileAttachments.capability
string
number.profileAttachments.profileId
string
number.profileAttachments.variables
object
Mostra attributi secondari
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
Mostra attributi secondari
dataFetching.schedule
string
dataFetching.streams
array of object
Mostra attributi secondari
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
Mostra attributi secondari
dataCapture.captureEndpoint
string
createdAt
string
obbligatorio
When the connector was created.
updatedAt
string
When the connector was last updated.
Esempio di codice
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:
Esempio di codice
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
}| Property | Type | Description | Required |
|---|---|---|---|
| connectorTemplateRef | string | Set as sms-messagebird:1 | Yes |
| name | string | The name of your connector e.g. My SMS channel | Yes |
| arguments.phoneNumberId | string | The ID of the number you created above | Yes |
| arguments.channelMessageType | string | The type of traffic that will be sent through this channel | Yes |
| arguments.useCaseId | string | The ID of your campaign | Yes |
| channelConversationalStatusEnabled | boolean | If true incoming messages will create new conversations in Inbox | No |
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.
Payload della risposta
id
string
obbligatorio
The ID of this connector.
workspaceId
string
The ID of the workspace this connector belongs to.
routingKey
string
name
string
obbligatorio
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
Mostra attributi secondari
channel.channelId
string
obbligatorio
channel.platform
string
obbligatorio
number
object
Mostra attributi secondari
number.profileId
string
obbligatorio
number.numberId
string
obbligatorio
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
Mostra attributi secondari
number.profileAttachments.capability
string
number.profileAttachments.profileId
string
number.profileAttachments.variables
object
Mostra attributi secondari
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
Mostra attributi secondari
dataFetching.schedule
string
dataFetching.streams
array of object
Mostra attributi secondari
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
Mostra attributi secondari
dataCapture.captureEndpoint
string
createdAt
string
obbligatorio
When the connector was created.
updatedAt
string
When the connector was last updated.
Esempio di codice
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
Esempio di codice
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.
Payload della richiesta
service
string
obbligatorio
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
obbligatorio
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.
Mostra parametri secondari
eventFilters.key
string
obbligatorio
Possible values: channelId, platformId, channelStatus, interactionType, messageStatus, status, eventDestination, navigatorId
eventFilters.value
string
obbligatorio
template
string
url
string
obbligatorio
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.
Mostra parametri secondari
oauth2.tokenUrl
string
obbligatorio
The OAuth 2.0 token endpoint where access tokens are requested.
oauth2.clientId
string
obbligatorio
The OAuth 2.0 client identifier.
oauth2.clientSecret
string
obbligatorio
The OAuth 2.0 client secret.
oauth2.scopes
array of string
OAuth 2.0 scopes to request.
Payload della risposta
id
string
obbligatorio
The unique identifier for the webhook subscription. This identifier is used to reference the webhook subscription in other API calls.
organizationId
string
obbligatorio
workspaceId
string
obbligatorio
service
string
obbligatorio
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
obbligatorio
The event name identifies the webhook event, such as sms.outbound for notifications about SMS messages being sent.
eventFilters
array of object
Mostra attributi secondari
eventFilters.key
string
obbligatorio
Possible values: channelId, platformId, channelStatus, interactionType, messageStatus, status, eventDestination, navigatorId
eventFilters.value
string
obbligatorio
template
string
url
string
obbligatorio
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.
Mostra attributi secondari
oauth2.tokenUrl
string
obbligatorio
The OAuth 2.0 token endpoint where access tokens are requested.
oauth2.clientId
string
obbligatorio
The OAuth 2.0 client identifier.
oauth2.scopes
array of string
OAuth 2.0 scopes to request.
status
string
obbligatorio
Possible values: active, inactive
statusReason
string
A human-readable explanation for the current status of the webhook subscription.
createdAt
string
updatedAt
string
Esempio di codice
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
Esempio di codice
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
Esempio di codice
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>"
}'| Property | Type | Description | Required |
|---|---|---|---|
| signingKey | string | Set your own signing key to validate webhooks | Yes |
| event | string | The event you are subscribing to. For SMS channels either sms.outbound or sms.inbound | Yes |
| event[] | object | Event filters are inclusive, which means you will only get events for filters you add | No |
| eventFilters.key | string | If you do not want events for all events you can add a filter. Eventfilters are inclusive e.g. for each event filter you add you will get those events. Valid filters for channels are channelId | No |
| eventFilters.value | string | The filter value. In this case a channelid. You will get webhooks for this channel | No |
| service | string | The service that will be sending the webhooks. In this case channels | |
| url | string | A valid HTTPS endpoint to receive the webhooks | Yes |
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".
Esempio di codice
{
"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"
Esempio di codice
"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"
Esempio di codice
"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"
```