Create an SMS messaging profile
/v1/sms/messaging-profilesbird sms messaging-profiles create --body-file - <<'JSON'
{
"name": "device-activation",
"senders": [
{
"country_code": "US",
"sender_id": "snd_01krdgeqcxet5s7t44vh8rt9mg"
}
],
"inbound": {
"numbers": [
{
"number": "+14155550100"
}
]
},
"default_category": "authentication"
}
JSONcurl -X POST "https://us1.platform.bird.com/v1/sms/messaging-profiles" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "device-activation",
"senders": [
{
"country_code": "US",
"sender_id": "snd_01krdgeqcxet5s7t44vh8rt9mg"
}
],
"inbound": {
"numbers": [
{
"number": "+14155550100"
}
]
},
"default_category": "authentication"
}'{
"id": "mpr_01krdgeqcxet5s7t44vh8rt9mg",
"name": "device-activation",
"senders": [
{
"country_code": "US",
"sender_id": "snd_01krdgeqcxet5s7t44vh8rt9mg"
}
],
"inbound": {
"numbers": [
{
"country_code": "US",
"number": "34001"
}
],
"callback_url": "https://receipts.example.com/bird/sms/inbound",
"outbound_matching": {
"enabled": false,
"time_window": "1d"
}
},
"default_category": "authentication",
"validity_period": 3600,
"cost_center": "CC001234",
"options": {
"smart_encoding": false,
"ignore_suppression": false,
"callback_url": "https://receipts.example.com/bird/sms/activation"
},
"callback_events": [
"sms.delivered",
"sms.failed"
]
}
Creates a messaging profile for one program in your workspace.
A profile chooses the sender for each destination country, lists the numbers that receive replies, and sets defaults such as the category and smart encoding. Every sender and number must belong to your workspace, and a number can belong to one profile at a time. A send that names the profile in messaging_profile_id takes its sender, default category, and smart encoding from it when the send leaves them out. The values on a profile are defaults: an explicit from, category, or options.smart_encoding on the send wins.
Request Payload
nameA label for the profile. Names are not unique, so two profiles can share one.
sendersThe sender for each destination country, and optionally a default sender. Each country appears at most once, and at most one entry omits country_code.
inboundHow the profile receives replies. Omit it for a profile that only sends.
default_categoryThe category a free-text send that names this profile uses when it sets none: transactional, marketing, authentication, or service. A template send takes the template's category.
Possible values: transactional, marketing, authentication, service
validity_periodHow many seconds a message stays valid before it expires undelivered. A send that omits validity_period uses it.
cost_centerA label for assigning the cost of this profile's messages. A send that omits cost_center uses it.
optionsSending options for messages that do not set their own. Booleans default to false.
callback_eventsThe events of this profile's outbound messages that go to a callback URL. The list is fixed when a message is accepted, and applies only while the message has a callback URL: an event outside it then reaches neither the URL nor a plain webhook endpoint. Without a callback URL the list has no effect, and every event goes to your webhook endpoints. A value other than sms.accepted, sms.sent, sms.delivered, sms.undelivered, sms.failed, sms.rejected or sms.expired returns 422. sms.received is never filtered. Omit it to deliver every event.
Response Payload
idIdentifier of this profile.
nameA label for the profile. Names are not unique, so two profiles can share one.
sendersThe sender for each destination country, and the default sender when an entry has no country_code.
inboundHow the profile receives replies. A profile without numbers only sends.
Show child attributes
inbound.numbersThe numbers that receive replies for this profile.
inbound.callback_urlThe HTTPS URL that receives sms.received events for replies on this profile's numbers, signed with your workspace callback signing secret. Null when none is set, in which case replies use options.callback_url, then your webhook subscriptions. While a URL applies, a reply skips your plain webhook endpoints.
inbound.outbound_matchingSettings for pairing each reply with the message it answers, reported as the reply's in_reply_to_message. Bird pairs only messages sent from one of this profile's reply numbers while matching is on. Turning it off stops pairing, and turning it back on resumes it for messages still inside their window.
Show child attributes
inbound.outbound_matching.enabledWhether replies are paired with the messages they answer.
inbound.outbound_matching.time_windowHow long after a message is sent a reply can still be paired with it: one hour (1h), 24 hours (1d), or 168 hours (7d). 1d is the default.
Possible values: 1h, 1d, 7d
default_categoryThe category a free-text send that names this profile uses when it sets none: transactional, marketing, authentication, or service. A template send takes the template's category. Null when none is set.
validity_periodHow many seconds a message stays valid before it expires undelivered. Null when none is set. A send that omits validity_period uses it.
cost_centerA label for assigning the cost of this profile's messages. Null when none is set. A send that omits cost_center uses it.
optionsSending options that messages from this profile use when a message does not set its own.
callback_eventsThe events of this profile's outbound messages that go to a callback URL: sms.accepted, sms.sent, sms.delivered, sms.undelivered, sms.failed, sms.rejected, and sms.expired. The list is fixed when a message is accepted, and applies only while the message has a callback URL: an event outside it then reaches neither the URL nor a plain webhook endpoint. Without a callback URL the list has no effect, and every event goes to your webhook endpoints. sms.received is never filtered. Null means every outbound event goes to the URL.
created_atWhen the profile was created.
updated_atWhen the profile was last changed.
Related resources
Continue with the documentation, guides and examples for this topic.