To find a decision, contract link or shared document in iMessage history, call Figment's messages:read search endpoint with a specific term (a URL host, a vendor name, a file name) and check historyComplete in the response. The search runs against the messages on a signed-in Mac, so an empty result means "not found in locally available history", not "never sent". The worksheet below maps common retrieval tasks to query terms and sync conditions.
What does iMessage history contain?
Apple's Messages in iCloud keeps message history synchronized across every device signed in to the same Apple Account, including the Mac. That history spans iMessage, SMS, MMS, and RCS, not only blue-bubble threads. With Messages in iCloud enabled on the iPhone, text message forwarding is built in and no separate Text Message Forwarding switch is needed. For new carrier messages to arrive, the iPhone must be on, online, signed into the same Apple Account, and able to send and receive messages.
Already-synced carrier history stays available on a paired Mac while the iPhone is offline. The iPhone requirement applies to new SMS, MMS, and RCS messages, not to reading synced history.
How do I check the connection before searching?
Read the per-service state first. A newly connected Mac may still be syncing, and querying a non-ready service returns a partial window or nothing.
GET https://figment.so/api/icloud/v1/connections/{connection_id}
Authorization: Bearer ACCESS_TOKEN
{
"connection": {
"id": "con_...",
"mode": "live",
"services": {
"messages": {
"state": "ready",
"reason": null,
"observedAt": 1731456000000
}
}
}
}
Possible states are connecting, needs_approval, syncing, ready, offline, reconnect_required, and revoked. Search only when state is ready. The endpoint enforces authorization, so handle non-2xx responses. Use your account page to monitor connection status and resolve setup issues.
ready means the service is authorized and available. It does not mean all history has finished syncing. Check historyComplete in search results for that.
Which query terms find which kinds of messages?
Start with the most specific term you have: a URL host, a proper noun or a dollar amount, not a generic word like "decision". Exact phrases reduce false matches. Source for SMS, MMS and RCS scope: Apple Messages in iCloud.
| Use case | Effective query terms | iPhone needed for new messages | Gap risk |
|---|---|---|---|
| Shared document links | docs.google.com, notion.so, dropbox.com, figma.com | Only for new SMS/RCS arrivals | Low for iMessage threads |
| Go/no-go decisions | let's go, approved, confirmed, let's do it | Only for new SMS/RCS arrivals | Medium: short replies lack standalone context |
| Contract or vendor references | Vendor name + contract or agreement | Only for new SMS/RCS arrivals | Low: proper nouns match precisely |
| Action-item assignments | can you, please handle, by Friday, take care of | Only for new SMS/RCS arrivals | Medium: forward-looking phrases are brief |
| File names and project codes | Exact file name, ticket ID, branch name | Only for new SMS/RCS arrivals | Low: exact string matches are reliable |
| Meeting coordination | zoom, calendar invite, call at, reschedule | Only for new SMS/RCS arrivals | Low: scheduling language is distinctive |
| Budget or pricing approvals | approved the budget, go ahead, dollar amounts | Only for new SMS/RCS arrivals | Medium: approval words are common and short |
When a hit comes back, use its chatGuid to fetch the surrounding thread.
How do I call the search endpoint?
Send a GET to the search endpoint. The messages:read scope covers both reads and search, and no separate search permission exists.
GET https://figment.so/api/icloud/v1/connections/{connection_id}/messages/search
?query=TERM
&chatGuid=CHAT_GUID (optional: scope to one conversation)
&limit=20 (default 20, max 100)
&offset=0 (max 10000)
Build the URL with a URL constructor. Never interpolate raw chatGuid values into a query string, because unencoded characters are misread by HTTP. If your grant was scoped to a specific conversation (a selected-chat grant), include that conversation's chatGuid.
A design illustration using curl:
BASE_URL="https://figment.so/api/icloud"
curl -G \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data-urlencode "query=contract draft" \
--data-urlencode "limit=20" \
"$BASE_URL/v1/connections/$CONNECTION_ID/messages/search"
Read credentials from environment variables. The developer app never receives the Apple password. Search scans bounded, locally available history, so it is not a guaranteed full-text index of every message ever sent.
How do I read the results?
Read chatGuid, hasMore, nextOffset and historyComplete from the response:
{
"data": [
{
"guid": "...",
"text": "...",
"isFromMe": false,
"chatGuid": "iMessage;...;..."
}
],
"mode": "live",
"offset": 0,
"nextOffset": 20,
"hasMore": true,
"historyComplete": false,
"scope": "messages:read"
}
chatGuid: use this value directly to fetch the full thread. Do not construct the string by hand, because the format varies by conversation type.hasMoreandnextOffset: passnextOffsetasoffsetin the next request. Stop whenhasMoreisfalseornextOffsetisnull.historyComplete: false: sync is still in progress, so results are a partial window of what will eventually be available.
To pull the thread around a match:
GET /v1/connections/{connection_id}/messages?chatGuid={chatGuid_from_result}&limit=20&offset=0
What if a search returns nothing for a message I know was sent?
Check two things before you conclude the message is gone:
- Connection state. If
services.messages.stateissyncing, wait and retry. The message may not have arrived yet. - Coverage. If
historyCompleteisfalse, some older messages may not yet be on the Mac.
Empty results reflect locally available history at query time. They are not proof that a message was never sent.
Where can I read more?
Connect Apple Account to give your app structured search access to message history.