API v1
v1
View as Markdown

Leave a note on a support request

POST /api/v1/admin/support-requests/{supportRequest}/notes

Write a note that only the administrators read. It is never emailed and never shown to the person who asked.

Only an administrator of this instance can use these endpoints, and only with an API key that carries the administration scope by name. Anybody else, including an administrator whose key does not carry it, gets 404 as though the endpoint did not exist.

Parameters

Sent as JSON. Anything not listed here is ignored.

supportRequest uuid Required

The id of the request, of any account on the instance.

body string Required

What to write, up to 20,000 characters. A body left empty answers 422.

Returns

The message object that was written, with a kind of note.

data object

The message.

data.type string

Always support_message.

data.id string

The id of the message.

data.attributes object

Everything the message holds.

data.attributes.kind string

message when the person wrote it, reply when an administrator answered them, note when an administrator wrote it for the team alone.

data.attributes.author_name string

The name of the person who wrote it.

data.attributes.is_support_team boolean

Whether an administrator wrote it.

data.attributes.body string

What was written, as plain text.

data.attributes.attachments array

The files sent with it. An empty list when there are none, which is always the case for a reply or a note written through this API.

data.attributes.created_at timestamp

When it was written, as a count of seconds since 1970.

Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.

POST
curl https://my.monicahq.com/api/v1/admin/support-requests/7c1e4a92-5b3d-4f08-a6e1-93d2c8b05f17/notes \
-X POST \
-H "Authorization: Bearer $MONICA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": "Same account as the ticket about the birthday reminders. Check with Pam before closing."
}'
const response = await fetch('https://my.monicahq.com/api/v1/admin/support-requests/7c1e4a92-5b3d-4f08-a6e1-93d2c8b05f17/notes', {
method: 'POST',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
body: 'Same account as the ticket about the birthday reminders. Check with Pam before closing.',
}),
})
const data = await response.json()
$response = Http::withToken($token)->post('https://my.monicahq.com/api/v1/admin/support-requests/7c1e4a92-5b3d-4f08-a6e1-93d2c8b05f17/notes', [
'body' => 'Same account as the ticket about the birthday reminders. Check with Pam before closing.',
]);
Response 201
{
"data": {
"type": "support_message",
"id": "8a41c7e5-d209-4b3f-b6a8-5e90f13d7c24",
"attributes": {
"kind": "note",
"author_name": "Jim Halpert",
"is_support_team": true,
"body": "Same account as the ticket about the birthday reminders. Check with Pam before closing.",
"attachments": [],
"created_at": 1791551400
}
}
}

Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.