How do I make my first API call?
Replace $FLAXXA_KEY with a key from your workspace. The first call returns a real id you can use for the next ones.
curl -X POST https://flaxxa.com/api/v1/desk/tickets \
-H "Authorization: Bearer flx_live_YOUR_KEY" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-d '{
"department_id": 3,
"subject": "Order #18429 not delivered",
"description": "Order was due yesterday — still no update.",
"priority": "high",
"type": "incident",
"source_channel": "api",
"contact": { "email": "[email protected]", "name": "Jane Doe" }
}'$ticket = Http::withToken(env('FLAXXA_DESK_KEY'))->acceptJson()
->post('https://flaxxa.com/api/v1/desk/tickets', [
'department_id' => 3,
'subject' => "Order #{$order->id} not delivered",
'description' => $customerMessage,
'priority' => 'high',
'source_channel' => 'api',
'contact' => ['email' => $customer->email, 'name' => $customer->name],
])->throw()->json();
// $ticket['id'], $ticket['ticket_number'] (e.g. "DESK-1042"), $ticket['status']const res = await fetch("https://flaxxa.com/api/v1/desk/tickets", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FLAXXA_DESK_KEY}`, Accept: "application/json", "Content-Type": "application/json" },
body: JSON.stringify({
department_id: 3,
subject: "Order #18429 not delivered",
description: "Order was due yesterday — still no update.",
priority: "high",
contact: { email: "[email protected]", name: "Jane Doe" },
}),
});
const ticket = await res.json(); // ticket.ticket_numberimport requests
r = requests.post("https://flaxxa.com/api/v1/desk/tickets",
headers={"Authorization": f"Bearer {KEY}", "Accept": "application/json"},
json={"department_id": 3, "subject": "Order #18429 not delivered",
"description": "Order was due yesterday — still no update.", "priority": "high",
"contact": {"email": "[email protected]", "name": "Jane Doe"}})
r.raise_for_status()
print(r.json()["ticket_number"])POST /api/v1/desk/tickets HTTP/1.1
Host: flaxxa.com
Authorization: Bearer flx_live_·············
Content-Type: application/json
Idempotency-Key: order-18429-ticket
{
"department_id": 3,
"subject": "Order #18429 not delivered",
"description": "Order was due yesterday — still no update.",
"priority": "high",
"type": "incident",
"source_channel": "api",
"contact": { "email": "[email protected]", "name": "Jane Doe" }
}HTTP/1.1 201 Created
Content-Type: application/json
{
"id": 9127,
"ticket_number": "DESK-1042",
"status": "open",
"priority": "high",
"type": "incident",
"subject": "Order #18429 not delivered",
"department": { "id": 3, "name": "Support" },
"contact": { "id": 551, "name": "Jane Doe", "email": "[email protected]" },
"assigned_agent": null,
"created_at": "2026-10-27T10:00:00+00:00"
}
