- API reference
- Conversations
Edit a conversation message
PATCHhttps://app.notert.io/api/v1/conversations/{id}/messages/{messageId}
Replaces the text of a reply or internal note the token's holder sent, or takes its files off, or both, as the inbox's edit does. The customer reads an edited reply in the conversation, but an email already sent keeps what it said, and a note keeps mentioning a teammate whose @name it still writes. Only the holder's own messages can be changed. A file named that isn't on it is UNKNOWN_FILES, and nothing changes. Answers whether it changed and how many files it took off.
A token with conversations:write. How to send one
Request
curl -X PATCH https://app.notert.io/api/v1/conversations/3b7e2a90-5c1d-4f8e-9a6b-1d2c3e4f5a60/messages/9c4d1e7a-2b3f-4a6c-8d5e-7f1a2b3c4d50 \
-H "Authorization: Bearer $NOTERT_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": "You can export them from Billing, under Invoices and receipts.",
"removeAttachmentIds": [
"1f7c3a9e-5b2d-4e8a-9c6f-0d4b8e2a6c35"
]
}'Response 200
{
"id": "3b7e2a90-5c1d-4f8e-9a6b-1d2c3e4f5a60",
"messageId": "9c4d1e7a-2b3f-4a6c-8d5e-7f1a2b3c4d50",
"edited": true,
"removedAttachments": 1
}Path parameters
idstringRequiredThe conversation's id.
At most 64 characters.
messageIdstringRequiredThe reply or note, by its id.
At most 64 characters.
Body
bodystringIts new text, replacing it whole. Left out, its text stays.
At most 5000 characters.
removeAttachmentIdsstring[]Files to take off it, pictures or documents, by the attachmentId the thread answers for each. A message left with no text and no file is NO_CONTENT.
Default [].
Response 200
idstringThe conversation's id.
messageIdstringThe message's id.
editedbooleanWhether its text changed; false when it already said this.
removedAttachmentsintegerHow many files it took off.
Errors
- 400
BAD_REQUESTInput validation failed. - 400
NO_CONTENTA message needs some text unless it shares files. - 401
UNAUTHORIZEDSend a valid API token as a Bearer token. - 403
HOLDER_NOT_ALLOWEDThe teammate who holds this API token's secret can't do this in the workspace now. A teammate who can should roll it in the workspace's settings. - 403
INSUFFICIENT_SCOPEThis API token can't reply to or organize conversations. Create one that may in the workspace's settings. - 403
NETWORK_NOT_ALLOWEDThis API token works only from the networks it was made for. Call from one of them, or create a token for this one in the workspace's settings. - 403
NO_SEATThis workspace's plan has no seat for you. - 403
NOT_ALLOWEDOnly the teammate who sent a reply or note can change it, and the token's holder didn't send this one. - 403
WORKSPACE_SUSPENDEDThis workspace is suspended. - 404
NOT_FOUNDNot Found. - 409
CHANGED_MEANWHILESomething changed meanwhile. Try again. - 409
UNKNOWN_FILESA file named to take off isn't on it, so nothing changed. If an earlier call took it off, that call's change stands; otherwise read it again for its files' ids. Its data holdsattachmentIds. - 429
TOO_MANY_REQUESTSToo Many Requests. Its data holdsretryAfter.
A refusal names its code beside a message. Rate limits says when to try again.