Sign inGet Started

Update an SMS messaging profile

PATCH
/v1/sms/messaging-profiles/{profile_id}
bird sms messaging-profiles update <profile-id> \
  --default-category transactional \
  --name device-activation
Réponse200
{
  "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"
  ]
}

Changes a messaging profile. Properties you omit keep their value, including those inside inbound and options, and null clears a property that accepts it.

senders and inbound.numbers replace the whole list, so send every entry you want to keep. The change applies to later sends that name the profile; messages already sent keep what they used. Sends and inbound attribution can use the previous settings for up to 60 seconds.

Paramètres

profile_idstring

ID of the messaging profile, as returned when you created or listed profiles.

Corps de la requête

name
string

A new label for the profile. Names are not unique, so two profiles can share one.

senders
array of object

Replaces the profile's senders. Each country appears at most once, and at most one entry omits country_code. Send an empty array to remove them all.

Afficher les paramètres enfants
inbound
object

Changes how the profile receives replies. Omitted properties keep their value.

Afficher les paramètres enfants
inbound.numbers
array of object

Replaces the numbers that receive replies. Send an empty array to remove them all.

Afficher les paramètres enfants
inbound.callback_url
nullable string

The HTTPS URL that receives sms.received events for replies on this profile's numbers, signed with your workspace callback signing secret. Send null to clear it, so replies use options.callback_url, then your webhook subscriptions. While a URL applies, a reply skips your plain webhook endpoints. It must be an absolute HTTPS URL of at most 2048 characters with a public host: an HTTP URL, a malformed one, or a private, loopback or link-local host returns 422.

inbound.outbound_matching
object

Settings 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.

Afficher les paramètres enfants
inbound.outbound_matching.enabled
boolean

Whether replies are paired with the messages they answer. A new profile defaults to false.

inbound.outbound_matching.time_window
string

How 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_category
nullable string

The 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. Send null to clear it.

validity_period
nullable integer

How many seconds a message stays valid before it expires undelivered. Send null to clear it. A send that omits validity_period uses it.

cost_center
nullable string

A label for assigning the cost of this profile's messages. Send null to clear it. A send that omits cost_center uses it.

options
object

Changes the sending options for messages that do not set their own. Omitted properties keep their value.

Afficher les paramètres enfants
callback_events
nullable array

The 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. Send null to deliver every event.

Contenu de la réponse

id
string
obligatoire

Identifier of this profile.

name
string
obligatoire

A label for the profile. Names are not unique, so two profiles can share one.

senders
array of object
obligatoire

The sender for each destination country, and the default sender when an entry has no country_code.

Afficher les attributs enfants
inbound
object
obligatoire

How the profile receives replies. A profile without numbers only sends.

Afficher les attributs enfants
default_category
nullable string
obligatoire

The 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_period
nullable integer
obligatoire

How many seconds a message stays valid before it expires undelivered. Null when none is set. A send that omits validity_period uses it.

cost_center
nullable string
obligatoire

A label for assigning the cost of this profile's messages. Null when none is set. A send that omits cost_center uses it.

options
object
obligatoire

Sending options that messages from this profile use when a message does not set its own.

Afficher les attributs enfants
callback_events
nullable array
obligatoire

The 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_at
string
obligatoire

When the profile was created.

updated_at
string
obligatoire

When the profile was last changed.

Poursuivez avec la documentation, les guides et les exemples sur ce sujet.