API v1
v1
View as Markdown

Open a support request

POST /api/v1/support-requests

Open a request with the support team. The body becomes the first message of the thread, and the request starts in to_handle.

Files are sent as multipart form data, in a field called files that is repeated once per file. At most 5 files, each at most 10 MB, of the types jpg, jpeg, png, gif, webp, heic, pdf, txt and log. A file that breaks any of these answers 422 on files or on files.0, files.1 and so on, and nothing is kept.

An instance that has no active administrator has nobody to answer, so it answers 404 here.

Body parameters

Sent as JSON. Anything not listed here is ignored.

category string Required

What the request is about: feature, billing, email, question or technical.

subject string Required

The title of the request, up to 255 characters.

body string Required

What you want to say, between 10 and 20,000 characters.

files file Optional

Files to send with the first message. Repeat the field once per file, up to 5.

Returns

The support request object that was opened, with its first message.

data object

The support request.

data.type string

Always support_request. It names the kind of record, so a caller holding several kinds can tell them apart without looking at where they came from.

data.id string

The id of this record, as a string even when it reads as a number. It is what every endpoint naming this record takes.

data.attributes object

Everything the record holds.

data.attributes.reference string

The reference to quote when writing to the support team, such as MON-482913.

data.attributes.category string

What the request is about: feature, billing, email, question or technical.

data.attributes.subject string

The title the request was opened with.

data.attributes.status string

Where the request stands: to_handle when the support team has yet to answer, waiting_on_user when it has and awaits you, or solved.

data.attributes.status_label string

The status as the application words it for the person who asked, in the language of the account.

data.attributes.opened_at timestamp

When the request was opened, as a count of seconds since 1970.

data.attributes.last_activity_at timestamp

When anybody last wrote in it, the person who asked or the support team, as a count of seconds since 1970. A change of status alone does not move it.

data.attributes.solved_at timestamp

When it was marked as solved, as a count of seconds since 1970, or null while it is open.

data.attributes.messages array

The whole thread, the oldest first, without the internal notes of the support team.

data.attributes.messages[] object

One message of the thread.

data.attributes.messages[].type string

Always support_message.

data.attributes.messages[].id string

The id of the message.

data.attributes.messages[].attributes object

Everything the message holds.

data.attributes.messages[].attributes.kind string

message when the person who asked wrote it, reply when the support team did. An internal note is never shown here.

data.attributes.messages[].attributes.author_name string

The name of the person who wrote it.

data.attributes.messages[].attributes.is_support_team boolean

Whether the support team wrote it.

data.attributes.messages[].attributes.body string

What was written, as plain text.

data.attributes.messages[].attributes.attachments array

The files sent with it. An empty list when there are none.

data.attributes.messages[].attributes.attachments[] object

One file.

data.attributes.messages[].attributes.attachments[].id uuid

The id of the file, which the download address takes.

data.attributes.messages[].attributes.attachments[].name string

The name the file had when it was sent.

data.attributes.messages[].attributes.attachments[].mime_type string

The type of the file, such as image/png.

data.attributes.messages[].attributes.attachments[].size_in_bytes integer

How large the file is, in bytes.

data.attributes.messages[].attributes.created_at timestamp

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

data.links object

Where to find this record.

data.links.self string

The absolute address this record is read from.

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/support-requests \
-X POST \
-H "Authorization: Bearer $MONICA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"category": "question",
"subject": "My conference room reminder never arrived",
"body": "I booked the conference room for the quarterly meeting, but the reminder never arrived. Dwight says it is a conspiracy."
}'
const response = await fetch('https://my.monicahq.com/api/v1/support-requests', {
method: 'POST',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
category: 'question',
subject: 'My conference room reminder never arrived',
body: 'I booked the conference room for the quarterly meeting, but the reminder never arrived. Dwight says it is a conspiracy.',
}),
})
const data = await response.json()
$response = Http::withToken($token)->post('https://my.monicahq.com/api/v1/support-requests', [
'category' => 'question',
'subject' => 'My conference room reminder never arrived',
'body' => 'I booked the conference room for the quarterly meeting, but the reminder never arrived. Dwight says it is a conspiracy.',
]);
Response 201
{
"data": {
"type": "support_request",
"id": "7c1e4a92-5b3d-4f08-a6e1-93d2c8b05f17",
"attributes": {
"reference": "MON-482913",
"category": "question",
"subject": "My conference room reminder never arrived",
"status": "to_handle",
"status_label": "Waiting for support",
"opened_at": 1791547200,
"last_activity_at": 1791547200,
"solved_at": null,
"messages": [
{
"type": "support_message",
"id": "e5a90b36-1c7d-4284-b9f3-0d6a82c471e9",
"attributes": {
"kind": "message",
"author_name": "Michael Scott",
"is_support_team": false,
"body": "I booked the conference room for the quarterly meeting, but the reminder never arrived. Dwight says it is a conspiracy.",
"attachments": [
{
"id": "b36f0d8e-47a1-4c92-95e8-1a2d7c63f0b4",
"name": "conference-room-booking.png",
"mime_type": "image/png",
"size_in_bytes": 245760
}
],
"created_at": 1791547200
}
}
]
},
"links": {
"self": "https://my.monicahq.com/api/v1/support-requests/7c1e4a92-5b3d-4f08-a6e1-93d2c8b05f17"
}
}
}

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