Edit conversation message legacy
PATCH /v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/messages/{message_id} Deprecated
Changes the text of your own message where it is, marked edited, without a turn. Later compaction summaries are discarded so no turn reads the old text.
Authentication
Send an API key, or an access token from your organisation’s identity provider, in the Authorization header. How API keys work
Scope the API key needs: conversations:write
Security schemes in the OpenAPI document: session_cookie (cookie __Host-ivy_session)bearer (bearer)api_key (bearer)
Parameters
-
organisation_idpathstringrequired -
workspace_idpathstringrequired -
conversation_idpathstringrequired -
message_idpathstringrequired
Request body
application/json UpdateChatMessage required
-
quoteQuoteInput|null -
textstringrequired
Responses
-
The message, edited in every version that holds it
-
unauthenticated -
Not the caller's message;
not_a_participant;insufficient_scope;workspace_content_restricted,invalid_origin -
No such conversation or message, or conversations with people are off
-
edit_creates_branch: only agent replies follow the message (or nobody else takes part), soeditAgentMessageedits it and the agent answers again;edit_on_platform: written in Slack or Teams, it is edited there and Ivy follows;invite_required(details.participants);workspace_archived;channel_archived: the channel is archived and read-only -
validation_failed(reasonnot_quotablefor aquotethat isn't an earlier message of this conversation still in it);not_a_workspace_member,agent_not_enabledfor a mention -
rate_limited: the API key's requests per minute are used up; retry afterRetry-Afterseconds -
internal -
unavailable: the database is briefly unavailable; retry afterRetry-Afterseconds
Error codes
Errors come back as an ErrorBody whose code is one of these.
- 401
unauthenticated - 403
not_a_participantinsufficient_scopeworkspace_content_restrictedinvalid_origin - 404
not_foundgeneric code for this status - 409
edit_creates_branchedit_on_platforminvite_requiredworkspace_archivedchannel_archived - 422
validation_failednot_a_workspace_memberagent_not_enabled - 429
rate_limited - 500
internal - 503
unavailable
Examples
curl -X PATCH "$IVY_API_URL/v1/organisations/$ORGANISATION_ID/workspaces/$WORKSPACE_ID/conversations/$CONVERSATION_ID/messages/$MESSAGE_ID" \
-H "Authorization: Bearer $IVY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hello, Ivy"}' import { client, editConversationMessageLegacy } from "@spacivapp/ivy-sdk";
client.setConfig({
baseUrl: process.env.IVY_API_URL,
headers: { Authorization: `Bearer ${process.env.IVY_API_KEY}` },
});
const { data, error, response } = await editConversationMessageLegacy({
path: { organisation_id: organisationId, workspace_id: workspaceId, conversation_id: conversationId, message_id: messageId },
body: {
text: "Hello, Ivy"
},
}); {
"quote": {
"message_id": "message_123"
},
"text": "Hello, Ivy"
} {
"acting_for": {
"id": "id_123",
"type": "user"
},
"ask_id": "ask_123",
"attachments": [
{
"file_id": "file_123",
"name": "Ada Lovelace"
}
],
"author": {
"id": "id_123",
"type": "user"
},
"author_name": "Ada Lovelace",
"branch": {
"count": 0,
"index": 0
},
"created_at": "2026-01-15T09:30:00Z",
"deleted_at": "2026-01-15T09:30:00Z",
"edited_at": "2026-01-15T09:30:00Z",
"feedback": "up",
"file_links": [
{
"file_id": "file_123",
"name": "Ada Lovelace",
"path": "string",
"space_id": "space_123",
"version": 1,
"workspace_id": "workspace_123"
}
],
"id": "id_123",
"in_reply_to": "string",
"mentions": [
"string"
],
"model": "string",
"notice": {
"actor": {
"id": "id_123",
"type": {}
},
"channel_id": "channel_123",
"conversation_id": "conversation_123",
"kind": "invited",
"participants": [
"string"
],
"title": "string"
},
"origin": {
"platform_message_id": "platform_message_123",
"source": "web"
},
"parts": [
{
"text": "Hello, Ivy",
"type": "text"
}
],
"quote": {
"author": {
"id": "id_123",
"type": {}
},
"author_name": "Ada Lovelace",
"created_at": "2026-01-15T09:30:00Z",
"deleted": false,
"excerpt": "string",
"message_id": "message_123"
},
"reactions": [
{
"emoji": "string",
"participants": [
"string"
]
}
],
"read_through": "string",
"role": "user",
"stopped_by": {
"id": "id_123",
"type": "user"
},
"thinking": [
{
"before_part": 0,
"duration_ms": 0,
"text": "Hello, Ivy"
}
]
}