Correlating Webhook Events with API Records (guid vs. message_handle)
If you're building automation on the API and matching up IDs across webhooks and endpoints, start here. This covers why the IDs look different and how to line them up.
Why the IDs don't match
POST /send-api-message does not return a message ID. It returns a success response with the status, the message type and the phone and line numbers. The identifiers show up later, in two different places, under two different names:
Webhook events (inbound and outbound) include
guidandmessageId.GET /get-messages-apireturns the same message undermessage_handle.
These are not the same ID space, so you can't generate one from the other. Treat them as two separate identifiers for the same message.
How to correlate a send
The reliable way to match a send you triggered to its later webhook event or API record is:
Destination number (the number you sent to)
Message body (exact text sent)
Timestamp (the time you made the send call)
Match on all three, then poll /get-messages-api if you need the message_handle for that record.
A send can wait in a queue before it goes out, so look a few minutes after your call, and sometimes longer. The webhook for an outbound message arrives after the message is handed to the phone, so its time can be later than your call. If you need to line up repeat messages with the same wording, include a unique reference in each message.
Repeat sends and the dedupe window
If you send an identical message body to the same number within an hour of a previous send, the second message is not sent. The API still returns a success response, now with deduped: true, and the original message continues as normal.
To send identical text on purpose (for example, a repeat reminder), do one of these:
Include a unique
idempotencyKeywith each send. It's an optional field in the request body, any string from 1 to 200 characters. With your own key, only your account and that key are compared, so reuse the same key only for a true repeat.Vary the wording slightly, for example with a timestamp or reference number.
The window runs for one hour after the first send, and it's matched on the exact text (case and spacing count). This applies to API sends and to HighLevel, HubSpot and Zapier actions, and it can't be guaranteed in every case. A message that was accepted but later failed to deliver stays deduped for the hour, so resending the same text during that time returns deduped: true and nothing is re-sent. A send that comes back with an error response can be retried straight away.
Close sends work differently: Project Blue skips any text that was already queued to that number, with no time limit.
For everything else on the API (keys, webhooks, and MCP setup), see Project Blue API, Webhooks & MCP.