Support tickets
Ids, names and times in the examples are samples. Read the real values from the API.
A ticket’s text is yours alone: it is never kept in the record of a call, and B7R records every read of a thread by a key. Your keys and the people in the app share the same hourly limits for tickets, replies and ratings.
List your tickets
Newest activity first, without their text: read one ticket for its thread. At most limit (1 to 50, 20 by default) a page; follow next_cursor until it is null.
Headers
Bearer b7r_live_.... A key with the tickets:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Query
1 to 200.
Answer
Child fields
One of suggestion, problem, question, order_issue.
One of normal, urgent.
One of open, answered, planned, done, closed.
UTC, ISO 8601 with milliseconds and Z.
UTC, ISO 8601 with milliseconds and Z.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 429 | rate_limited | Yes |
| 500 | internal_error | Yes |
| 502 | upstream_unavailable | Yes |
| 503 | api_unavailable | Yes |
| 503 | request_expired | Yes |
| 503 | service_unavailable | Yes |
| 504 | upstream_timeout | Yes |
curl https://api.b7r.app/v1/tickets \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/tickets", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/tickets",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"data": [
{
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"number": 1042,
"type": "order_issue",
"urgency": "normal",
"status": "answered",
"order_id": "B00000001042",
"rateable": false,
"created_at": "2026-11-25T10:00:00.000Z",
"last_activity_at": "2026-11-26T10:00:00.000Z",
"closed_at": null
}
],
"next_cursor": null
}Open a ticket
order_issue needs order_id, one of your orders (ticket_rejected with order_not_found otherwise). A day holds at most so many tickets (daily_limit). The answer is the ticket’s id and state, never its text; a retry with the same Idempotency-Key answers the same ticket.
Up to three images: upload each first (POST /v1/uploads, purpose ticket_image, JPEG, PNG or WebP up to 5 MB) and name it in image_upload_ids. An upload that cannot be used answers ticket_rejected at its index with upload_not_found, upload_not_received, upload_type_mismatch or upload_size_mismatch; each upload is used once the ticket is saved.
Headers
Bearer b7r_live_.... A key with the tickets:write area. X-B7R-Key works too; send one, never both.
A new value per operation (up to 255 letters, digits, ., _, : or -; a UUID works), the same value on its retries. See Safe retries.
application/json, when the request has a body.
ar for Arabic error titles; anything else gives English. Codes never change.
Body
One of suggestion, problem, question, order_issue.
One of normal, urgent.
1 to 4000.
One of ar, en.
Staged uploads of purpose ticket_image, at most 3; each is used once the message is saved. At most 3 items.
Answer
One of open, answered, planned, done, closed.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 400 | idempotency_key_required | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | No |
| 409 | idempotency_mismatch | No |
| 409 | idempotency_in_flight | Yes |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | No |
| 422 | ticket_rejected | No |
| 429 | rate_limited | Yes |
| 500 | internal_error | Yes |
| 502 | upstream_unavailable | Yes |
| 503 | api_unavailable | Yes |
| 503 | request_expired | Yes |
| 503 | service_unavailable | Yes |
| 504 | upstream_timeout | Yes |
curl -X POST https://api.b7r.app/v1/tickets \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
-H "Content-Type: application/json" \
-d '{
"type": "order_issue",
"urgency": "normal",
"order_id": "B00000001042",
"body": "The print on this order is faded."
}'const res = await fetch("https://api.b7r.app/v1/tickets", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"type": "order_issue",
"urgency": "normal",
"order_id": "B00000001042",
"body": "The print on this order is faded."
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/tickets",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"type": "order_issue",
"urgency": "normal",
"order_id": "B00000001042",
"body": "The print on this order is faded."
},
timeout=30,
)
data = res.json(){
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"number": 1042,
"status": "open"
}Read a ticket
The thread oldest first: your messages, B7R’s (b7r) and the events (system). Each image is read with GET /v1/ticket-images/{id}; deleted once B7R no longer keeps it. Another account’s ticket answers not_found.
Headers
Bearer b7r_live_.... A key with the tickets:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
Answer
One of suggestion, problem, question, order_issue.
One of normal, urgent.
One of open, answered, planned, done, closed.
UTC, ISO 8601 with milliseconds and Z.
UTC, ISO 8601 with milliseconds and Z.
Child fields
One of message, event.
One of merchant, b7r, system.
UTC, ISO 8601 with milliseconds and Z.
Child fields
Read it with GET /v1/ticket-images/{id}.
B7R no longer keeps the image (its retention passed).
Child fields
1 to 5.
UTC, ISO 8601 with milliseconds and Z.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | No |
| 429 | rate_limited | Yes |
| 500 | internal_error | Yes |
| 502 | upstream_unavailable | Yes |
| 503 | api_unavailable | Yes |
| 503 | request_expired | Yes |
| 503 | service_unavailable | Yes |
| 504 | upstream_timeout | Yes |
curl https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"number": 1042,
"type": "order_issue",
"urgency": "normal",
"status": "answered",
"order_id": "B00000001042",
"rateable": false,
"created_at": "2026-11-25T10:00:00.000Z",
"last_activity_at": "2026-11-26T10:00:00.000Z",
"closed_at": null,
"image_count": 1,
"messages": [
{
"id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
"kind": "message",
"author": "merchant",
"body": "The print on this order is faded.",
"event": null,
"created_at": "2026-11-25T10:00:00.000Z",
"images": [
{
"id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
"width": 1200,
"height": 900,
"deleted": false
}
]
}
],
"rating": null
}Reply to a ticket
A reply on an answered, closed or done ticket opens it again, and takes image_upload_ids as opening a ticket does. The answer is the message’s id and the ticket’s state after it; a retry with the same Idempotency-Key answers the same message.
Headers
Bearer b7r_live_.... A key with the tickets:write area. X-B7R-Key works too; send one, never both.
A new value per operation (up to 255 letters, digits, ., _, : or -; a UUID works), the same value on its retries. See Safe retries.
application/json, when the request has a body.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
Body
1 to 4000.
Staged uploads of purpose ticket_image, at most 3; each is used once the message is saved. At most 3 items.
Answer
One of open, answered, planned, done, closed.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 400 | idempotency_key_required | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | No |
| 409 | idempotency_mismatch | No |
| 409 | idempotency_in_flight | Yes |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | No |
| 422 | ticket_rejected | No |
| 429 | rate_limited | Yes |
| 500 | internal_error | Yes |
| 502 | upstream_unavailable | Yes |
| 503 | api_unavailable | Yes |
| 503 | request_expired | Yes |
| 503 | service_unavailable | Yes |
| 504 | upstream_timeout | Yes |
curl -X POST https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d/reply \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
-H "Content-Type: application/json" \
-d '{
"body": "Here is the order again."
}'const res = await fetch("https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d/reply", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"body": "Here is the order again."
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d/reply",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"body": "Here is the order again."
},
timeout=30,
)
data = res.json(){
"message_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
"status": "open"
}Rate a closed ticket
Once, while the ticket is closed and its rating time lasts (rateable in the list): not_rateable or already_rated otherwise.
Headers
Bearer b7r_live_.... A key with the tickets:write area. X-B7R-Key works too; send one, never both.
A new value per operation (up to 255 letters, digits, ., _, : or -; a UUID works), the same value on its retries. See Safe retries.
application/json, when the request has a body.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
Body
1 to 5.
Answer
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 400 | idempotency_key_required | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | No |
| 409 | idempotency_mismatch | No |
| 409 | idempotency_in_flight | Yes |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | No |
| 422 | ticket_rejected | No |
| 429 | rate_limited | Yes |
| 500 | internal_error | Yes |
| 502 | upstream_unavailable | Yes |
| 503 | api_unavailable | Yes |
| 503 | request_expired | Yes |
| 503 | service_unavailable | Yes |
| 504 | upstream_timeout | Yes |
curl -X POST https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d/rate \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
-H "Content-Type: application/json" \
-d '{
"stars": 5,
"comment": "Fixed fast."
}'const res = await fetch("https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d/rate", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"stars": 5,
"comment": "Fixed fast."
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d/rate",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"stars": 5,
"comment": "Fixed fast."
},
timeout=30,
)
data = res.json(){
"stars": 5
}Mark a ticket read
Its unread notifications become read; marked is how many.
Headers
Bearer b7r_live_.... A key with the tickets:write area. X-B7R-Key works too; send one, never both.
A new value per operation (up to 255 letters, digits, ., _, : or -; a UUID works), the same value on its retries. See Safe retries.
application/json, when the request has a body.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
Answer
How many unread notifications of the ticket are read now.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 400 | idempotency_key_required | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | No |
| 409 | idempotency_mismatch | No |
| 409 | idempotency_in_flight | Yes |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | No |
| 429 | rate_limited | Yes |
| 500 | internal_error | Yes |
| 502 | upstream_unavailable | Yes |
| 503 | api_unavailable | Yes |
| 503 | request_expired | Yes |
| 503 | service_unavailable | Yes |
| 504 | upstream_timeout | Yes |
curl -X POST https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d/read \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')"const res = await fetch("https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d/read", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/tickets/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d/read",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
data = res.json(){
"marked": 1
}Read a ticket image
The image as B7R keeps it, a JPEG. An image of another account’s ticket, or one no longer kept, answers not_found.
Headers
Bearer b7r_live_.... A key with the tickets:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
Answer
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | No |
| 429 | rate_limited | Yes |
| 500 | internal_error | Yes |
| 502 | upstream_unavailable | Yes |
| 503 | api_unavailable | Yes |
| 503 | request_expired | Yes |
| 503 | service_unavailable | Yes |
| 504 | upstream_timeout | Yes |
curl https://api.b7r.app/v1/ticket-images/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/ticket-images/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/ticket-images/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json()image/jpeg: the file, byte for byte