Skip to main content
Every resource in BlueBubbles — chats, messages, attachments, and handles — is identified by a globally unique identifier (GUID). These GUIDs are not random UUIDs; they follow a structured, human-readable format that encodes the resource type and the address or identifier of the participant involved. Understanding the format helps you construct correct identifiers when calling SDK methods and interpret the values you receive in API responses.

Chat GUID format

Chat GUIDs identify an iMessage conversation. They follow a three-part semicolon-separated format:

Direct conversation GUIDs

For one-on-one conversations, the address is the phone number or Apple ID email of the other participant.
Always include the country code in phone numbers. For US numbers, the country code is +1, so a number like (555) 000-1234 becomes +15550001234.

Group chat GUIDs

Group chats use a server-generated random identifier in the address segment rather than a participant’s contact info. You cannot construct a group chat GUID yourself — you discover it by querying the chats list.

Message GUIDs

Individual messages within a chat each carry their own GUID. Message GUIDs are opaque strings assigned by the iMessage infrastructure and returned to you in API responses. You use them when reacting to a message, replying to it, or fetching a specific message.
You receive message GUIDs in the response body whenever you send or query messages. Store them if you need to reference a message later — for example, to send a reaction.

Attachment GUIDs

Attachments — images, videos, audio messages, and files — each have a GUID returned when you query a message that contains one. Use the attachment GUID to fetch metadata or download the file.

Handle addresses

Handles represent individual participants — effectively a contact address used as an iMessage endpoint. The handle address is the raw phone number or email, without the iMessage;+; prefix that wraps a chat GUID.
You use handle addresses when querying or fetching a specific contact record.

How GUIDs appear in SDK calls

Most SDK methods that target a specific chat accept a chatGuid parameter. Pass the full iMessage;+;... or iMessage;-;... string.
When sending messages, you also provide a tempGuid — a client-generated identifier you create (typically a UUID v4) used to deduplicate the message on the server side. This prevents the same message from being delivered twice if your request is retried.

Querying to discover GUIDs

If you don’t already know the GUID for a chat, query the chats list and filter the results.
Cache chat GUIDs locally after the first query rather than fetching the full chat list on every request. GUIDs for direct conversations are stable — they won’t change as long as the conversation exists on the server.