Create Ticket
Create a new support ticket programmatically. Use this from your backend when you need to log issues automatically.
POST /api/tickets(Required (API key))
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Brief summary of the issue (max 255 characters) |
| body | string | Yes | Detailed description of the issue, steps to reproduce, or any relevant context |
| requesterEmail | string | Yes | Email address of the person requesting support (must be valid email format) |
| requesterName | string | No | Full name of the requester (optional, but recommended for better ticket management) |
| priority | number | No | Priority level: 0 (Low), 1 (Medium), 2 (High). Default: 0 |
| urgent | boolean | No | Mark ticket as urgent. Default: false |
| source | string | No | Source of the ticket: 'app', 'web', 'email', or 'agent'. Default: 'app' |
Example Request
curl -X POST https://www.bluetickets.app/api/tickets \
-H "Authorization: Bearer qt_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Login button not working",
"body": "When users tap the login button, nothing happens. This occurs on iOS 17.2.",
"requesterEmail": "[email protected]",
"requesterName": "John Doe",
"priority": 2,
"urgent": false,
"source": "app"
}'Success Response (201 Created)
{
"ok": true,
"ticket": {
"id": "clx1234567890",
"title": "Login button not working",
"status": "pending",
"priority": 2,
"urgent": false,
"source": "app",
"requesterEmail": "[email protected]",
"requesterName": "John Doe",
"createdAt": "2025-11-18T13:50:00.000Z"
}
}