curl -X POST https://api.ibubbl.com/v1/messages/8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b/edit \ -H "Authorization: Bearer $IBUBBL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"body": "Hey Sam — quick check-in about your order #1042."}'
const messageId = "8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b";const res = await fetch( `https://api.ibubbl.com/v1/messages/${encodeURIComponent(messageId)}/edit`, { method: "POST", headers: { Authorization: `Bearer ${process.env.IBUBBL_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ body: "Hey Sam — quick check-in about your order #1042." }), signal: AbortSignal.timeout(10_000), },);const data = await res.json();if (!res.ok) throw new Error(`${res.status} ${data.detail?.error}`);// 202: the edit is on its way; 200: the message already had this text.console.log(res.status, data.edit_status, data.body);
import osimport urllib.parseimport requestsAPI_KEY = os.environ["IBUBBL_API_KEY"]message_id = "8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b"res = requests.post( f"https://api.ibubbl.com/v1/messages/{urllib.parse.quote(message_id, safe='')}/edit", headers={"Authorization": f"Bearer {API_KEY}"}, json={"body": "Hey Sam — quick check-in about your order #1042."}, timeout=10,)data = res.json()if not res.ok: raise RuntimeError(f"{res.status_code} {data['detail']['error']}")# 202: the edit is on its way; 200: the message already had this text.print(res.status_code, data["edit_status"], data["body"])
{ "detail": { "error": "edit_window_expired", "message": "This message can no longer be edited. Send a follow-up message instead." }}
Messages
Edit a message
Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of sent_at and up to five times, as on an iPhone.
The edit is accepted with edit_status: "pending", and body shows the new text at once. When it reaches the recipient, message.edited fires with direction: "outbound" and edit_count goes up by one. If it doesn’t, message.edit_failed fires and body goes back to the text they have.
On iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting “Edited to” with the new text, and the original stays. In a group, only members using iMessage see the edit.
Sending the text the message already has answers 200 and changes nothing, so a retried request never spends a second edit.
Counts toward the conversation-actions rate limit (300 a minute per account).
POST
/
v1
/
messages
/
{message_id}
/
edit
curl -X POST https://api.ibubbl.com/v1/messages/8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b/edit \ -H "Authorization: Bearer $IBUBBL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"body": "Hey Sam — quick check-in about your order #1042."}'
const messageId = "8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b";const res = await fetch( `https://api.ibubbl.com/v1/messages/${encodeURIComponent(messageId)}/edit`, { method: "POST", headers: { Authorization: `Bearer ${process.env.IBUBBL_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ body: "Hey Sam — quick check-in about your order #1042." }), signal: AbortSignal.timeout(10_000), },);const data = await res.json();if (!res.ok) throw new Error(`${res.status} ${data.detail?.error}`);// 202: the edit is on its way; 200: the message already had this text.console.log(res.status, data.edit_status, data.body);
import osimport urllib.parseimport requestsAPI_KEY = os.environ["IBUBBL_API_KEY"]message_id = "8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b"res = requests.post( f"https://api.ibubbl.com/v1/messages/{urllib.parse.quote(message_id, safe='')}/edit", headers={"Authorization": f"Bearer {API_KEY}"}, json={"body": "Hey Sam — quick check-in about your order #1042."}, timeout=10,)data = res.json()if not res.ok: raise RuntimeError(f"{res.status_code} {data['detail']['error']}")# 202: the edit is on its way; 200: the message already had this text.print(res.status_code, data["edit_status"], data["body"])
Method:POST | Endpoint:/v1/messages/{message_id}/editDescription: Change the text of a message you sent over iMessage, the way you would on an iPhone: within 14 minutes 30 seconds of sending, up to five times. See Edit, Undo Send and Cancel.Authentication: API key in the Authorization header: Authorization: Bearer ib_pk_<64 hex>. Create keys in the dashboard under Settings → API access.Rate limit: 300 conversation actions per 60 seconds per account (edits, unsends, cancels, tapbacks, mark read and typing together, across all your API keys). Over that, you get 429 rate_limited with a Retry-After header; see Rate limits.
The new text. It replaces the whole text of the message. Leading and trailing whitespace is trimmed.
The path parameter message_id is the id of a message you sent: from Send a message, or from List messages, where messages sent from the dashboard appear too. Fields not listed above are rejected with 422 validation_error.
It’s accepted first, applied second. The answer is 202 with edit_status: "pending", and body already shows the new text. A few seconds later the edit reaches the recipient: message.edited fires with direction: "outbound", edit_status becomes edited, and edit_count goes up by one.
If it doesn’t land, the text comes back.message.edit_failed fires, edit_status becomes failed, and body goes back to the text the recipient has. You can edit again if the window is still open.
One edit at a time. While one is on its way, a different text gets 409 edit_in_flight; wait for message.edited and send the next.
It’s safe to call twice. Sending the text the message already has (a retry of an accepted edit included) answers 200 with the message and changes nothing. It doesn’t use up one of the five edits.
14 minutes 30 seconds, five edits. Measured from sent_at. iMessage allows 15 minutes; iBubbl stops 30 seconds early so an edit never arrives too late to apply. After the fifth edit, 422 edit_limit_reached.
iMessage only. A message that went out by SMS (channel: "sms", RCS included) can’t be edited: 422 sms_not_supported. One that hasn’t gone out yet gets 422 not_sent_yet: cancel it and send a new one instead.
Text only. A message’s text can be edited, including the caption of a message with files. A message that is only files has nothing to edit (422 not_editable).
Messages with a link preview. A message typed in the dashboard with a link goes out as the text and a preview card. Only the text before the link can change: keep the link exactly as sent and at the end, or you get 422 link_changed. Messages sent through the API never have a preview card, so this doesn’t apply to them.
Groups work. In a group, only members using iMessage see the edit.
Blocked and opted-out contacts get none. An edit reaches the recipient as a change, so in a one-to-one conversation a blocked contact gets 422 contact_blocked and an opted-out one 422 contact_opted_out.
What the recipient sees depends on their software. On iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later, the bubble changes in place and is marked Edited. On earlier versions they get a follow-up message starting “Edited to” with the new text in quotation marks, and the original stays. See What the recipient sees.
curl -X POST https://api.ibubbl.com/v1/messages/8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b/edit \ -H "Authorization: Bearer $IBUBBL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"body": "Hey Sam — quick check-in about your order #1042."}'
const messageId = "8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b";const res = await fetch( `https://api.ibubbl.com/v1/messages/${encodeURIComponent(messageId)}/edit`, { method: "POST", headers: { Authorization: `Bearer ${process.env.IBUBBL_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ body: "Hey Sam — quick check-in about your order #1042." }), signal: AbortSignal.timeout(10_000), },);const data = await res.json();if (!res.ok) throw new Error(`${res.status} ${data.detail?.error}`);// 202: the edit is on its way; 200: the message already had this text.console.log(res.status, data.edit_status, data.body);
import osimport urllib.parseimport requestsAPI_KEY = os.environ["IBUBBL_API_KEY"]message_id = "8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b"res = requests.post( f"https://api.ibubbl.com/v1/messages/{urllib.parse.quote(message_id, safe='')}/edit", headers={"Authorization": f"Bearer {API_KEY}"}, json={"body": "Hey Sam — quick check-in about your order #1042."}, timeout=10,)data = res.json()if not res.ok: raise RuntimeError(f"{res.status_code} {data['detail']['error']}")# 202: the edit is on its way; 200: the message already had this text.print(res.status_code, data["edit_status"], data["body"])
202 AcceptedThe edit is on its way. The body is the message with the new text and edit_status: "pending". edit_count and edited_at change when the edit reaches the recipient.
Field
Description
body
The new text, already. It goes back to the previous text if the edit fails.
edit_status
pending now; then edited when it reaches the recipient, or failed if it doesn’t.
edit_count
Your edits that have reached the recipient, 0–5.
edited_at
When the latest edit reached the recipient (UTC), or null.
200 OKThe message already has this text. The body is the message as it is; nothing was sent and no edit was used.401 Unauthorized
{ "detail": { "error": "unauthorized", "message": "Invalid or revoked API key" }}
Other message values: Authorization Bearer token required, API key required (use Authorization: Bearer ib_pk_…), Invalid API key format, Customer account not found.403 Forbidden
{ "detail": { "error": "forbidden", "message": "Account is suspended" }}
Your iBubbl account is suspended or cancelled (message is then Account is cancelled). Every API-key endpoint returns this.404 Not Found
{ "detail": { "error": "not_found", "message": "Message not found" }}
Also returned for a malformed ID and a message that belongs to another account.409 Conflict
{ "detail": { "error": "edit_in_flight", "message": "An earlier edit is still being dispatched. Wait a few seconds and try again." }}
Nothing changed. The error is one of:
edit_in_flight: your previous edit hasn’t reached the recipient yet. Wait for message.edited (usually a few seconds), then send this one.
already_unsent: the message was unsent, so there’s nothing left to edit.
422 Unprocessable Entity
{ "detail": { "error": "not_sent_yet", "message": "This message hasn't been sent yet, so it can't be edited. Cancel it instead." }}
Nothing changed. The error is one of:
validation_error: no body, an empty one, more than 4,000 characters, or an unknown field.
invalid_target: the message is one you received. Only messages you sent can be edited.
sms_not_supported: the message went out by SMS (RCS included), where messages can’t be edited.
not_sent_yet: the message is still pending or queued. Cancel it and send a new one.
not_editable: the message has no text (only files), or it failed, was cancelled or expired, or iMessage never confirmed it.
edit_window_expired: more than 14 minutes 30 seconds since sent_at. Send a follow-up message instead.
edit_limit_reached: the message has been edited five times.
link_changed: a message sent with a link preview, where the new text moves, changes or removes the link.
contact_blocked: a one-to-one conversation with a contact you blocked.
contact_opted_out: a one-to-one conversation with a contact who opted out.
429 Too Many Requests
{ "detail": { "error": "rate_limited", "message": "Too many conversation actions; wait 12s (limit 300 a minute per account)." }}
Wait the Retry-After header’s seconds, then send the same request again.503 Service Unavailable
The new text. It replaces the whole text of the message; leading and trailing whitespace is trimmed. For a message that went out with a link preview, keep the link exactly as sent and at the end, and change only the text before it. Fields not listed here are rejected with 422 validation_error.
Required string length: 1 - 4000
Response
The message already has this text; nothing changed.
outbound = sent from your line (through the API, the dashboard or an automation); inbound = received from a contact. An inbound message has statusdelivered, or read once it has been read in the dashboard.
ISO 8601 UTC timestamp, with microseconds and a Z, of when iBubbl recorded the message. It never changes, so it is what GET /v1/messages sorts and filters by; pass it back as created_after / created_before unchanged.
Lifecycle state. pending = accepted and on its way out; it may be waiting for the contact's working hours or the line's hourly limit for new contacts (see held_until). queued = parked by a capacity hold (hourly_cap_hit / line_offline), retried automatically. sent / delivered / read = delivery progression. failed = the send failed — see webhook message.failed for the reason; it can follow sent (or a read with no confirmed delivery) when iMessage reports the send failed after accepting it (failed_reasonimessage_undeliverable / imessage_error:<code>), and such a message can still move to delivered / read if Apple later confirms it. expired = still queued after an hour, so dropped; it will not send. cancelled = stopped in the dashboard before it was sent; it will not send (webhook message.cancelled).
The files on this message, in the order they were sent: sent with attachments, from the dashboard or an automation, or received from the contact. Empty when there are none. File contents and URLs are not returned.
The contact's phone number (E.164) for 1:1 messages: the destination of an outbound message, and the sender of an inbound one. Null for group messages — the group is identified by chat_guid instead.
ID of the contact this message was sent to. For groups, this is the 'primary' participant the message was addressed to (the first participant in participant_phones on a new group create); the conversation's full participant list is available via the conversation.
Opaque identifier for the group chat (e.g. any;+;<hex>). Returned for group messages — use it to address later messages to the same group via the chat_guid request shape. Null for one_to_one messages, and for a brand-new group until the group has been created in iMessage (that happens when the first message goes out, which can wait for sending hours); poll GET /v1/messages/{id} to see it fill in. It changes when a participant is added to the group.
How the message travelled: imessage, or sms (a text, including RCS). For an outbound message, how it actually went out (sms when the recipient couldn't be reached on iMessage); null until it has been sent. For an inbound message, how it arrived; null when that wasn't recorded.
ISO 8601 UTC timestamp. Set when the message is accepted, then replaced by the actual send time once it goes out. Use status (sent / delivered / read), not sent_at, to tell whether it has actually gone out.
While a pending message is being held, the expected time (ISO 8601 UTC) it will go out: the next opening of the contact's working hours; for hourly_limit, an estimate of when a slot frees. Recomputed within about 10 seconds. Null when the message is not held, when held_reason is working_hours but no sending day is enabled, and when it is hourly_limit with no estimate.
Why a pending message is being held right now: working_hours (outside the contact's working hours) or hourly_limit (the line has started its limit of new contacts for this hour; the message goes out by itself when a slot frees, at about held_until). Null when it is not held.
ISO 8601 UTC timestamp of the latest edit that reached the recipient: one of yours (POST /v1/messages/{id}/edit, or the dashboard), or, on an inbound message, the contact's own edit. Null when it was never edited.
pending = your latest edit is on its way (body already shows the new text); failed = it didn't reach the recipient, and body is back to the text they have (webhook message.edit_failed); edited = the message was edited. Null when it never was.
pending = your Undo Send is on its way; unsent = the whole message was unsent (by you, or by the contact on an inbound message) and body is empty; partly_unsent = part of it was (its text, a link preview or a file); failed = your Undo Send didn't happen and the recipient still has the message (webhook message.unsend_failed). Null when nothing was unsent.
ISO 8601 UTC timestamp of when the message (or the latest part of it) was unsent. Null unless unsend_status is unsent or partly_unsent.
Example:
"2026-05-17T14:24:10.000000Z"
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"iBubbl","colors":{"primary":"#3B82F6","light":"#60A5FA","dark":"#2563EB"},"logo":{"light":"https://mintcdn.com/ibubbl/vKOMJPyDWV9K1NYc/logo/light.png?fit=max\u0026auto=format\u0026n=vKOMJPyDWV9K1NYc\u0026q=85\u0026s=b8846160ee4db226f79f0e4f7f331870","dark":"https://mintcdn.com/ibubbl/vKOMJPyDWV9K1NYc/logo/dark.png?fit=max\u0026auto=format\u0026n=vKOMJPyDWV9K1NYc\u0026q=85\u0026s=0067c7441443a7b4d08cfd7357f9c219"},"favicon":"https://mintcdn.com/ibubbl/vKOMJPyDWV9K1NYc/favicon.ico?fit=max\u0026auto=format\u0026n=vKOMJPyDWV9K1NYc\u0026q=85\u0026s=e6bd8c62275573958611eefad9499589","api":{"openapi":"openapi/public.json","playground":{"display":"simple"},"examples":{"languages":["curl","typescript","python"]}},"navbar":{"links":[{"href":"https://ibubbl-dashboard.vercel.app","label":"Dashboard"}],"primary":{"type":"button","label":"Sign up","href":"https://ibubbl-dashboard.vercel.app/signup"}},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ibubbl","hasAudioNarration":false,"actualSubdomain":"ibubbl","customDomains":["docs.ibubbl.com"],"gitSource":{"type":"github","owner":"piter-chern","repo":"ibubbl-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af4d29931bb9e1998e41360","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API reference","count":26},{"language":"default","tag":"Contacts","count":10},{"language":"default","tag":"Concepts","count":9},{"language":"default","tag":"Guides","count":9},{"language":"default","tag":"Messages","count":8},{"language":"default","tag":"Webhooks","count":6},{"language":"default","tag":"Resources","count":5},{"language":"default","tag":"Get started","count":4},{"language":"default","tag":"Conversations","count":3},{"language":"default","tag":"Inbound events","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/messages/edit","slug":"/api-reference/messages/edit","pageMetadata":{"title":"Edit a message","openapi":"POST /v1/messages/{message_id}/edit","description":"Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of `sent_at` and up to five times, as on an iPhone.\n\nThe edit is accepted with `edit_status: \"pending\"`, and `body` shows the new text at once. When it reaches the recipient, `message.edited` fires with `direction: \"outbound\"` and `edit_count` goes up by one. If it doesn't, `message.edit_failed` fires and `body` goes back to the text they have.\n\nOn iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting \"Edited to\" with the new text, and the original stays. In a group, only members using iMessage see the edit.\n\nSending the text the message already has answers `200` and changes nothing, so a retried request never spends a second edit.\n\nCounts toward the conversation-actions rate limit (300 a minute per account).","href":"/api-reference/messages/edit"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of \", _jsx(_components.code, {\n children: \"sent_at\"\n }), \" and up to five times, as on an iPhone.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The edit is accepted with \", _jsx(_components.code, {\n children: \"edit_status: \\\"pending\\\"\"\n }), \", and \", _jsx(_components.code, {\n children: \"body\"\n }), \" shows the new text at once. When it reaches the recipient, \", _jsx(_components.code, {\n children: \"message.edited\"\n }), \" fires with \", _jsx(_components.code, {\n children: \"direction: \\\"outbound\\\"\"\n }), \" and \", _jsx(_components.code, {\n children: \"edit_count\"\n }), \" goes up by one. If it doesn’t, \", _jsx(_components.code, {\n children: \"message.edit_failed\"\n }), \" fires and \", _jsx(_components.code, {\n children: \"body\"\n }), \" goes back to the text they have.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"On iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting “Edited to” with the new text, and the original stays. In a group, only members using iMessage see the edit.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Sending the text the message already has answers \", _jsx(_components.code, {\n children: \"200\"\n }), \" and changes nothing, so a retried request never spends a second edit.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Counts toward the conversation-actions rate limit (300 a minute per account).\"\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`edit-a-message`,children:`Edit a message`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Method:`}),` `,_jsx(_components.code,{children:`POST`}),` | `,_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`/v1/messages/{message_id}/edit`})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Description:`}),` Change the text of a message you sent over iMessage, the way you would on an iPhone: within 14 minutes 30 seconds of sending, up to five times. See `,_jsx(_components.a,{href:`/guides/editing-and-unsending`,children:`Edit, Undo Send and Cancel`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Authentication:`}),` API key in the `,_jsx(_components.code,{children:`Authorization`}),` header: `,_jsx(_components.code,{children:`Authorization: Bearer ib_pk_\u003c64 hex>`}),`. Create keys in the dashboard under `,_jsx(_components.strong,{children:`Settings → API access`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Rate limit:`}),` 300 conversation actions per 60 seconds per account (edits, unsends, cancels, tapbacks, mark read and typing together, across all your API keys). Over that, you get `,_jsx(_components.code,{children:`429 rate_limited`}),` with a `,_jsx(_components.code,{children:`Retry-After`}),` header; see `,_jsx(_components.a,{href:`/concepts/limits#rate-limits`,children:`Rate limits`}),`.`]}),`\n`,_jsx(Heading,{level:`4`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`body`})}),_jsx(_components.td,{children:`string, 1–4,000 characters`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`The new text. It replaces the whole text of the message. Leading and trailing whitespace is trimmed.`})]})})]}),`\n`,_jsxs(_components.p,{children:[`The path parameter `,_jsx(_components.code,{children:`message_id`}),` is the `,_jsx(_components.code,{children:`id`}),` of a message you `,_jsx(_components.strong,{children:`sent`}),`: from `,_jsx(_components.a,{href:`/api-reference/messages/send`,children:`Send a message`}),`, or from `,_jsx(_components.a,{href:`/api-reference/messages/list`,children:`List messages`}),`, where messages sent from the dashboard appear too. Fields not listed above are rejected with `,_jsx(_components.code,{children:`422 validation_error`}),`.`]}),`\n`,_jsx(Heading,{level:`4`,id:`how-it-behaves`,children:`How it behaves`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`It’s accepted first, applied second.`}),` The answer is `,_jsx(_components.code,{children:`202`}),` with `,_jsx(_components.code,{children:`edit_status: \"pending\"`}),`, and `,_jsx(_components.code,{children:`body`}),` already shows the new text. A few seconds later the edit reaches the recipient: `,_jsx(_components.a,{href:`/webhooks/events#message-edited`,children:_jsx(_components.code,{children:`message.edited`})}),` fires with `,_jsx(_components.code,{children:`direction: \"outbound\"`}),`, `,_jsx(_components.code,{children:`edit_status`}),` becomes `,_jsx(_components.code,{children:`edited`}),`, and `,_jsx(_components.code,{children:`edit_count`}),` goes up by one.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`If it doesn’t land, the text comes back.`}),` `,_jsx(_components.a,{href:`/webhooks/events#message-edit-failed`,children:_jsx(_components.code,{children:`message.edit_failed`})}),` fires, `,_jsx(_components.code,{children:`edit_status`}),` becomes `,_jsx(_components.code,{children:`failed`}),`, and `,_jsx(_components.code,{children:`body`}),` goes back to the text the recipient has. You can edit again if the window is still open.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`One edit at a time.`}),` While one is on its way, a different text gets `,_jsx(_components.code,{children:`409 edit_in_flight`}),`; wait for `,_jsx(_components.code,{children:`message.edited`}),` and send the next.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`It’s safe to call twice.`}),` Sending the text the message already has (a retry of an accepted edit included) answers `,_jsx(_components.code,{children:`200`}),` with the message and changes nothing. It doesn’t use up one of the five edits.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`14 minutes 30 seconds, five edits.`}),` Measured from `,_jsx(_components.code,{children:`sent_at`}),`. iMessage allows 15 minutes; iBubbl stops 30 seconds early so an edit never arrives too late to apply. After the fifth edit, `,_jsx(_components.code,{children:`422 edit_limit_reached`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`iMessage only.`}),` A message that went out by SMS (`,_jsx(_components.code,{children:`channel: \"sms\"`}),`, RCS included) can’t be edited: `,_jsx(_components.code,{children:`422 sms_not_supported`}),`. One that hasn’t gone out yet gets `,_jsx(_components.code,{children:`422 not_sent_yet`}),`: `,_jsx(_components.a,{href:`/api-reference/messages/cancel`,children:`cancel it`}),` and send a new one instead.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Text only.`}),` A message’s text can be edited, including the caption of a message with files. A message that is only files has nothing to edit (`,_jsx(_components.code,{children:`422 not_editable`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Messages with a link preview.`}),` A message typed in the dashboard with a link goes out as the text and a preview card. Only the text before the link can change: keep the link exactly as sent and at the end, or you get `,_jsx(_components.code,{children:`422 link_changed`}),`. Messages sent through the API never have a preview card, so this doesn’t apply to them.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Groups work.`}),` In a group, only members using iMessage see the edit.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Blocked and opted-out contacts get none.`}),` An edit reaches the recipient as a change, so in a one-to-one conversation a `,_jsx(_components.a,{href:`/api-reference/contacts/block`,children:`blocked`}),` contact gets `,_jsx(_components.code,{children:`422 contact_blocked`}),` and an `,_jsx(_components.a,{href:`/concepts/suppression`,children:`opted-out`}),` one `,_jsx(_components.code,{children:`422 contact_opted_out`}),`.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What the recipient sees depends on their software.`}),` On iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later, the bubble changes in place and is marked `,_jsx(_components.strong,{children:`Edited`}),`. On earlier versions they get a follow-up message starting “Edited to” with the new text in quotation marks, and the original stays. See `,_jsx(_components.a,{href:`/guides/editing-and-unsending#what-the-recipient-sees`,children:`What the recipient sees`}),`.`]})}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`4`,id:`responses`,children:`Responses`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`202 Accepted`})}),`\n`,_jsxs(_components.p,{children:[`The edit is on its way. The body is the `,_jsx(_components.a,{href:`/api-reference/messages/retrieve`,children:`message`}),` with the new text and `,_jsx(_components.code,{children:`edit_status: \"pending\"`}),`. `,_jsx(_components.code,{children:`edit_count`}),` and `,_jsx(_components.code,{children:`edited_at`}),` change when the edit reaches the recipient.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`body`})}),_jsx(_components.td,{children:`The new text, already. It goes back to the previous text if the edit fails.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`edit_status`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pending`}),` now; then `,_jsx(_components.code,{children:`edited`}),` when it reaches the recipient, or `,_jsx(_components.code,{children:`failed`}),` if it doesn’t.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`edit_count`})}),_jsx(_components.td,{children:`Your edits that have reached the recipient, 0–5.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`edited_at`})}),_jsxs(_components.td,{children:[`When the latest edit reached the recipient (UTC), or `,_jsx(_components.code,{children:`null`}),`.`]})]})]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`200 OK`})}),`\n`,_jsx(_components.p,{children:`The message already has this text. The body is the message as it is; nothing was sent and no edit was used.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`401 Unauthorized`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unauthorized\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid or revoked API key\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Other `,_jsx(_components.code,{children:`message`}),` values: `,_jsx(_components.code,{children:`Authorization Bearer token required`}),`, `,_jsx(_components.code,{children:`API key required (use Authorization: Bearer ib_pk_…)`}),`, `,_jsx(_components.code,{children:`Invalid API key format`}),`, `,_jsx(_components.code,{children:`Customer account not found`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`403 Forbidden`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"forbidden\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Account is suspended\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Your iBubbl account is suspended or cancelled (`,_jsx(_components.code,{children:`message`}),` is then `,_jsx(_components.code,{children:`Account is cancelled`}),`). Every API-key endpoint returns this.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`404 Not Found`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"not_found\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Message not found\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Also returned for a malformed ID and a message that belongs to another account.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`409 Conflict`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"edit_in_flight\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"An earlier edit is still being dispatched. Wait a few seconds and try again.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Nothing changed. The `,_jsx(_components.code,{children:`error`}),` is one of:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`edit_in_flight`}),`: your previous edit hasn’t reached the recipient yet. Wait for `,_jsx(_components.code,{children:`message.edited`}),` (usually a few seconds), then send this one.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`already_unsent`}),`: the message was unsent, so there’s nothing left to edit.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`422 Unprocessable Entity`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"not_sent_yet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This message hasn't been sent yet, so it can't be edited. Cancel it instead.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Nothing changed. The `,_jsx(_components.code,{children:`error`}),` is one of:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`validation_error`}),`: no `,_jsx(_components.code,{children:`body`}),`, an empty one, more than 4,000 characters, or an unknown field.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`invalid_target`}),`: the message is one you received. Only messages you sent can be edited.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`sms_not_supported`}),`: the message went out by SMS (RCS included), where messages can’t be edited.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`not_sent_yet`}),`: the message is still `,_jsx(_components.code,{children:`pending`}),` or `,_jsx(_components.code,{children:`queued`}),`. `,_jsx(_components.a,{href:`/api-reference/messages/cancel`,children:`Cancel it`}),` and send a new one.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`not_editable`}),`: the message has no text (only files), or it failed, was cancelled or expired, or iMessage never confirmed it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`edit_window_expired`}),`: more than 14 minutes 30 seconds since `,_jsx(_components.code,{children:`sent_at`}),`. Send a follow-up message instead.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`edit_limit_reached`}),`: the message has been edited five times.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`link_changed`}),`: a message sent with a link preview, where the new text moves, changes or removes the link.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`contact_blocked`}),`: a one-to-one conversation with a contact you `,_jsx(_components.a,{href:`/api-reference/contacts/block`,children:`blocked`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`contact_opted_out`}),`: a one-to-one conversation with a contact who opted out.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`429 Too Many Requests`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rate_limited\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Too many conversation actions; wait 12s (limit 300 a minute per account).\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Wait the `,_jsx(_components.code,{children:`Retry-After`}),` header’s seconds, then send the same request again.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`503 Service Unavailable`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"opt_out_check_unavailable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Couldn't check the contact's opt-out. Try again.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`iBubbl couldn’t confirm the contact hasn’t opted out, so it changed nothing. Retry after a short backoff.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Edit a message","openapi":"POST /v1/messages/{message_id}/edit","description":"Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of `sent_at` and up to five times, as on an iPhone.\n\nThe edit is accepted with `edit_status: \"pending\"`, and `body` shows the new text at once. When it reaches the recipient, `message.edited` fires with `direction: \"outbound\"` and `edit_count` goes up by one. If it doesn't, `message.edit_failed` fires and `body` goes back to the text they have.\n\nOn iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting \"Edited to\" with the new text, and the original stays. In a group, only members using iMessage see the edit.\n\nSending the text the message already has answers `200` and changes nothing, so a retried request never spends a second edit.\n\nCounts toward the conversation-actions rate limit (300 a minute per account).","href":"/api-reference/messages/edit"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,RequestExample,ResponseExample,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`edit-a-message`,children:`Edit a message`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Method:`}),` `,_jsx(_components.code,{children:`POST`}),` | `,_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`/v1/messages/{message_id}/edit`})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Description:`}),` Change the text of a message you sent over iMessage, the way you would on an iPhone: within 14 minutes 30 seconds of sending, up to five times. See `,_jsx(_components.a,{href:`/guides/editing-and-unsending`,children:`Edit, Undo Send and Cancel`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Authentication:`}),` API key in the `,_jsx(_components.code,{children:`Authorization`}),` header: `,_jsx(_components.code,{children:`Authorization: Bearer ib_pk_\u003c64 hex>`}),`. Create keys in the dashboard under `,_jsx(_components.strong,{children:`Settings → API access`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Rate limit:`}),` 300 conversation actions per 60 seconds per account (edits, unsends, cancels, tapbacks, mark read and typing together, across all your API keys). Over that, you get `,_jsx(_components.code,{children:`429 rate_limited`}),` with a `,_jsx(_components.code,{children:`Retry-After`}),` header; see `,_jsx(_components.a,{href:`/concepts/limits#rate-limits`,children:`Rate limits`}),`.`]}),`\n`,_jsx(Heading,{level:`4`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`body`})}),_jsx(_components.td,{children:`string, 1–4,000 characters`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`The new text. It replaces the whole text of the message. Leading and trailing whitespace is trimmed.`})]})})]}),`\n`,_jsxs(_components.p,{children:[`The path parameter `,_jsx(_components.code,{children:`message_id`}),` is the `,_jsx(_components.code,{children:`id`}),` of a message you `,_jsx(_components.strong,{children:`sent`}),`: from `,_jsx(_components.a,{href:`/api-reference/messages/send`,children:`Send a message`}),`, or from `,_jsx(_components.a,{href:`/api-reference/messages/list`,children:`List messages`}),`, where messages sent from the dashboard appear too. Fields not listed above are rejected with `,_jsx(_components.code,{children:`422 validation_error`}),`.`]}),`\n`,_jsx(Heading,{level:`4`,id:`how-it-behaves`,children:`How it behaves`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`It’s accepted first, applied second.`}),` The answer is `,_jsx(_components.code,{children:`202`}),` with `,_jsx(_components.code,{children:`edit_status: \"pending\"`}),`, and `,_jsx(_components.code,{children:`body`}),` already shows the new text. A few seconds later the edit reaches the recipient: `,_jsx(_components.a,{href:`/webhooks/events#message-edited`,children:_jsx(_components.code,{children:`message.edited`})}),` fires with `,_jsx(_components.code,{children:`direction: \"outbound\"`}),`, `,_jsx(_components.code,{children:`edit_status`}),` becomes `,_jsx(_components.code,{children:`edited`}),`, and `,_jsx(_components.code,{children:`edit_count`}),` goes up by one.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`If it doesn’t land, the text comes back.`}),` `,_jsx(_components.a,{href:`/webhooks/events#message-edit-failed`,children:_jsx(_components.code,{children:`message.edit_failed`})}),` fires, `,_jsx(_components.code,{children:`edit_status`}),` becomes `,_jsx(_components.code,{children:`failed`}),`, and `,_jsx(_components.code,{children:`body`}),` goes back to the text the recipient has. You can edit again if the window is still open.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`One edit at a time.`}),` While one is on its way, a different text gets `,_jsx(_components.code,{children:`409 edit_in_flight`}),`; wait for `,_jsx(_components.code,{children:`message.edited`}),` and send the next.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`It’s safe to call twice.`}),` Sending the text the message already has (a retry of an accepted edit included) answers `,_jsx(_components.code,{children:`200`}),` with the message and changes nothing. It doesn’t use up one of the five edits.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`14 minutes 30 seconds, five edits.`}),` Measured from `,_jsx(_components.code,{children:`sent_at`}),`. iMessage allows 15 minutes; iBubbl stops 30 seconds early so an edit never arrives too late to apply. After the fifth edit, `,_jsx(_components.code,{children:`422 edit_limit_reached`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`iMessage only.`}),` A message that went out by SMS (`,_jsx(_components.code,{children:`channel: \"sms\"`}),`, RCS included) can’t be edited: `,_jsx(_components.code,{children:`422 sms_not_supported`}),`. One that hasn’t gone out yet gets `,_jsx(_components.code,{children:`422 not_sent_yet`}),`: `,_jsx(_components.a,{href:`/api-reference/messages/cancel`,children:`cancel it`}),` and send a new one instead.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Text only.`}),` A message’s text can be edited, including the caption of a message with files. A message that is only files has nothing to edit (`,_jsx(_components.code,{children:`422 not_editable`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Messages with a link preview.`}),` A message typed in the dashboard with a link goes out as the text and a preview card. Only the text before the link can change: keep the link exactly as sent and at the end, or you get `,_jsx(_components.code,{children:`422 link_changed`}),`. Messages sent through the API never have a preview card, so this doesn’t apply to them.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Groups work.`}),` In a group, only members using iMessage see the edit.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Blocked and opted-out contacts get none.`}),` An edit reaches the recipient as a change, so in a one-to-one conversation a `,_jsx(_components.a,{href:`/api-reference/contacts/block`,children:`blocked`}),` contact gets `,_jsx(_components.code,{children:`422 contact_blocked`}),` and an `,_jsx(_components.a,{href:`/concepts/suppression`,children:`opted-out`}),` one `,_jsx(_components.code,{children:`422 contact_opted_out`}),`.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What the recipient sees depends on their software.`}),` On iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later, the bubble changes in place and is marked `,_jsx(_components.strong,{children:`Edited`}),`. On earlier versions they get a follow-up message starting “Edited to” with the new text in quotation marks, and the original stays. See `,_jsx(_components.a,{href:`/guides/editing-and-unsending#what-the-recipient-sees`,children:`What the recipient sees`}),`.`]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.ibubbl.com/v1/messages/8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b/edit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$IBUBBL_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"body\": \"Hey Sam — quick check-in about your order #1042.\"}'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`19`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` messageId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `https://api.ibubbl.com/v1/messages/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`encodeURIComponent`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`messageId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"/edit`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`IBUBBL_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Hey Sam — quick check-in about your order #1042.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signal:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` AbortSignal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`timeout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10_000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\" ${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`detail`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 202: the edit is on its way; 200: the message already had this text.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`edit_status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`20`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` urllib.parse`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"IBUBBL_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`message_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`res `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.ibubbl.com/v1/messages/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`urllib.parse.quote(message_id, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`safe`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/edit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hey Sam — quick check-in about your order #1042.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` res.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` res.ok:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` RuntimeError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`res.status_code`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'detail'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'error'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 202: the edit is on its way; 200: the message already had this text.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(res.status_code, data[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"edit_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], data[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`202 Accepted`,numberOfLines:`24`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`24`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"direction\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"outbound\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-05T15:04:10.112730Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"read\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+14155551234\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hey Sam — quick check-in about your order #1042.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contact_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"c8a1f4e2-3b9d-4f7c-a8e5-1d2c3b4a5e6f\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"conversation_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"conversation_kind\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"one_to_one\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"chat_guid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"channel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"imessage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sent_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-05T15:04:12.381Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"held_until\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"held_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"effect\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reply_to_message_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"attachments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"edited_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"edit_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"edit_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pending\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unsend_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unsent_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`422 Unprocessable Entity`,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"edit_window_expired\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This message can no longer be edited. Send a follow-up message instead.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`4`,id:`responses`,children:`Responses`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`202 Accepted`})}),`\n`,_jsxs(_components.p,{children:[`The edit is on its way. The body is the `,_jsx(_components.a,{href:`/api-reference/messages/retrieve`,children:`message`}),` with the new text and `,_jsx(_components.code,{children:`edit_status: \"pending\"`}),`. `,_jsx(_components.code,{children:`edit_count`}),` and `,_jsx(_components.code,{children:`edited_at`}),` change when the edit reaches the recipient.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`body`})}),_jsx(_components.td,{children:`The new text, already. It goes back to the previous text if the edit fails.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`edit_status`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pending`}),` now; then `,_jsx(_components.code,{children:`edited`}),` when it reaches the recipient, or `,_jsx(_components.code,{children:`failed`}),` if it doesn’t.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`edit_count`})}),_jsx(_components.td,{children:`Your edits that have reached the recipient, 0–5.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`edited_at`})}),_jsxs(_components.td,{children:[`When the latest edit reached the recipient (UTC), or `,_jsx(_components.code,{children:`null`}),`.`]})]})]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`200 OK`})}),`\n`,_jsx(_components.p,{children:`The message already has this text. The body is the message as it is; nothing was sent and no edit was used.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`401 Unauthorized`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unauthorized\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid or revoked API key\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Other `,_jsx(_components.code,{children:`message`}),` values: `,_jsx(_components.code,{children:`Authorization Bearer token required`}),`, `,_jsx(_components.code,{children:`API key required (use Authorization: Bearer ib_pk_…)`}),`, `,_jsx(_components.code,{children:`Invalid API key format`}),`, `,_jsx(_components.code,{children:`Customer account not found`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`403 Forbidden`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"forbidden\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Account is suspended\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Your iBubbl account is suspended or cancelled (`,_jsx(_components.code,{children:`message`}),` is then `,_jsx(_components.code,{children:`Account is cancelled`}),`). Every API-key endpoint returns this.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`404 Not Found`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"not_found\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Message not found\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Also returned for a malformed ID and a message that belongs to another account.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`409 Conflict`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"edit_in_flight\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"An earlier edit is still being dispatched. Wait a few seconds and try again.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Nothing changed. The `,_jsx(_components.code,{children:`error`}),` is one of:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`edit_in_flight`}),`: your previous edit hasn’t reached the recipient yet. Wait for `,_jsx(_components.code,{children:`message.edited`}),` (usually a few seconds), then send this one.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`already_unsent`}),`: the message was unsent, so there’s nothing left to edit.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`422 Unprocessable Entity`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"not_sent_yet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This message hasn't been sent yet, so it can't be edited. Cancel it instead.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Nothing changed. The `,_jsx(_components.code,{children:`error`}),` is one of:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`validation_error`}),`: no `,_jsx(_components.code,{children:`body`}),`, an empty one, more than 4,000 characters, or an unknown field.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`invalid_target`}),`: the message is one you received. Only messages you sent can be edited.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`sms_not_supported`}),`: the message went out by SMS (RCS included), where messages can’t be edited.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`not_sent_yet`}),`: the message is still `,_jsx(_components.code,{children:`pending`}),` or `,_jsx(_components.code,{children:`queued`}),`. `,_jsx(_components.a,{href:`/api-reference/messages/cancel`,children:`Cancel it`}),` and send a new one.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`not_editable`}),`: the message has no text (only files), or it failed, was cancelled or expired, or iMessage never confirmed it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`edit_window_expired`}),`: more than 14 minutes 30 seconds since `,_jsx(_components.code,{children:`sent_at`}),`. Send a follow-up message instead.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`edit_limit_reached`}),`: the message has been edited five times.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`link_changed`}),`: a message sent with a link preview, where the new text moves, changes or removes the link.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`contact_blocked`}),`: a one-to-one conversation with a contact you `,_jsx(_components.a,{href:`/api-reference/contacts/block`,children:`blocked`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`contact_opted_out`}),`: a one-to-one conversation with a contact who opted out.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`429 Too Many Requests`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rate_limited\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Too many conversation actions; wait 12s (limit 300 a minute per account).\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Wait the `,_jsx(_components.code,{children:`Retry-After`}),` header’s seconds, then send the same request again.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`503 Service Unavailable`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"opt_out_check_unavailable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Couldn't check the contact's opt-out. Try again.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`iBubbl couldn’t confirm the contact hasn’t opted out, so it changed nothing. Retry after a short backoff.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Edit a message","openapi":"POST /v1/messages/{message_id}/edit","description":"Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of `sent_at` and up to five times, as on an iPhone.\n\nThe edit is accepted with `edit_status: \"pending\"`, and `body` shows the new text at once. When it reaches the recipient, `message.edited` fires with `direction: \"outbound\"` and `edit_count` goes up by one. If it doesn't, `message.edit_failed` fires and `body` goes back to the text they have.\n\nOn iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting \"Edited to\" with the new text, and the original stays. In a group, only members using iMessage see the edit.\n\nSending the text the message already has answers `200` and changes nothing, so a retried request never spends a second edit.\n\nCounts toward the conversation-actions rate limit (300 a minute per account).","href":"/api-reference/messages/edit"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Edit a message","slug":"edit-a-message","depth":3,"children":[]},{"title":"Request Body","slug":"request-body","depth":4,"children":[]},{"title":"How it behaves","slug":"how-it-behaves","depth":4,"children":[]},{"title":"Responses","slug":"responses","depth":4,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.ibubbl.com/v1/messages/8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b/edit\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$IBUBBL_API_KEY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\"body\": \"Hey Sam — quick check-in about your order #1042.\"}'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"TypeScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"typescript\">\u003ccode language=\"typescript\" numberOfLines=\"19\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> messageId\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> res\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> `https://api.ibubbl.com/v1/messages/\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">encodeURIComponent\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">messageId\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">)\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">/edit`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> Authorization:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> `Bearer \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">process\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\">IBUBBL_API_KEY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({ \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">body:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Hey Sam — quick check-in about your order #1042.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }),\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> signal:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> AbortSignal\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">timeout\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">10_000\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">),\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">if\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">!\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">ok\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">throw\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> new\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> Error\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">res\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">status\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\"> ${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">detail\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">?.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">error\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// 202: the edit is on its way; 200: the message already had this text.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">status\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">edit_status\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">body\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"20\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> os\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> urllib.parse\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\">API_KEY\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> os.environ[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"IBUBBL_API_KEY\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">message_id \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">res \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> f\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://api.ibubbl.com/v1/messages/\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">urllib.parse.quote(message_id, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">safe\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">''\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">/edit\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">f\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\">API_KEY\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"body\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Hey Sam — quick check-in about your order #1042.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> timeout\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">10\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">data \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> res.json()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">if\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> not\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> res.ok:\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> raise\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> RuntimeError\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">f\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">res.status_code\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> {\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">data[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'detail'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">][\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'error'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># 202: the edit is on its way; 200: the message already had this text.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(res.status_code, data[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"edit_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">], data[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"body\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">])\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"202 Accepted","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"24\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"direction\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"outbound\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-11-05T15:04:10.112730Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"read\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"to\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"+14155551234\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"body\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Hey Sam — quick check-in about your order #1042.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"contact_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"c8a1f4e2-3b9d-4f7c-a8e5-1d2c3b4a5e6f\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"conversation_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"conversation_kind\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"one_to_one\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"chat_guid\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"channel\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"imessage\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"sent_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-11-05T15:04:12.381Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"held_until\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"held_reason\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"effect\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"reply_to_message_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"attachments\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"edited_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"edit_count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"edit_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"pending\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"unsend_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"unsent_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"422 Unprocessable Entity","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"detail\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"edit_window_expired\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"This message can no longer be edited. Send a follow-up message instead.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Messages"],"summary":"Edit a message","description":"Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of `sent_at` and up to five times, as on an iPhone.\n\nThe edit is accepted with `edit_status: \"pending\"`, and `body` shows the new text at once. When it reaches the recipient, `message.edited` fires with `direction: \"outbound\"` and `edit_count` goes up by one. If it doesn't, `message.edit_failed` fires and `body` goes back to the text they have.\n\nOn iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting \"Edited to\" with the new text, and the original stays. In a group, only members using iMessage see the edit.\n\nSending the text the message already has answers `200` and changes nothing, so a retried request never spends a second edit.\n\nCounts toward the conversation-actions rate limit (300 a minute per account).","operationId":"v1_edit_message_v1_messages__message_id__edit_post","parameters":["644703ed-7d72-4b9b-ac7e-61260020140f"],"requestBody":"5f8bf15e-a865-4001-903c-e9dbb3124ae1","responses":{"200":"f22b0fcf-8fa8-4b8b-8f15-e52bc2403460","202":"6f2fba0d-bf40-4f98-ac2d-93b0502b2e66","401":"cf2dae6f-ce0c-4171-93ec-2b5a5c29b4c5","403":"98b15c7a-4dc8-4bba-9722-71ad705cf0c2","404":"2ade6c94-d8e7-457c-a6df-e89c02c7bdbf","409":"fb9bac86-dbc8-49f9-b58a-84490ec44e81","422":"4325f94e-7a16-42be-bbfd-f6ac91a275f2","429":"84eb8128-fa14-4f80-9e1a-536e5ba8ec8c","503":"870632ba-1360-4ea6-8b20-b00bab5e2838"},"method":"post","type":"path","servers":["4789a700-2d95-431d-8dc1-a09aa915838b"],"security":["5f73800f-9a0e-49b1-9129-ea4ba2f2c2dd"],"path":"/v1/messages/{message_id}/edit","baseUrlOptions":["https://api.ibubbl.com"],"title":"Edit a message","codeSamples":[],"requestExampleLanguages":["bash","typescript","python"],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"4","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -X"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" POST"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" https://api.ibubbl.com/v1/messages/8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b/edit"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"Authorization: Bearer "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$IBUBBL_API_KEY"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"Content-Type: application/json\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -d"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '{\"body\": \"Hey Sam — quick check-in about your order #1042.\"}'"}}]}},"\n"]}}}},"filename":"cURL"},{"dropdown":false,"language":"typescript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"typescript","children":{"type":"code","key":null,"ref":null,"props":{"language":"typescript","numberOfLines":"19","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" messageId"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":";"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" res"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":" await"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":" fetch"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" `https://api.ibubbl.com/v1/messages/"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#569CD6"},"children":"${"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"encodeURIComponent"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"messageId"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#D4D4D4"},"children":")"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#569CD6"},"children":"}"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"/edit`"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" method:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"POST\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" headers:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" Authorization:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" `Bearer "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#569CD6"},"children":"${"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"process"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"env"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":"IBUBBL_API_KEY"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#569CD6"},"children":"}"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"`"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"Content-Type\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":":"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"application/json\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" body:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" JSON"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"stringify"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"({ "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"body:"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"Hey Sam — quick check-in about your order #1042.\""}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }),"}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" signal:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" AbortSignal"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"timeout"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"10_000"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"),"}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":");"}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" data"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":" await"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" res"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"json"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"();"}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"if"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" ("}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"!"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"res"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"ok"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":") "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"throw"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":" new"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":" Error"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"`"}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#569CD6"},"children":"${"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"res"}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"status"}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#569CD6"},"children":"}"}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#569CD6"},"children":" ${"}},{"type":"span","key":"18","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"data"}},{"type":"span","key":"19","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"20","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"detail"}},{"type":"span","key":"21","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#D4D4D4"},"children":"?."}},{"type":"span","key":"22","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"error"}},{"type":"span","key":"23","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#569CD6"},"children":"}"}},{"type":"span","key":"24","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"`"}},{"type":"span","key":"25","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":");"}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"// 202: the edit is on its way; 200: the message already had this text."}}}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"console"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"log"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"res"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"status"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"data"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"edit_status"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"data"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"body"}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":");"}}]}},"\n"]}}}},"filename":"TypeScript"},{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"20","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" os"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" urllib.parse"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" requests"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#D4D4D4"},"children":"API_KEY"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" os.environ["}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"IBUBBL_API_KEY\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"]"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"message_id "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b\""}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"res "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" requests.post("}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":" f"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"https://api.ibubbl.com/v1/messages/"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"{"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"urllib.parse.quote(message_id, "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"safe"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"''"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"}"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"/edit\""}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":" headers"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Authorization\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"f"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Bearer "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"{"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#D4D4D4"},"children":"API_KEY"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"}"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"},"}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":" json"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"body\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Hey Sam — quick check-in about your order #1042.\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"},"}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":" timeout"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"10"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"data "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" res.json()"}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"if"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":" not"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" res.ok:"}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":" raise"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":" RuntimeError"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"f"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"{"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"res.status_code"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"}"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":" {"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"data["}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'detail'"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"]["}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'error'"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"]"}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"}"}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# 202: the edit is on its way; 200: the message already had this text."}}}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#DCDCAA"},"children":"print"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"(res.status_code, data["}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"edit_status\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"], data["}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"body\""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"])"}}]}},"\n"]}}}},"filename":"Python"}],"requestExampleType":"mdx","responseExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"24","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"direction\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"outbound\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"created_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"2026-11-05T15:04:10.112730Z\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"status\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"read\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"to\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"+14155551234\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"body\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Hey Sam — quick check-in about your order #1042.\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"contact_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"c8a1f4e2-3b9d-4f7c-a8e5-1d2c3b4a5e6f\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"conversation_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"conversation_kind\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"one_to_one\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"chat_guid\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"channel\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"imessage\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"sent_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"2026-11-05T15:04:12.381Z\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"held_until\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"held_reason\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"effect\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"reply_to_message_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"attachments\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": [],"}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"edited_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"edit_count\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"edit_status\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"pending\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"unsend_status\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"44","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"unsent_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"null"}}]}},"\n",{"type":"span","key":"46","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"202 Accepted"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"6","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"detail\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"error\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"edit_window_expired\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"This message can no longer be edited. Send a follow-up message instead.\""}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"422 Unprocessable Entity"}],"responseExampleType":"mdx"},"dependencies":{"parameters":{"644703ed-7d72-4b9b-ac7e-61260020140f":{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"body":{"type":"string","maxLength":4000,"minLength":1,"title":"Body","description":"The new text. It replaces the whole text of the message; leading and trailing whitespace is trimmed. For a message that went out with a link preview, keep the link exactly as sent and at the end, and change only the text before it. Fields not listed here are rejected with `422 validation_error`.","isRequired":true,"uniqueKey":"body","typeLabel":"string"}},"additionalProperties":false,"type":"object","required":["body"],"title":"MessageEdit","example":{"body":"Hey Sam — quick check-in about your order #1042."},"uniqueKey":"","typeLabel":"MessageEdit · object"},"examples":{"Example":{"title":"Example","value":{"body":"Hey Sam — quick check-in about your order #1042."}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"f22b0fcf-8fa8-4b8b-8f15-e52bc2403460":{"description":"The message already has this text; nothing changed.","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique message identifier (UUID).","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"direction":{"type":"string","enum":["inbound","outbound"],"title":"Direction","description":"`outbound` = sent from your line (through the API, the dashboard or an automation); `inbound` = received from a contact. An inbound message has `status` `delivered`, or `read` once it has been read in the dashboard.","isRequired":true,"uniqueKey":"direction","typeLabel":"enum\u003cstring>"},"created_at":{"type":"string","title":"Created At","description":"ISO 8601 UTC timestamp, with microseconds and a `Z`, of when iBubbl recorded the message. It never changes, so it is what `GET /v1/messages` sorts and filters by; pass it back as `created_after` / `created_before` unchanged.","examples":["2026-05-17T14:23:45.123456Z"],"isRequired":true,"uniqueKey":"created_at","typeLabel":"string"},"status":{"type":"string","enum":["queued","pending","sent","delivered","read","failed","expired","cancelled"],"title":"Status","description":"Lifecycle state. `pending` = accepted and on its way out; it may be waiting for the contact's working hours or the line's hourly limit for new contacts (see `held_until`). `queued` = parked by a capacity hold (`hourly_cap_hit` / `line_offline`), retried automatically. `sent` / `delivered` / `read` = delivery progression. `failed` = the send failed — see webhook `message.failed` for the reason; it can follow `sent` (or a `read` with no confirmed delivery) when iMessage reports the send failed after accepting it (`failed_reason` `imessage_undeliverable` / `imessage_error:\u003ccode>`), and such a message can still move to `delivered` / `read` if Apple later confirms it. `expired` = still queued after an hour, so dropped; it will not send. `cancelled` = stopped in the dashboard before it was sent; it will not send (webhook `message.cancelled`).","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"body":{"type":"string","title":"Body","description":"The message text as sent.","isRequired":true,"uniqueKey":"body","typeLabel":"string"},"attachments":{"items":{"properties":{"kind":{"type":"string","enum":["image","gif","video","audio","file"],"title":"Kind","description":"`file` is a PDF (or another document).","isRequired":true,"uniqueKey":"attachments.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"mime_type":{"type":"string","title":"Mime Type","examples":["image/jpeg"],"isRequired":true,"uniqueKey":"attachments.items.[INDEX].mime_type","typeLabel":"string"},"size_bytes":{"type":"integer","title":"Size Bytes","description":"Size in bytes. An inbound file can show `0` for a few seconds, until iBubbl has received it.","isRequired":true,"uniqueKey":"attachments.items.[INDEX].size_bytes","typeLabel":"integer"}},"type":"object","required":["kind","mime_type","size_bytes"],"title":"MessageAttachment","uniqueKey":"attachments.items.[INDEX]","typeLabel":"MessageAttachment · object"},"type":"array","title":"Attachments","description":"The files on this message, in the order they were sent: sent with `attachments`, from the dashboard or an automation, or received from the contact. Empty when there are none. File contents and URLs are not returned.","isRequired":true,"uniqueKey":"attachments","typeLabel":"MessageAttachment · object[]"},"to":{"oneOf":[{"type":"string","title":"To","description":"The contact's phone number (E.164) for 1:1 messages: the destination of an outbound message, and the sender of an inbound one. Null for group messages — the group is identified by `chat_guid` instead.","example":"+14155551234","uniqueKey":"to.oneOf.0","typeLabel":"string"},{"type":"null","title":"To","description":"The contact's phone number (E.164) for 1:1 messages: the destination of an outbound message, and the sender of an inbound one. Null for group messages — the group is identified by `chat_guid` instead.","example":"+14155551234","uniqueKey":"to.oneOf.1","typeLabel":"null"}],"uniqueKey":"to","typeLabel":"string | null"},"contact_id":{"oneOf":[{"type":"string","title":"Contact Id","description":"ID of the contact this message was sent to. For groups, this is the 'primary' participant the message was addressed to (the first participant in `participant_phones` on a new group create); the conversation's full participant list is available via the conversation.","uniqueKey":"contact_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Contact Id","description":"ID of the contact this message was sent to. For groups, this is the 'primary' participant the message was addressed to (the first participant in `participant_phones` on a new group create); the conversation's full participant list is available via the conversation.","uniqueKey":"contact_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"contact_id","typeLabel":"string | null"},"conversation_id":{"oneOf":[{"type":"string","title":"Conversation Id","description":"ID of the conversation this message belongs to. Stable for the lifetime of the conversation; use it to fetch the thread or correlate webhook events.","uniqueKey":"conversation_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Conversation Id","description":"ID of the conversation this message belongs to. Stable for the lifetime of the conversation; use it to fetch the thread or correlate webhook events.","uniqueKey":"conversation_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"conversation_id","typeLabel":"string | null"},"conversation_kind":{"type":"string","enum":["one_to_one","group"],"title":"Conversation Kind","description":"`one_to_one` for sends to a single contact, `group` for iMessage groups (2+ participants in addition to your iBubbl line).","default":"one_to_one","uniqueKey":"conversation_kind","typeLabel":"enum\u003cstring>"},"chat_guid":{"oneOf":[{"type":"string","title":"Chat Guid","description":"Opaque identifier for the group chat (e.g. `any;+;\u003chex>`). Returned for `group` messages — use it to address later messages to the same group via the `chat_guid` request shape. Null for `one_to_one` messages, and for a brand-new group until the group has been created in iMessage (that happens when the first message goes out, which can wait for sending hours); poll `GET /v1/messages/{id}` to see it fill in. It changes when a participant is added to the group.","example":"any;+;067ace6caf6c43aaa2f7d643975e15ea","uniqueKey":"chat_guid.oneOf.0","typeLabel":"string"},{"type":"null","title":"Chat Guid","description":"Opaque identifier for the group chat (e.g. `any;+;\u003chex>`). Returned for `group` messages — use it to address later messages to the same group via the `chat_guid` request shape. Null for `one_to_one` messages, and for a brand-new group until the group has been created in iMessage (that happens when the first message goes out, which can wait for sending hours); poll `GET /v1/messages/{id}` to see it fill in. It changes when a participant is added to the group.","example":"any;+;067ace6caf6c43aaa2f7d643975e15ea","uniqueKey":"chat_guid.oneOf.1","typeLabel":"null"}],"uniqueKey":"chat_guid","typeLabel":"string | null"},"channel":{"oneOf":[{"type":"string","title":"Channel","description":"How the message travelled: `imessage`, or `sms` (a text, including RCS). For an outbound message, how it actually went out (`sms` when the recipient couldn't be reached on iMessage); null until it has been sent. For an inbound message, how it arrived; null when that wasn't recorded.","enum":["imessage","sms"],"uniqueKey":"channel.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Channel","description":"How the message travelled: `imessage`, or `sms` (a text, including RCS). For an outbound message, how it actually went out (`sms` when the recipient couldn't be reached on iMessage); null until it has been sent. For an inbound message, how it arrived; null when that wasn't recorded.","uniqueKey":"channel.oneOf.1","typeLabel":"null"}],"uniqueKey":"channel","typeLabel":"enum\u003cstring> | null"},"sent_at":{"oneOf":[{"type":"string","title":"Sent At","description":"ISO 8601 UTC timestamp. Set when the message is accepted, then replaced by the actual send time once it goes out. Use `status` (`sent` / `delivered` / `read`), not `sent_at`, to tell whether it has actually gone out.","example":"2026-05-17T14:23:45.123Z","uniqueKey":"sent_at.oneOf.0","typeLabel":"string"},{"type":"null","title":"Sent At","description":"ISO 8601 UTC timestamp. Set when the message is accepted, then replaced by the actual send time once it goes out. Use `status` (`sent` / `delivered` / `read`), not `sent_at`, to tell whether it has actually gone out.","example":"2026-05-17T14:23:45.123Z","uniqueKey":"sent_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"sent_at","typeLabel":"string | null"},"held_until":{"oneOf":[{"type":"string","title":"Held Until","description":"While a `pending` message is being held, the expected time (ISO 8601 UTC) it will go out: the next opening of the contact's working hours; for `hourly_limit`, an estimate of when a slot frees. Recomputed within about 10 seconds. Null when the message is not held, when `held_reason` is `working_hours` but no sending day is enabled, and when it is `hourly_limit` with no estimate.","example":"2026-10-08T16:00:00+00:00","uniqueKey":"held_until.oneOf.0","typeLabel":"string"},{"type":"null","title":"Held Until","description":"While a `pending` message is being held, the expected time (ISO 8601 UTC) it will go out: the next opening of the contact's working hours; for `hourly_limit`, an estimate of when a slot frees. Recomputed within about 10 seconds. Null when the message is not held, when `held_reason` is `working_hours` but no sending day is enabled, and when it is `hourly_limit` with no estimate.","example":"2026-10-08T16:00:00+00:00","uniqueKey":"held_until.oneOf.1","typeLabel":"null"}],"uniqueKey":"held_until","typeLabel":"string | null"},"held_reason":{"oneOf":[{"type":"string","title":"Held Reason","description":"Why a `pending` message is being held right now: `working_hours` (outside the contact's working hours) or `hourly_limit` (the line has started its limit of new contacts for this hour; the message goes out by itself when a slot frees, at about `held_until`). Null when it is not held.","enum":["working_hours","hourly_limit"],"uniqueKey":"held_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Held Reason","description":"Why a `pending` message is being held right now: `working_hours` (outside the contact's working hours) or `hourly_limit` (the line has started its limit of new contacts for this hour; the message goes out by itself when a slot frees, at about `held_until`). Null when it is not held.","uniqueKey":"held_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"held_reason","typeLabel":"enum\u003cstring> | null"},"effect":{"oneOf":[{"type":"string","title":"Effect","description":"The iMessage send effect requested for this message, or null. It shows on the recipient's device only when `channel` is `imessage`.","enum":["slam","loud","gentle","invisible","echo","spotlight","balloons","confetti","love","lasers","fireworks","celebration","shooting_star"],"uniqueKey":"effect.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Effect","description":"The iMessage send effect requested for this message, or null. It shows on the recipient's device only when `channel` is `imessage`.","uniqueKey":"effect.oneOf.1","typeLabel":"null"}],"uniqueKey":"effect","typeLabel":"enum\u003cstring> | null"},"reply_to_message_id":{"oneOf":[{"type":"string","title":"Reply To Message Id","description":"The ID of the message this one quotes as an inline reply, or null. The quote shows on the recipient's device only when `channel` is `imessage`.","uniqueKey":"reply_to_message_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reply To Message Id","description":"The ID of the message this one quotes as an inline reply, or null. The quote shows on the recipient's device only when `channel` is `imessage`.","uniqueKey":"reply_to_message_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"reply_to_message_id","typeLabel":"string | null"},"edited_at":{"oneOf":[{"type":"string","title":"Edited At","description":"ISO 8601 UTC timestamp of the latest edit that reached the recipient: one of yours (`POST /v1/messages/{id}/edit`, or the dashboard), or, on an inbound message, the contact's own edit. Null when it was never edited.","example":"2026-05-17T14:25:00.000000Z","uniqueKey":"edited_at.oneOf.0","typeLabel":"string"},{"type":"null","title":"Edited At","description":"ISO 8601 UTC timestamp of the latest edit that reached the recipient: one of yours (`POST /v1/messages/{id}/edit`, or the dashboard), or, on an inbound message, the contact's own edit. Null when it was never edited.","example":"2026-05-17T14:25:00.000000Z","uniqueKey":"edited_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"edited_at","typeLabel":"string | null"},"edit_count":{"type":"integer","maximum":5,"minimum":0,"title":"Edit Count","description":"How many of your edits reached the recipient. iMessage allows five per message. Always `0` on an inbound message.","default":0,"uniqueKey":"edit_count","typeLabel":"integer"},"edit_status":{"oneOf":[{"type":"string","title":"Edit Status","description":"`pending` = your latest edit is on its way (`body` already shows the new text); `failed` = it didn't reach the recipient, and `body` is back to the text they have (webhook `message.edit_failed`); `edited` = the message was edited. Null when it never was.","enum":["pending","edited","failed"],"uniqueKey":"edit_status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Edit Status","description":"`pending` = your latest edit is on its way (`body` already shows the new text); `failed` = it didn't reach the recipient, and `body` is back to the text they have (webhook `message.edit_failed`); `edited` = the message was edited. Null when it never was.","uniqueKey":"edit_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"edit_status","typeLabel":"enum\u003cstring> | null"},"unsend_status":{"oneOf":[{"type":"string","title":"Unsend Status","description":"`pending` = your Undo Send is on its way; `unsent` = the whole message was unsent (by you, or by the contact on an inbound message) and `body` is empty; `partly_unsent` = part of it was (its text, a link preview or a file); `failed` = your Undo Send didn't happen and the recipient still has the message (webhook `message.unsend_failed`). Null when nothing was unsent.","enum":["pending","unsent","partly_unsent","failed"],"uniqueKey":"unsend_status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Unsend Status","description":"`pending` = your Undo Send is on its way; `unsent` = the whole message was unsent (by you, or by the contact on an inbound message) and `body` is empty; `partly_unsent` = part of it was (its text, a link preview or a file); `failed` = your Undo Send didn't happen and the recipient still has the message (webhook `message.unsend_failed`). Null when nothing was unsent.","uniqueKey":"unsend_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"unsend_status","typeLabel":"enum\u003cstring> | null"},"unsent_at":{"oneOf":[{"type":"string","title":"Unsent At","description":"ISO 8601 UTC timestamp of when the message (or the latest part of it) was unsent. Null unless `unsend_status` is `unsent` or `partly_unsent`.","example":"2026-05-17T14:24:10.000000Z","uniqueKey":"unsent_at.oneOf.0","typeLabel":"string"},{"type":"null","title":"Unsent At","description":"ISO 8601 UTC timestamp of when the message (or the latest part of it) was unsent. Null unless `unsend_status` is `unsent` or `partly_unsent`.","example":"2026-05-17T14:24:10.000000Z","uniqueKey":"unsent_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"unsent_at","typeLabel":"string | null"}},"type":"object","required":["id","direction","created_at","status","body","attachments"],"title":"Message","example":{"attachments":[],"body":"Hey Sam — quick check-in about your order.","contact_id":"c8a1f4e2-3b9d-4f7c-a8e5-1d2c3b4a5e6f","conversation_id":"3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d","conversation_kind":"one_to_one","created_at":"2026-10-08T11:40:44.770512Z","direction":"outbound","held_reason":"working_hours","held_until":"2026-10-08T16:00:00+00:00","id":"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b","sent_at":"2026-10-08T11:40:44.770Z","status":"pending","to":"+14155551234"},"uniqueKey":"","typeLabel":"Message · object"},"examples":{"Example":{"title":"Example","value":{"attachments":[],"body":"Hey Sam — quick check-in about your order.","contact_id":"c8a1f4e2-3b9d-4f7c-a8e5-1d2c3b4a5e6f","conversation_id":"3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d","conversation_kind":"one_to_one","created_at":"2026-10-08T11:40:44.770512Z","direction":"outbound","held_reason":"working_hours","held_until":"2026-10-08T16:00:00+00:00","id":"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b","sent_at":"2026-10-08T11:40:44.770Z","status":"pending","to":"+14155551234"}}},"exampleType":"generated"}},"exampleType":"generated"},"6f2fba0d-bf40-4f98-ac2d-93b0502b2e66":{"description":"Edit accepted.","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique message identifier (UUID).","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"direction":{"type":"string","enum":["inbound","outbound"],"title":"Direction","description":"`outbound` = sent from your line (through the API, the dashboard or an automation); `inbound` = received from a contact. An inbound message has `status` `delivered`, or `read` once it has been read in the dashboard.","isRequired":true,"uniqueKey":"direction","typeLabel":"enum\u003cstring>"},"created_at":{"type":"string","title":"Created At","description":"ISO 8601 UTC timestamp, with microseconds and a `Z`, of when iBubbl recorded the message. It never changes, so it is what `GET /v1/messages` sorts and filters by; pass it back as `created_after` / `created_before` unchanged.","examples":["2026-05-17T14:23:45.123456Z"],"isRequired":true,"uniqueKey":"created_at","typeLabel":"string"},"status":{"type":"string","enum":["queued","pending","sent","delivered","read","failed","expired","cancelled"],"title":"Status","description":"Lifecycle state. `pending` = accepted and on its way out; it may be waiting for the contact's working hours or the line's hourly limit for new contacts (see `held_until`). `queued` = parked by a capacity hold (`hourly_cap_hit` / `line_offline`), retried automatically. `sent` / `delivered` / `read` = delivery progression. `failed` = the send failed — see webhook `message.failed` for the reason; it can follow `sent` (or a `read` with no confirmed delivery) when iMessage reports the send failed after accepting it (`failed_reason` `imessage_undeliverable` / `imessage_error:\u003ccode>`), and such a message can still move to `delivered` / `read` if Apple later confirms it. `expired` = still queued after an hour, so dropped; it will not send. `cancelled` = stopped in the dashboard before it was sent; it will not send (webhook `message.cancelled`).","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"body":{"type":"string","title":"Body","description":"The message text as sent.","isRequired":true,"uniqueKey":"body","typeLabel":"string"},"attachments":{"items":{"properties":{"kind":{"type":"string","enum":["image","gif","video","audio","file"],"title":"Kind","description":"`file` is a PDF (or another document).","isRequired":true,"uniqueKey":"attachments.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"mime_type":{"type":"string","title":"Mime Type","examples":["image/jpeg"],"isRequired":true,"uniqueKey":"attachments.items.[INDEX].mime_type","typeLabel":"string"},"size_bytes":{"type":"integer","title":"Size Bytes","description":"Size in bytes. An inbound file can show `0` for a few seconds, until iBubbl has received it.","isRequired":true,"uniqueKey":"attachments.items.[INDEX].size_bytes","typeLabel":"integer"}},"type":"object","required":["kind","mime_type","size_bytes"],"title":"MessageAttachment","uniqueKey":"attachments.items.[INDEX]","typeLabel":"MessageAttachment · object"},"type":"array","title":"Attachments","description":"The files on this message, in the order they were sent: sent with `attachments`, from the dashboard or an automation, or received from the contact. Empty when there are none. File contents and URLs are not returned.","isRequired":true,"uniqueKey":"attachments","typeLabel":"MessageAttachment · object[]"},"to":{"oneOf":[{"type":"string","title":"To","description":"The contact's phone number (E.164) for 1:1 messages: the destination of an outbound message, and the sender of an inbound one. Null for group messages — the group is identified by `chat_guid` instead.","example":"+14155551234","uniqueKey":"to.oneOf.0","typeLabel":"string"},{"type":"null","title":"To","description":"The contact's phone number (E.164) for 1:1 messages: the destination of an outbound message, and the sender of an inbound one. Null for group messages — the group is identified by `chat_guid` instead.","example":"+14155551234","uniqueKey":"to.oneOf.1","typeLabel":"null"}],"uniqueKey":"to","typeLabel":"string | null"},"contact_id":{"oneOf":[{"type":"string","title":"Contact Id","description":"ID of the contact this message was sent to. For groups, this is the 'primary' participant the message was addressed to (the first participant in `participant_phones` on a new group create); the conversation's full participant list is available via the conversation.","uniqueKey":"contact_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Contact Id","description":"ID of the contact this message was sent to. For groups, this is the 'primary' participant the message was addressed to (the first participant in `participant_phones` on a new group create); the conversation's full participant list is available via the conversation.","uniqueKey":"contact_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"contact_id","typeLabel":"string | null"},"conversation_id":{"oneOf":[{"type":"string","title":"Conversation Id","description":"ID of the conversation this message belongs to. Stable for the lifetime of the conversation; use it to fetch the thread or correlate webhook events.","uniqueKey":"conversation_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Conversation Id","description":"ID of the conversation this message belongs to. Stable for the lifetime of the conversation; use it to fetch the thread or correlate webhook events.","uniqueKey":"conversation_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"conversation_id","typeLabel":"string | null"},"conversation_kind":{"type":"string","enum":["one_to_one","group"],"title":"Conversation Kind","description":"`one_to_one` for sends to a single contact, `group` for iMessage groups (2+ participants in addition to your iBubbl line).","default":"one_to_one","uniqueKey":"conversation_kind","typeLabel":"enum\u003cstring>"},"chat_guid":{"oneOf":[{"type":"string","title":"Chat Guid","description":"Opaque identifier for the group chat (e.g. `any;+;\u003chex>`). Returned for `group` messages — use it to address later messages to the same group via the `chat_guid` request shape. Null for `one_to_one` messages, and for a brand-new group until the group has been created in iMessage (that happens when the first message goes out, which can wait for sending hours); poll `GET /v1/messages/{id}` to see it fill in. It changes when a participant is added to the group.","example":"any;+;067ace6caf6c43aaa2f7d643975e15ea","uniqueKey":"chat_guid.oneOf.0","typeLabel":"string"},{"type":"null","title":"Chat Guid","description":"Opaque identifier for the group chat (e.g. `any;+;\u003chex>`). Returned for `group` messages — use it to address later messages to the same group via the `chat_guid` request shape. Null for `one_to_one` messages, and for a brand-new group until the group has been created in iMessage (that happens when the first message goes out, which can wait for sending hours); poll `GET /v1/messages/{id}` to see it fill in. It changes when a participant is added to the group.","example":"any;+;067ace6caf6c43aaa2f7d643975e15ea","uniqueKey":"chat_guid.oneOf.1","typeLabel":"null"}],"uniqueKey":"chat_guid","typeLabel":"string | null"},"channel":{"oneOf":[{"type":"string","title":"Channel","description":"How the message travelled: `imessage`, or `sms` (a text, including RCS). For an outbound message, how it actually went out (`sms` when the recipient couldn't be reached on iMessage); null until it has been sent. For an inbound message, how it arrived; null when that wasn't recorded.","enum":["imessage","sms"],"uniqueKey":"channel.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Channel","description":"How the message travelled: `imessage`, or `sms` (a text, including RCS). For an outbound message, how it actually went out (`sms` when the recipient couldn't be reached on iMessage); null until it has been sent. For an inbound message, how it arrived; null when that wasn't recorded.","uniqueKey":"channel.oneOf.1","typeLabel":"null"}],"uniqueKey":"channel","typeLabel":"enum\u003cstring> | null"},"sent_at":{"oneOf":[{"type":"string","title":"Sent At","description":"ISO 8601 UTC timestamp. Set when the message is accepted, then replaced by the actual send time once it goes out. Use `status` (`sent` / `delivered` / `read`), not `sent_at`, to tell whether it has actually gone out.","example":"2026-05-17T14:23:45.123Z","uniqueKey":"sent_at.oneOf.0","typeLabel":"string"},{"type":"null","title":"Sent At","description":"ISO 8601 UTC timestamp. Set when the message is accepted, then replaced by the actual send time once it goes out. Use `status` (`sent` / `delivered` / `read`), not `sent_at`, to tell whether it has actually gone out.","example":"2026-05-17T14:23:45.123Z","uniqueKey":"sent_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"sent_at","typeLabel":"string | null"},"held_until":{"oneOf":[{"type":"string","title":"Held Until","description":"While a `pending` message is being held, the expected time (ISO 8601 UTC) it will go out: the next opening of the contact's working hours; for `hourly_limit`, an estimate of when a slot frees. Recomputed within about 10 seconds. Null when the message is not held, when `held_reason` is `working_hours` but no sending day is enabled, and when it is `hourly_limit` with no estimate.","example":"2026-10-08T16:00:00+00:00","uniqueKey":"held_until.oneOf.0","typeLabel":"string"},{"type":"null","title":"Held Until","description":"While a `pending` message is being held, the expected time (ISO 8601 UTC) it will go out: the next opening of the contact's working hours; for `hourly_limit`, an estimate of when a slot frees. Recomputed within about 10 seconds. Null when the message is not held, when `held_reason` is `working_hours` but no sending day is enabled, and when it is `hourly_limit` with no estimate.","example":"2026-10-08T16:00:00+00:00","uniqueKey":"held_until.oneOf.1","typeLabel":"null"}],"uniqueKey":"held_until","typeLabel":"string | null"},"held_reason":{"oneOf":[{"type":"string","title":"Held Reason","description":"Why a `pending` message is being held right now: `working_hours` (outside the contact's working hours) or `hourly_limit` (the line has started its limit of new contacts for this hour; the message goes out by itself when a slot frees, at about `held_until`). Null when it is not held.","enum":["working_hours","hourly_limit"],"uniqueKey":"held_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Held Reason","description":"Why a `pending` message is being held right now: `working_hours` (outside the contact's working hours) or `hourly_limit` (the line has started its limit of new contacts for this hour; the message goes out by itself when a slot frees, at about `held_until`). Null when it is not held.","uniqueKey":"held_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"held_reason","typeLabel":"enum\u003cstring> | null"},"effect":{"oneOf":[{"type":"string","title":"Effect","description":"The iMessage send effect requested for this message, or null. It shows on the recipient's device only when `channel` is `imessage`.","enum":["slam","loud","gentle","invisible","echo","spotlight","balloons","confetti","love","lasers","fireworks","celebration","shooting_star"],"uniqueKey":"effect.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Effect","description":"The iMessage send effect requested for this message, or null. It shows on the recipient's device only when `channel` is `imessage`.","uniqueKey":"effect.oneOf.1","typeLabel":"null"}],"uniqueKey":"effect","typeLabel":"enum\u003cstring> | null"},"reply_to_message_id":{"oneOf":[{"type":"string","title":"Reply To Message Id","description":"The ID of the message this one quotes as an inline reply, or null. The quote shows on the recipient's device only when `channel` is `imessage`.","uniqueKey":"reply_to_message_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reply To Message Id","description":"The ID of the message this one quotes as an inline reply, or null. The quote shows on the recipient's device only when `channel` is `imessage`.","uniqueKey":"reply_to_message_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"reply_to_message_id","typeLabel":"string | null"},"edited_at":{"oneOf":[{"type":"string","title":"Edited At","description":"ISO 8601 UTC timestamp of the latest edit that reached the recipient: one of yours (`POST /v1/messages/{id}/edit`, or the dashboard), or, on an inbound message, the contact's own edit. Null when it was never edited.","example":"2026-05-17T14:25:00.000000Z","uniqueKey":"edited_at.oneOf.0","typeLabel":"string"},{"type":"null","title":"Edited At","description":"ISO 8601 UTC timestamp of the latest edit that reached the recipient: one of yours (`POST /v1/messages/{id}/edit`, or the dashboard), or, on an inbound message, the contact's own edit. Null when it was never edited.","example":"2026-05-17T14:25:00.000000Z","uniqueKey":"edited_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"edited_at","typeLabel":"string | null"},"edit_count":{"type":"integer","maximum":5,"minimum":0,"title":"Edit Count","description":"How many of your edits reached the recipient. iMessage allows five per message. Always `0` on an inbound message.","default":0,"uniqueKey":"edit_count","typeLabel":"integer"},"edit_status":{"oneOf":[{"type":"string","title":"Edit Status","description":"`pending` = your latest edit is on its way (`body` already shows the new text); `failed` = it didn't reach the recipient, and `body` is back to the text they have (webhook `message.edit_failed`); `edited` = the message was edited. Null when it never was.","enum":["pending","edited","failed"],"uniqueKey":"edit_status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Edit Status","description":"`pending` = your latest edit is on its way (`body` already shows the new text); `failed` = it didn't reach the recipient, and `body` is back to the text they have (webhook `message.edit_failed`); `edited` = the message was edited. Null when it never was.","uniqueKey":"edit_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"edit_status","typeLabel":"enum\u003cstring> | null"},"unsend_status":{"oneOf":[{"type":"string","title":"Unsend Status","description":"`pending` = your Undo Send is on its way; `unsent` = the whole message was unsent (by you, or by the contact on an inbound message) and `body` is empty; `partly_unsent` = part of it was (its text, a link preview or a file); `failed` = your Undo Send didn't happen and the recipient still has the message (webhook `message.unsend_failed`). Null when nothing was unsent.","enum":["pending","unsent","partly_unsent","failed"],"uniqueKey":"unsend_status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Unsend Status","description":"`pending` = your Undo Send is on its way; `unsent` = the whole message was unsent (by you, or by the contact on an inbound message) and `body` is empty; `partly_unsent` = part of it was (its text, a link preview or a file); `failed` = your Undo Send didn't happen and the recipient still has the message (webhook `message.unsend_failed`). Null when nothing was unsent.","uniqueKey":"unsend_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"unsend_status","typeLabel":"enum\u003cstring> | null"},"unsent_at":{"oneOf":[{"type":"string","title":"Unsent At","description":"ISO 8601 UTC timestamp of when the message (or the latest part of it) was unsent. Null unless `unsend_status` is `unsent` or `partly_unsent`.","example":"2026-05-17T14:24:10.000000Z","uniqueKey":"unsent_at.oneOf.0","typeLabel":"string"},{"type":"null","title":"Unsent At","description":"ISO 8601 UTC timestamp of when the message (or the latest part of it) was unsent. Null unless `unsend_status` is `unsent` or `partly_unsent`.","example":"2026-05-17T14:24:10.000000Z","uniqueKey":"unsent_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"unsent_at","typeLabel":"string | null"}},"type":"object","required":["id","direction","created_at","status","body","attachments"],"title":"Message","example":{"attachments":[],"body":"Hey Sam — quick check-in about your order.","contact_id":"c8a1f4e2-3b9d-4f7c-a8e5-1d2c3b4a5e6f","conversation_id":"3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d","conversation_kind":"one_to_one","created_at":"2026-10-08T11:40:44.770512Z","direction":"outbound","held_reason":"working_hours","held_until":"2026-10-08T16:00:00+00:00","id":"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b","sent_at":"2026-10-08T11:40:44.770Z","status":"pending","to":"+14155551234"},"uniqueKey":"","typeLabel":"Message · object"},"examples":{"Example":{"title":"Example","value":{"attachments":[],"body":"Hey Sam — quick check-in about your order.","contact_id":"c8a1f4e2-3b9d-4f7c-a8e5-1d2c3b4a5e6f","conversation_id":"3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d","conversation_kind":"one_to_one","created_at":"2026-10-08T11:40:44.770512Z","direction":"outbound","held_reason":"working_hours","held_until":"2026-10-08T16:00:00+00:00","id":"8b3a4e72-1c2d-4e5f-9a0b-2c3d4e5f6a7b","sent_at":"2026-10-08T11:40:44.770Z","status":"pending","to":"+14155551234"}}},"exampleType":"generated"}},"exampleType":"generated"},"cf2dae6f-ce0c-4171-93ec-2b5a5c29b4c5":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"object","title":"ApiErrorDetail","description":"Error envelope. Every `/v1` error response wraps a stable `error` code and a human-readable `message` in `detail`.","required":["error","message"],"properties":{"error":{"type":"string","title":"Error","description":"Stable machine-readable error code. Use this for branching logic in your integration; the human-readable `message` is subject to change. See the Error Reference for the catalog.","examples":["validation_error"],"isRequired":true,"uniqueKey":"detail.error","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable description of what went wrong.","examples":["Exactly one of contact_id, to, chat_guid, or participant_phones is required"],"isRequired":true,"uniqueKey":"detail.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"detail","typeLabel":"ApiErrorDetail · object"}},"type":"object","required":["detail"],"title":"ApiError","example":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}},"uniqueKey":"","typeLabel":"ApiError · object"},"examples":{"Example":{"title":"Example","value":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}}}},"exampleType":"generated"}},"exampleType":"generated"},"98b15c7a-4dc8-4bba-9722-71ad705cf0c2":{"description":"`forbidden`: your iBubbl account is suspended or cancelled.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"object","title":"ApiErrorDetail","description":"Error envelope. Every `/v1` error response wraps a stable `error` code and a human-readable `message` in `detail`.","required":["error","message"],"properties":{"error":{"type":"string","title":"Error","description":"Stable machine-readable error code. Use this for branching logic in your integration; the human-readable `message` is subject to change. See the Error Reference for the catalog.","examples":["validation_error"],"isRequired":true,"uniqueKey":"detail.error","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable description of what went wrong.","examples":["Exactly one of contact_id, to, chat_guid, or participant_phones is required"],"isRequired":true,"uniqueKey":"detail.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"detail","typeLabel":"ApiErrorDetail · object"}},"type":"object","required":["detail"],"title":"ApiError","example":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}},"uniqueKey":"","typeLabel":"ApiError · object"},"examples":{"Example":{"title":"Example","value":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}}}},"exampleType":"generated"}},"exampleType":"generated"},"2ade6c94-d8e7-457c-a6df-e89c02c7bdbf":{"description":"Message not found.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"object","title":"ApiErrorDetail","description":"Error envelope. Every `/v1` error response wraps a stable `error` code and a human-readable `message` in `detail`.","required":["error","message"],"properties":{"error":{"type":"string","title":"Error","description":"Stable machine-readable error code. Use this for branching logic in your integration; the human-readable `message` is subject to change. See the Error Reference for the catalog.","examples":["validation_error"],"isRequired":true,"uniqueKey":"detail.error","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable description of what went wrong.","examples":["Exactly one of contact_id, to, chat_guid, or participant_phones is required"],"isRequired":true,"uniqueKey":"detail.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"detail","typeLabel":"ApiErrorDetail · object"}},"type":"object","required":["detail"],"title":"ApiError","example":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}},"uniqueKey":"","typeLabel":"ApiError · object"},"examples":{"Example":{"title":"Example","value":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}}}},"exampleType":"generated"}},"exampleType":"generated"},"fb9bac86-dbc8-49f9-b58a-84490ec44e81":{"description":"`edit_in_flight` (your previous edit hasn't reached the recipient yet; retry in a few seconds) or `already_unsent`.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"object","title":"ApiErrorDetail","description":"Error envelope. Every `/v1` error response wraps a stable `error` code and a human-readable `message` in `detail`.","required":["error","message"],"properties":{"error":{"type":"string","title":"Error","description":"Stable machine-readable error code. Use this for branching logic in your integration; the human-readable `message` is subject to change. See the Error Reference for the catalog.","examples":["validation_error"],"isRequired":true,"uniqueKey":"detail.error","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable description of what went wrong.","examples":["Exactly one of contact_id, to, chat_guid, or participant_phones is required"],"isRequired":true,"uniqueKey":"detail.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"detail","typeLabel":"ApiErrorDetail · object"}},"type":"object","required":["detail"],"title":"ApiError","example":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}},"uniqueKey":"","typeLabel":"ApiError · object"},"examples":{"Example":{"title":"Example","value":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}}}},"exampleType":"generated"}},"exampleType":"generated"},"4325f94e-7a16-42be-bbfd-f6ac91a275f2":{"description":"`validation_error` (bad body), `invalid_target` (a message you received), `sms_not_supported` (it went out by SMS), `not_sent_yet` (still waiting to go out: cancel it instead), `not_editable` (no text to edit, or it failed or never went out), `edit_window_expired`, `edit_limit_reached`, `link_changed`, `contact_blocked`, `contact_opted_out`.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"object","title":"ApiErrorDetail","description":"Error envelope. Every `/v1` error response wraps a stable `error` code and a human-readable `message` in `detail`.","required":["error","message"],"properties":{"error":{"type":"string","title":"Error","description":"Stable machine-readable error code. Use this for branching logic in your integration; the human-readable `message` is subject to change. See the Error Reference for the catalog.","examples":["validation_error"],"isRequired":true,"uniqueKey":"detail.error","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable description of what went wrong.","examples":["Exactly one of contact_id, to, chat_guid, or participant_phones is required"],"isRequired":true,"uniqueKey":"detail.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"detail","typeLabel":"ApiErrorDetail · object"}},"type":"object","required":["detail"],"title":"ApiError","example":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}},"uniqueKey":"","typeLabel":"ApiError · object"},"examples":{"Example":{"title":"Example","value":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}}}},"exampleType":"generated"}},"exampleType":"generated"},"84eb8128-fa14-4f80-9e1a-536e5ba8ec8c":{"description":"`rate_limited`: more than 300 conversation actions in 60 seconds from your account (all keys, and tapbacks, read, typing, edit, unsend and cancel requests, count together; list requests have their own budget). Wait `Retry-After` seconds, then send the same request again.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"properties":{"detail":{"type":"object","title":"ApiErrorDetail","description":"Error envelope. Every `/v1` error response wraps a stable `error` code and a human-readable `message` in `detail`.","required":["error","message"],"properties":{"error":{"type":"string","title":"Error","description":"Stable machine-readable error code. Use this for branching logic in your integration; the human-readable `message` is subject to change. See the Error Reference for the catalog.","examples":["validation_error"],"isRequired":true,"uniqueKey":"detail.error","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable description of what went wrong.","examples":["Exactly one of contact_id, to, chat_guid, or participant_phones is required"],"isRequired":true,"uniqueKey":"detail.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"detail","typeLabel":"ApiErrorDetail · object"}},"type":"object","required":["detail"],"title":"ApiError","example":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}},"uniqueKey":"","typeLabel":"ApiError · object"},"examples":{"Example":{"title":"Example","value":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}}}},"exampleType":"generated"}},"exampleType":"generated"},"870632ba-1360-4ea6-8b20-b00bab5e2838":{"description":"`opt_out_check_unavailable`: the contact's opt-out couldn't be checked, so nothing was changed. Retry.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"object","title":"ApiErrorDetail","description":"Error envelope. Every `/v1` error response wraps a stable `error` code and a human-readable `message` in `detail`.","required":["error","message"],"properties":{"error":{"type":"string","title":"Error","description":"Stable machine-readable error code. Use this for branching logic in your integration; the human-readable `message` is subject to change. See the Error Reference for the catalog.","examples":["validation_error"],"isRequired":true,"uniqueKey":"detail.error","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable description of what went wrong.","examples":["Exactly one of contact_id, to, chat_guid, or participant_phones is required"],"isRequired":true,"uniqueKey":"detail.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"detail","typeLabel":"ApiErrorDetail · object"}},"type":"object","required":["detail"],"title":"ApiError","example":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}},"uniqueKey":"","typeLabel":"ApiError · object"},"examples":{"Example":{"title":"Example","value":{"detail":{"error":"validation_error","message":"Exactly one of contact_id, to, chat_guid, or participant_phones is required"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"5f73800f-9a0e-49b1-9129-ea4ba2f2c2dd":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"ib_pk_\u003c64 hex>","description":"Bearer API key. Format: `Authorization: Bearer ib_pk_\u003c64 hex>` (70 characters). Generate keys from Dashboard → Settings → API Access.","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"4789a700-2d95-431d-8dc1-a09aa915838b":{"url":"https://api.ibubbl.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"ib_pk_\u003c64 hex>","description":"Bearer API key. Format: `Authorization: Bearer ib_pk_\u003c64 hex>` (70 characters). Generate keys from Dashboard → Settings → API Access.","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer API key. Format: `Authorization: Bearer ib_pk_\u003c64 hex>` (70 characters). Generate keys from Dashboard → Settings → API Access.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi/public.json"},"subdomain":"ibubbl","siteName":"iBubbl","title":"Edit a message - iBubbl","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-11T20:39:59.056Z","originalFileLocation":"api-reference/messages/edit.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of sent_at and up to five times, as on an iPhone. The edit is accepted with edit_status: \u0026quot;pending\u0026quot;, and body shows the new text at once. When it reaches the recipient, message.edited fires with direction: \u0026quot;outbound\u0026quot; and edit_count goes up by one. If it doesn\u0026#x27;t, message.edit_failed fires and body goes back to the text they have. On iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting \u0026quot;Edited to\u0026quot; with the new text, and the original stays. In a group, only members using iMessage see the edit. Sending the text the message already has answers 200 and changes nothing, so a retried request never spends a second edit. Counts toward the conversation-actions rate limit (300 a minute per account).\">\u003cmeta data-mint-head name=\"application-name\" content=\"iBubbl\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ibubbl/ohHXW5JhUEQpLDyU/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/ibubbl/ohHXW5JhUEQpLDyU/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ibubbl/ohHXW5JhUEQpLDyU/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ibubbl/ohHXW5JhUEQpLDyU/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ibubbl/ohHXW5JhUEQpLDyU/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ibubbl/ohHXW5JhUEQpLDyU/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ibubbl/ohHXW5JhUEQpLDyU/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ibubbl/ohHXW5JhUEQpLDyU/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ibubbl/ohHXW5JhUEQpLDyU/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Edit a message - iBubbl\">\u003cmeta data-mint-head property=\"og:description\" content=\"Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of sent_at and up to five times, as on an iPhone. The edit is accepted with edit_status: \u0026quot;pending\u0026quot;, and body shows the new text at once. When it reaches the recipient, message.edited fires with direction: \u0026quot;outbound\u0026quot; and edit_count goes up by one. If it doesn\u0026#x27;t, message.edit_failed fires and body goes back to the text they have. On iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting \u0026quot;Edited to\u0026quot; with the new text, and the original stays. In a group, only members using iMessage see the edit. Sending the text the message already has answers 200 and changes nothing, so a retried request never spends a second edit. Counts toward the conversation-actions rate limit (300 a minute per account).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"iBubbl\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ibubbl.com/api-reference/messages/edit\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ibubbl.mintlify.site/_mintlify/api/og/v2?division=Messages\u0026amp;title=Edit+a+message\u0026amp;description=Change+the+text+of+a+message+you+sent+over+iMessage%2C+within+14+minutes+30+seconds+of+%60sent_at%60+and+up+to+five+times%2C+as+on+an+iPhone.%0A%0AThe+edit+is+accepted+with\u0026amp;theme=f46070295e80383f74aa319a\u0026amp;signature=5b0327636e85970d49226dcd1d3c99b4985598a581a4f2c168277c4eba1bca86\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Edit a message - iBubbl\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of sent_at and up to five times, as on an iPhone. The edit is accepted with edit_status: \u0026quot;pending\u0026quot;, and body shows the new text at once. When it reaches the recipient, message.edited fires with direction: \u0026quot;outbound\u0026quot; and edit_count goes up by one. If it doesn\u0026#x27;t, message.edit_failed fires and body goes back to the text they have. On iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting \u0026quot;Edited to\u0026quot; with the new text, and the original stays. In a group, only members using iMessage see the edit. Sending the text the message already has answers 200 and changes nothing, so a retried request never spends a second edit. Counts toward the conversation-actions rate limit (300 a minute per account).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ibubbl.mintlify.site/_mintlify/api/og/v2?division=Messages\u0026amp;title=Edit+a+message\u0026amp;description=Change+the+text+of+a+message+you+sent+over+iMessage%2C+within+14+minutes+30+seconds+of+%60sent_at%60+and+up+to+five+times%2C+as+on+an+iPhone.%0A%0AThe+edit+is+accepted+with\u0026amp;theme=f46070295e80383f74aa319a\u0026amp;signature=5b0327636e85970d49226dcd1d3c99b4985598a581a4f2c168277c4eba1bca86\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/ibubbl/ohHXW5JhUEQpLDyU/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"iBubbl\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3B82F6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ibubbl.com/api-reference/messages/edit\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/messages/edit.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ibubbl.com/#organization\",\"name\":\"iBubbl\",\"url\":\"https://docs.ibubbl.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ibubbl/vKOMJPyDWV9K1NYc/logo/light.png?fit=max\u0026auto=format\u0026n=vKOMJPyDWV9K1NYc\u0026q=85\u0026s=b8846160ee4db226f79f0e4f7f331870\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ibubbl.com#website\",\"name\":\"iBubbl\",\"url\":\"https://docs.ibubbl.com\",\"publisher\":{\"@id\":\"https://docs.ibubbl.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ibubbl.com/api-reference/messages/edit#webpage\",\"url\":\"https://docs.ibubbl.com/api-reference/messages/edit\",\"name\":\"Edit a message\",\"description\":\"Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of sent_at and up to five times, as on an iPhone. The edit is accepted with edit_status: \\\"pending\\\", and body shows the new text at once. When it reaches the recipient, message.edited fires with direction: \\\"outbound\\\" and edit_count goes up by one. If it doesn't, message.edit_failed fires and body goes back to the text they have. On iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting \\\"Edited to\\\" with the new text, and the original stays. In a group, only members using iMessage see the edit. Sending the text the message already has answers 200 and changes nothing, so a retried request never spends a second edit. Counts toward the conversation-actions rate limit (300 a minute per account).\",\"dateModified\":\"2026-11-11T20:39:59.056Z\",\"isPartOf\":{\"@id\":\"https://docs.ibubbl.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ibubbl.com/api-reference/messages/edit#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ibubbl.com/api-reference/messages/edit#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API reference\",\"item\":\"https://docs.ibubbl.com/api-reference/messages/send\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Messages\",\"item\":\"https://docs.ibubbl.com/api-reference/messages/send\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Edit a message\",\"item\":\"https://docs.ibubbl.com/api-reference/messages/edit\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.ibubbl.com/api-reference/messages/edit#apireference\",\"headline\":\"Edit a message\",\"name\":\"Edit a message\",\"description\":\"Change the text of a message you sent over iMessage, within 14 minutes 30 seconds of sent_at and up to five times, as on an iPhone. The edit is accepted with edit_status: \\\"pending\\\", and body shows the new text at once. When it reaches the recipient, message.edited fires with direction: \\\"outbound\\\" and edit_count goes up by one. If it doesn't, message.edit_failed fires and body goes back to the text they have. On iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message changes in place and is marked Edited. On earlier versions the recipient gets a follow-up message starting \\\"Edited to\\\" with the new text, and the original stays. In a group, only members using iMessage see the edit. Sending the text the message already has answers 200 and changes nothing, so a retried request never spends a second edit. Counts toward the conversation-actions rate limit (300 a minute per account).\",\"url\":\"https://docs.ibubbl.com/api-reference/messages/edit\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ibubbl.com/api-reference/messages/edit#webpage\"},\"dateModified\":\"2026-11-11T20:39:59.056Z\",\"publisher\":{\"@id\":\"https://docs.ibubbl.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ibubbl.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"iBubbl\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"iBubbl\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/messages/edit.md","siteName":"iBubbl","nav":{"global":null,"groups":[{"group":"Get started","pages":[{"title":"Overview","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Authentication","href":"/authentication"},{"title":"Build with AI","href":"/build-with-ai"}]},{"group":"Concepts","pages":[{"title":"Message lifecycle","href":"/concepts/message-lifecycle"},{"title":"Limits and queues","href":"/concepts/limits"},{"title":"Lines and routing","href":"/concepts/lines-and-routing"},{"title":"Idempotency","href":"/idempotency"},{"title":"Pagination","href":"/concepts/pagination"},{"title":"Working Hours \u0026 Scheduling","href":"/concepts/working-hours"},{"title":"After-Hours Auto-Reply","href":"/concepts/after-hours-reply"},{"title":"Suppression \u0026 Opt-Outs","href":"/concepts/suppression"},{"title":"Group Conversations","href":"/concepts/group-conversations"}]},{"group":"Guides","pages":[{"title":"Send messages","href":"/guides/send-messages"},{"title":"Send attachments","href":"/guides/attachments"},{"title":"Tapbacks, Read Receipts \u0026 Typing Indicators","href":"/guides/reactions-read-receipts-typing"},{"title":"Edit, Undo Send, and Cancel Messages","href":"/guides/editing-and-unsending"},{"title":"Receive messages","href":"/guides/receive-messages"},{"title":"Signature verification","href":"/guides/webhook-signatures"},{"title":"Test webhooks locally","href":"/guides/test-webhooks-locally"},{"title":"Retries and deduplication","href":"/guides/webhook-retries"},{"title":"Inbound events","href":"/inbound-events/overview"}]},{"group":"Webhooks","pages":[{"title":"Webhooks Overview","href":"/webhooks/overview"},{"title":"Webhook Events","href":"/webhooks/events"}]},{"group":"API reference","pages":[{"group":"Messages","pages":[{"title":"Send a message","openapi":"POST /v1/messages","href":"/api-reference/messages/send"},{"title":"List messages","openapi":"GET /v1/messages","href":"/api-reference/messages/list"},{"title":"Retrieve a message","openapi":"GET /v1/messages/{message_id}","description":"Fetch a single message by its ID. Useful for polling the current delivery state when you can't subscribe to webhooks.\n\nReturns `404 not_found` for both missing messages and messages owned by a different customer — existence is not leaked across tenants.","href":"/api-reference/messages/retrieve"},{"title":"Edit a message","openapi":"POST /v1/messages/{message_id}/edit","href":"/api-reference/messages/edit"},{"title":"Unsend a message","openapi":"POST /v1/messages/{message_id}/unsend","description":"Take back a message you sent over iMessage, within 110 seconds of `sent_at` (iMessage allows two minutes).\n\nThe Undo Send is accepted with `unsend_status: \"pending\"`, and `body` is empty at once. When it reaches the recipient, `message.unsent` fires with `direction: \"outbound\"`. If it doesn't, `message.unsend_failed` fires and `body` comes back.\n\nOn iOS 16, iPadOS 16.1, macOS 13 Ventura, visionOS 1 and later the message disappears and both sides see a note that it was unsent. On earlier versions the original stays in the conversation: never rely on Undo Send to retract sensitive information.\n\nA message that went out with a link preview is two bubbles; both are unsent. A message with files (text and files, or several files) can't be unsent through the API (`422 multi_part`).\n\nRepeating the request while the Undo Send is pending or done answers `200` and changes nothing; after `message.unsend_failed` it tries again, if it's still within the window.\n\nCounts toward the conversation-actions rate limit (300 a minute per account).","href":"/api-reference/messages/unsend"},{"title":"Cancel a message","openapi":"POST /v1/messages/{message_id}/cancel","href":"/api-reference/messages/cancel"},{"title":"Add a tapback","openapi":"POST /v1/messages/{message_id}/reactions","href":"/api-reference/messages/react"},{"title":"Remove a tapback","openapi":"DELETE /v1/messages/{message_id}/reactions/{reaction_id}","href":"/api-reference/messages/remove-reaction"}]},{"group":"Contacts","pages":[{"title":"Create or update a contact","openapi":"POST /v1/contacts","href":"/api-reference/contacts/upsert"},{"title":"List contacts","openapi":"GET /v1/contacts","href":"/api-reference/contacts/list"},{"title":"Retrieve a contact","openapi":"GET /v1/contacts/{contact_id}","href":"/api-reference/contacts/retrieve"},{"title":"Update a contact","openapi":"PATCH /v1/contacts/{contact_id}","href":"/api-reference/contacts/update"},{"title":"Delete a contact","openapi":"DELETE /v1/contacts/{contact_id}","href":"/api-reference/contacts/delete"},{"title":"Add a tag to a contact","openapi":"POST /v1/contacts/{contact_id}/tags","href":"/api-reference/contacts/add-tag"},{"title":"Remove a tag from a contact","openapi":"DELETE /v1/contacts/{contact_id}/tags/{name}","href":"/api-reference/contacts/remove-tag"},{"title":"Opt a contact out","openapi":"POST /v1/contacts/{contact_id}/opt-out","href":"/api-reference/contacts/opt-out"},{"title":"Block a contact","openapi":"POST /v1/contacts/{contact_id}/block","href":"/api-reference/contacts/block"},{"title":"Unblock a contact","openapi":"DELETE /v1/contacts/{contact_id}/block","href":"/api-reference/contacts/unblock"}]},{"group":"Conversations","pages":[{"title":"Mark a conversation read","openapi":"POST /v1/conversations/{conversation_id}/read","href":"/api-reference/conversations/mark-read"},{"title":"Start typing","openapi":"POST /v1/conversations/{conversation_id}/typing","href":"/api-reference/conversations/start-typing"},{"title":"Stop typing","openapi":"DELETE /v1/conversations/{conversation_id}/typing","href":"/api-reference/conversations/stop-typing"}]},{"group":"Webhooks","pages":[{"title":"Create a webhook subscription","openapi":"POST /v1/webhooks","href":"/api-reference/webhooks/create"},{"title":"List webhook subscriptions","openapi":"GET /v1/webhooks","href":"/api-reference/webhooks/list"},{"title":"Retrieve a webhook subscription","openapi":"GET /v1/webhooks/{subscription_id}","href":"/api-reference/webhooks/retrieve"},{"title":"Revoke a webhook subscription","openapi":"DELETE /v1/webhooks/{subscription_id}","href":"/api-reference/webhooks/revoke"}]},{"group":"Inbound events","pages":[{"title":"Receive an event","openapi":"POST /v1/events/{token}","href":"/api-reference/inbound-events/receive"}]}]},{"group":"Resources","pages":[{"title":"Error Reference","href":"/errors"},{"title":"OpenAPI, Postman and Insomnia","href":"/openapi"},{"title":"Versioning","href":"/versioning"},{"title":"Changelog","href":"/changelog"},{"title":"Support","href":"/support"}]}]},"basePath":"","title":"Edit a message - iBubbl","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}