Nothing found

Message ID (formerly SMS ID)

Every message sent through BulkGate gets its own Message ID. It is the only value that lets us trace one specific message — in the portal, in the API response and with the delivery provider. It used to be called SMS ID; it is the same value, only renamed along the way, because we have long stopped sending SMS alone.

What the message ID is

The Message ID is a text identifier of one message to one recipient.

  • BulkGate assigns it automatically the moment it accepts the message. You cannot choose it or change it afterwards.
  • It covers one message to one number. Sending a campaign to a thousand numbers creates a thousand different Message ID values, not one shared one.
  • Its shape differs depending on which interface you send through. Treat it as an opaque string — do not derive the date, the channel or anything else from it, and never try to build one yourself.
Tip

If you need to label messages with a value of your own — an order number, a customer ID — that is what the Tag (TAG) is for, not the Message ID. The difference is described in How it differs from the other identifiers.

Why it used to be called SMS ID

The name SMS ID comes from the time when BulkGate sent SMS only. Today Viber, WhatsApp and RCS travel the same way, so the identifier is called Message ID — in the portal and in the newer interfaces.

The older APIs, however, did not rename their field, so as not to break existing integrations:

Where What the field is called
Portal Message ID
Simple API, Advanced API version 1.0 sms_id
Advanced API version 2.0, Integration API, one-time passwords message_id
Delivery confirmation (webhook) smsID

In all cases it is the same value. So if you take sms_id from a Simple API response and search for it in the history under Message ID, you will find that very message.

Where to find the ID in the portal

  1. In the menu click Reports
  2. Click History
  3. Click the row of the message — the detail expands
  4. The Message ID is on the right side of the detail; a click selects the whole value so you can copy it

It also works the other way round: when you already have the Message ID and want to find the message, open Filter above the table and paste the value into the Message ID field. The same value is included in the history export to CSV.

What the history shows and how to filter it is described in History.

Important

The message text is not kept in the history forever — older records show This message has expired instead. The Message ID and the other details remain.

Where to find the ID in the API response

The interfaces return the Message ID right in the response to the send request — that is the only moment you get it programmatically, so store it at that step.

Interface What the field is called
Simple API sms_id
Advanced API `1.0` sms_id
Advanced API `2.0` message_id
Integration API message_id
One-time passwords message_id

Alongside it, every one of them also returns a part_id array — described in What part_id is.

With bulk sending the response contains a response array with a separate record for each recipient. The Message ID then ends with the sequence number of the message within the batch:

{ "data": { "response": [ { "status": "accepted", "message_id": "transactional-64afe5f28ffc2-0", "part_id": ["transactional-64afe5f28ffc2-0"], "number": "420777777777", "channel": "sms" }, { "status": "accepted", "message_id": "transactional-64afe5f28ffc2-1", "part_id": ["transactional-64afe5f28ffc2-1"], "number": "420777777778", "channel": "sms" } ] } }

What part_id is

A long SMS is not handed over to the operator's network in one piece — it is split into several separate messages that the recipient's phone puts back together. Each of those parts has its own ID, and part_id is the list of them. When and why a message gets split is described in Message concatenation.

The array follows three rules:

  • The last element always matches the Message ID — it carries no suffix.
  • The preceding parts have the suffix _1, _2 and so on, in the order the message is assembled.
  • A message that was not split has a single element in part_id, identical to the Message ID. That covers every single-part SMS as well as all Viber, WhatsApp and RCS messages — those are never split into parts.

So the response for an SMS split into three parts looks like this:

{ "data": { "status": "accepted", "sms_id": "tmpde1bcd4b1d1", "part_id": [ "tmpde1bcd4b1d1_1", "tmpde1bcd4b1d1_2", "tmpde1bcd4b1d1" ], "number": "420777777777" } }
Important

Each part is charged as a separate SMS. The number of elements in part_id is therefore also the number of messages you pay for — three in the example above, even though you sent one.

Tip

For pairing responses and delivery confirmations the Message ID is all you need. The part_id is useful when you want to know at send time how many parts the message broke into, without waiting for it to show up in the history.

Where to find the ID in a webhook

The delivery confirmation arrives at the address you set, and the Message ID is in its smsID parameter. Use it to pair the confirmation with the message you sent.

Where the delivery confirmation address is set is described in Webhooks.

Note

One message can trigger several confirmations with the same smsID — status 2 means the message is queued at the operator and the result will arrive later. Expect to see the same value more than once.

Warning

Incoming messages and replies, which you recognise by status with the value 10, carry no smsID parameter. They are not a confirmation for a message you sent, but a new message from the recipient.

What the message ID is used for

  • Reporting a delivery problem. Without the Message ID we cannot trace a specific message with the delivery provider. The whole procedure is described in Message was not delivered — you can attach up to three different Message ID values to one report.
  • Pairing in your own system. Store the Message ID from the API response alongside the order or the customer, and match incoming delivery confirmations to them by the smsID parameter.
  • Finding a message in the history. The Message ID is the only filter that leads to exactly one message; by number or campaign you will find several.

How it differs from the other identifiers

The message detail in the history shows further identifiers next to the Message ID. They are easy to confuse, yet each answers a different question:

Identifier What it identifies Who sets it
Message ID One message to one recipient BulkGate
Campaign ID A whole campaign, meaning all messages sent together BulkGate
Tag (TAG) Anything you label yourself — an order, a customer, a script run You
Application ID The application the message was sent from BulkGate
Tip

The Tag (TAG) is the only one of them you set yourself. If you fill it in when sending, you can filter the history by it later without knowing any Message ID — handy when you need to find every message belonging to one order.

Was this page helpful?