API v1
v1
View as Markdown

Answer a support request

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

Write an answer to the person who opened the request, and email it to them. The request takes the status you name, which is waiting_on_user when you name none.

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 say, up to 20,000 characters. A body left empty answers 422.

status string Optional default: waiting_on_user

The status the request takes once answered: to_handle, waiting_on_user or solved. Any other value answers 422 on status.

Returns

The message object that was written.

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/replies \
-X POST \
-H "Authorization: Bearer $MONICA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": "Hi Michael. The reminder was set for a time that had already passed, so it was skipped. We have moved it to tomorrow at nine.",
"status": "waiting_on_user"
}'
const response = await fetch('https://my.monicahq.com/api/v1/admin/support-requests/7c1e4a92-5b3d-4f08-a6e1-93d2c8b05f17/replies', {
method: 'POST',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
body: 'Hi Michael. The reminder was set for a time that had already passed, so it was skipped. We have moved it to tomorrow at nine.',
status: 'waiting_on_user',
}),
})
const data = await response.json()
$response = Http::withToken($token)->post('https://my.monicahq.com/api/v1/admin/support-requests/7c1e4a92-5b3d-4f08-a6e1-93d2c8b05f17/replies', [
'body' => 'Hi Michael. The reminder was set for a time that had already passed, so it was skipped. We have moved it to tomorrow at nine.',
'status' => 'waiting_on_user',
]);
Response 201
{
"data": {
"type": "support_message",
"id": "2f8d6c14-a093-4b75-8e21-c5b7094d3a68",
"attributes": {
"kind": "reply",
"author_name": "Jim Halpert",
"is_support_team": true,
"body": "Hi Michael. The reminder was set for a time that had already passed, so it was skipped. We have moved it to tomorrow at nine.",
"attachments": [],
"created_at": 1791550800
}
}
}

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