Support
4 Support routes on the FLAM API: Record a support chat that needed a human; The tickets this director has raised; Raise a support ticket, or reply on one.
Base URL https://api.flam.fashion. Send Authorization: Bearer flam_sk_… on every call; a handful of routes are session-only and say so. How keys and roles work.
POST /api/support/escalations
Record a support chat that needed a human
Machine door for FLAM's self-hosted Krispy support Worker. Opens a ticket in the same help desk the studio's ticket form writes to, carrying the transcript and — when the caller knows the house — the plan, the spendable balance and the last develop, read off the database HERE rather than taken from the body. Authenticated by a shared secret in x-krispy-bridge-secret, not by a session: the caller is a Worker.
Parameters
| In | Name | Type | Required | Notes |
|---|---|---|---|---|
| header | x-krispy-bridge-secret | string | yes | — |
Request body — application/json
| Field | Type | Required | Notes |
|---|---|---|---|
reason | "handoff" | "turn_limit" | "ai_down" | "leak_guard" | "requested" | yes | — |
sessionId | string | yes | — |
organizationId | string (uuid) | no | — |
contactEmail | string (email) | no | — |
transcript | object[] | no | — |
{
"reason": "handoff",
"sessionId": "k_8f3a12c0",
"organizationId": "00000000-0000-0000-0000-000000000000",
"contactEmail": "string",
"transcript": []
}Responses
| Status | Meaning |
|---|---|
201 | The ticket the conversation became. |
401 | Wrong or missing shared secret. |
503 | The bridge is not configured in this environment, or the desk is unreachable. |
201 returns:
{
"id": "string",
"status": "open",
"summary": "string",
"messageCount": 0,
"unreadCount": 0,
"createdAt": "string",
"lastMessageAt": "string"
}Call it
curl -X POST "https://api.flam.fashion/api/support/escalations" \
-H "Authorization: Bearer $FLAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"handoff","sessionId":"k_8f3a12c0","organizationId":"00000000-0000-0000-0000-000000000000","contactEmail":"string","transcript":[]}'GET /api/toolkit/support/tickets
The tickets this director has raised
Newest first, open and closed together, read from FLAM's help desk under a verified identity — so a director's threads follow their account rather than the browser they opened them in.
Responses
| Status | Meaning |
|---|---|
200 | Every ticket this director has raised. |
401 | Signed out |
503 | The desk is unreachable. |
200 returns:
{
"tickets": [
{
"id": "string",
"status": "open",
"summary": "string",
"messageCount": 0,
"unreadCount": 0,
"createdAt": "string",
"lastMessageAt": "string"
}
]
}Call it
curl -X GET "https://api.flam.fashion/api/toolkit/support/tickets" \
-H "Authorization: Bearer $FLAM_API_KEY"POST /api/toolkit/support/tickets
Raise a support ticket, or reply on one
Opens a ticket in FLAM's help desk (PostHog Support) on behalf of the acting house. The plan, the spendable balance and the last develop are read off the database HERE and attached to the message — the director never describes their own account, and what reaches us is measured rather than remembered. Pass ticketId to reply on an existing thread instead. Any role may raise one, viewer included: asking for help is not spending.
Request body — application/json
| Field | Type | Required | Notes |
|---|---|---|---|
topic | "develop" | "billing" | "identity" | "quality" | "access" | "api" | "other" | no | — |
subject | string | yes | — |
body | string | yes | — |
contactEmail | string (email) | no | — |
currentUrl | string | no | — |
ticketId | string | no | — |
{
"topic": "develop",
"subject": "The lookbook stopped at frame three",
"body": "Ran a five-frame look at 2K. Three came back, the last two never did, and the balance looks the same as before I started.",
"contactEmail": "string",
"currentUrl": "string",
"ticketId": "string"
}Responses
| Status | Meaning |
|---|---|
201 | The ticket, as the screen shows it. |
400 | Say a little more — a subject and a few sentences. |
401 | Signed out |
503 | The desk is unreachable. The sentence tells the director where else to write. |
201 returns:
{
"id": "string",
"status": "open",
"summary": "string",
"messageCount": 0,
"unreadCount": 0,
"createdAt": "string",
"lastMessageAt": "string"
}Call it
curl -X POST "https://api.flam.fashion/api/toolkit/support/tickets" \
-H "Authorization: Bearer $FLAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"topic":"develop","subject":"The lookbook stopped at frame three","body":"Ran a five-frame look at 2K. Three came back, the last two never did, and the balance looks the same as before I started.","contactEmail":"string","currentUrl":"string","ticketId":"string"}'GET /api/toolkit/support/tickets/{id}
The messages on one ticket
The whole thread, oldest first. Internal notes are excluded by the help desk itself. Answers are written by a person — FLAM runs no bot on this path.
Parameters
| In | Name | Type | Required | Notes |
|---|---|---|---|---|
| path | id | string | yes | — |
Responses
| Status | Meaning |
|---|---|
200 | The conversation. |
401 | Signed out |
503 | The desk is unreachable, or this thread is not yours. |
200 returns:
{
"status": "string",
"messages": [
{
"id": "string",
"content": "string",
"author": "customer",
"authorName": "string",
"createdAt": "string"
}
]
}Call it
curl -X GET "https://api.flam.fashion/api/toolkit/support/tickets/{id}" \
-H "Authorization: Bearer $FLAM_API_KEY"