curl -X DELETE 'https://api.mails.ai/v1/threads/thrd_01JZX8K3M9Q4P7VN2YB6RTDC0E/notes/note_01JZX8K3M9Q4P7VN2YB6RTDC0E' \
-H "Authorization: Bearer $MAILS_API_KEY"mails threads notes delete thrd_01JABC note_01JABC --yes{
"name": "mails_delete_thread_note",
"arguments": {
"thread_id": "thrd_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"note_id": "note_01JZX8K3M9Q4P7VN2YB6RTDC0E"
}
}{
"id": "note_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"object": "<object>",
"deleted": false
}200 The deleted note's id.
401 Missing or invalid API key.
403 The API key lacks the required scope
(insufficient_scope), or the token belongs to an
app connected by sign-in and this operation is
closed to connected apps
(connected_app_not_allowed).
404 Resource not found in this workspace, or the agent
a send names is archived (agent_archived).
500 Internal server error.Delete a note
Deletes the note for good.
curl -X DELETE 'https://api.mails.ai/v1/threads/thrd_01JZX8K3M9Q4P7VN2YB6RTDC0E/notes/note_01JZX8K3M9Q4P7VN2YB6RTDC0E' \
-H "Authorization: Bearer $MAILS_API_KEY"mails threads notes delete thrd_01JABC note_01JABC --yes{
"name": "mails_delete_thread_note",
"arguments": {
"thread_id": "thrd_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"note_id": "note_01JZX8K3M9Q4P7VN2YB6RTDC0E"
}
}{
"id": "note_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"object": "<object>",
"deleted": false
}200 The deleted note's id.
401 Missing or invalid API key.
403 The API key lacks the required scope
(insufficient_scope), or the token belongs to an
app connected by sign-in and this operation is
closed to connected apps
(connected_app_not_allowed).
404 Resource not found in this workspace, or the agent
a send names is archived (agent_archived).
500 Internal server error.Path Parameters
idstringrequired
Thread id (thrd_…).
note_idstringrequired
Note id (note_…).
manage deletes any note on the thread. A member signed in to the dashboard without it deletes only the notes they wrote: anyone else's is a 403 insufficient_scope. A test key cannot delete one on a thread holding live mail (403 live_mode_required).
Response
idstring
The deleted note's id (note_…).
objectstring
Always note.
deletedboolean
Always true: the note is gone for good.
Was this page helpful?