Close a support ticket
/v1/tickets/{ticketRef}/actions/close Closes the ticket when you need nothing more on it. A ticket already closed is answered as it is. A new message, yours or support's, reopens it.
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
support:write - Open and answer tickets. Open support tickets and reply to them.
Headers
| Field | Type and description |
|---|---|
Idempotency-Key | string 1 to 255 characters A key of your own for this request, like a UUID: letters, digits and |
Path parameters
| Field | Type and description |
|---|---|
ticketRef Required | string The ticket's id: its reference, like |
Example request
curl -X POST "https://api.rabbitflare.com/v1/tickets/RF-7KQ2MX/actions/close" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/tickets/RF-7KQ2MX/actions/close", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data } = await res.json();
console.log(data); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
const data = await rf.tickets.close({ ticketRef: "RF-7KQ2MX" });
console.log(data); <?php
$ch = curl_init('https://api.rabbitflare.com/v1/tickets/RF-7KQ2MX/actions/close');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
print_r(json_decode($body, true)['data']); import os
import requests
response = requests.post(
"https://api.rabbitflare.com/v1/tickets/RF-7KQ2MX/actions/close",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
timeout=120,
)
response.raise_for_status()
print(response.json()["data"]) Response
200 OK Returns the Ticket object in data.
The Ticket object's fields 35 fields
| Field | Type and description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
id | string The ticket's reference, like | ||||||||||
subject | string The ticket's subject. | ||||||||||
status | string Where it stands: Known values: | ||||||||||
topic | string What it's about: Known values: | ||||||||||
priority | string How urgent it was when opened: Known values: | ||||||||||
about | string or null The site or server it's about, as the panel shows it: | ||||||||||
messageCount | integer How many messages the conversation has. | ||||||||||
preview | string The start of the latest message, as plain text on one line (up to 180 characters). Empty when it was only files. | ||||||||||
lastMessageAt | string An ISO 8601 time, in UTC When the latest message was sent. | ||||||||||
lastReplyBy | string Who wrote the latest message: Known values: | ||||||||||
autoCloseAt | string or null An ISO 8601 time, in UTC While support's answer waits for you ( | ||||||||||
remindersSent | integer Reminders emailed since support's latest answer: 0, 1 or 2. | ||||||||||
rating | object or null Your rating of the help, once given. Null: not rated. | ||||||||||
rating | string How you rated the help: Known values: | ||||||||||
comment | string or null What you wrote with it. Null: nothing. | ||||||||||
ratedAt | string An ISO 8601 time, in UTC When it was rated. | ||||||||||
createdAt | string An ISO 8601 time, in UTC When the ticket was opened. | ||||||||||
messages | array of objects The conversation, oldest message first. | ||||||||||
id | string The message's id. | ||||||||||
author | string Who wrote it: Known values: | ||||||||||
authorName | string The writer's name: on your side, the person who wrote it (a message sent through the API carries the account owner's name); on support's, always | ||||||||||
body | string The message as plain text. Empty when it was only files. | ||||||||||
html | string or null The message with its formatting, as HTML cleaned to simple formatting (paragraphs, bold, lists, links, quotes, code, tables). Null for a plain-text message. | ||||||||||
via | string How it was written: Known values: | ||||||||||
createdAt | string An ISO 8601 time, in UTC When it was sent. | ||||||||||
files | array of objects The files sent with it, in the order they were uploaded. Show its 4 fields
| ||||||||||
history | array of objects Reminders, closing and reopening, oldest first. | ||||||||||
id | string The entry's id. | ||||||||||
kind | string What happened: Known values: | ||||||||||
by | string or null Who closed or reopened it: Known values: | ||||||||||
createdAt | string An ISO 8601 time, in UTC When it happened. |
Example response
{
"data": {
"id": "RF-7KQ2MX",
"subject": "Checkout page shows a 502 error",
"status": "closed",
"topic": "server",
"priority": "high",
"about": "Site: Shop",
"messageCount": 2,
"preview": "Thanks for the screenshot. The shop's PHP workers were all busy with a plugin's slow requests, so the server answered 502. We raised the site's PHP worker limit and the checkout pa",
"lastMessageAt": "2026-11-16T10:12:40.000Z",
"lastReplyBy": "support",
"autoCloseAt": null,
"remindersSent": 0,
"rating": null,
"createdAt": "2026-11-16T09:58:02.000Z",
"messages": [
{
"id": "9d2e4f6a-1b3c-4d5e-8f7a-0b1c2d3e4f5a",
"author": "customer",
"authorName": "Jane Doe",
"body": "Since this morning the checkout page of the shop shows a 502 error. The screenshot shows what customers see.",
"html": null,
"via": "panel",
"createdAt": "2026-11-16T09:58:02.000Z",
"files": [
{
"id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
"filename": "checkout-error.png",
"contentType": "image/png",
"sizeBytes": 184320
}
]
},
{
"id": "2a3b4c5d-6e7f-4a8b-9c0d-1e2f3a4b5c6d",
"author": "support",
"authorName": "Rabbitflare Support",
"body": "Thanks for the screenshot. The shop's PHP workers were all busy with a plugin's slow requests, so the server answered 502. We raised the site's PHP worker limit and the checkout page loads again. Could you try an order?",
"html": "<p>Thanks for the screenshot. The shop's PHP workers were all busy with a plugin's slow requests, so the server answered 502. We raised the site's PHP worker limit and the checkout page loads again. Could you try an order?</p>",
"via": "email",
"createdAt": "2026-11-16T10:12:40.000Z",
"files": []
}
],
"history": [
{
"id": "7b8c9d0e-1f2a-4b3c-8d4e-5f6a7b8c9d0e",
"kind": "reminder",
"by": null,
"createdAt": "2026-11-18T10:13:05.000Z"
},
{
"id": "0c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"kind": "closed",
"by": "customer",
"createdAt": "2026-11-19T08:29:47.000Z"
}
]
}
} Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
404 not_ | The resource doesn't exist, or isn't this account's. Check the id. Ids of other accounts' resources answer the same way. |