Skip to main content
Auth. HMAC v1 or bearer token — see Authentication. Status. Live · Idempotent: No (each call posts a fresh edit; pass new_text you want the bubble to read).
Replaces the text of a previously-sent outbound message. The recipient sees the bubble update in place with an “Edited” marker, matching native iMessage behavior. Apple enforces a 15-minute window from send time — edits attempted after the window return an error.

Which id goes in the URL

This is a message-scoped route: {id} is a message_id, not a chat_id. Prefer the Chert-issued message_id returned by POST /api/v1/send, or the message.id returned by POST /api/v1/chats and POST /api/v1/chats/{id}/messages. Chert resolves that id to the underlying iMessage identifier internally before applying the edit.
For outbound messages surfaced by GET /api/v1/chats/{id}/messages, the listed message id is also accepted.

Request

POST /api/v1/messages/{id}/edit
curl -X POST https://console.trychert.com/api/v1/messages/msg_01H.../edit \
  -H "x-chert-tenant: $TENANT" \
  -H "x-chert-signature: v1,$TS,$SIG" \
  -H "content-type: application/json" \
  -d '{"new_text": "Updated copy — typo fix"}'

Response

{
  "status": "edited",
  "message_id": "msg_01H...",
  "new_text": "Updated copy — typo fix",
  "date_edited": "2026-05-27T16:42:11.318Z",
  "edit_history": null
}

Path parameters

id
string
required
The Chert message_id returned by a send endpoint, or the outbound message id surfaced on chat-message listings.

Body

new_text
string
required
The replacement bubble text. Empty strings are rejected.
edited_part_index
integer
default:"0"
For multi-part messages, the zero-based index of the text part to edit. Default 0 (the first text part). Most sends have only one text part.

Response fields

status
string
Always "edited" on success.
message_id
string
Echoed-back message_id of the edited bubble.
new_text
string
The text that now appears in the bubble.
date_edited
string
ISO-8601 timestamp the edit was applied.
edit_history
array | null
Reserved for future use. May surface previous versions of the bubble when the underlying transport reports them.

Errors

CodeHTTPWhen
1002400new_text missing or empty.
1004400Invalid JSON body.
2003404Message not found, or not owned by this tenant.
4001502Delivery failed — edit window may have expired, or the bubble is no longer editable.
4099501Edit is not available on this phone line.
See the full error code reference.

Notes

BehaviorWhat it means
15-minute windowApple-enforced. Edits attempted past 15 minutes from the original send fail with 4001.
Outbound onlyYou can only edit messages you sent. Inbound messages cannot be edited.
Recipient experienceThe bubble updates in place with an “Edited” marker. No new bubble is created.

See also