POST /tickets
Create a new ticket for the robot's team.
Body Parameters
| Field | Rules | Description |
|---|---|---|
| title | required, string, max:255 | The headline of the issue. |
| description | required, string | Full details of the issue. The database requires a value. |
| priority | string | Defaults to low when omitted. Recommended: low, medium, high, urgent. |
| assigned_id | nullable, exists:users,id | User ID to assign the ticket to. Must belong to the same team. |
Status is not set via this endpoint and defaults to open.
Request Examples
curl -X POST "https://tickethub.dev.br/api/v1/tickets" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"title": "Critical Bug",
"description": "System is down.",
"priority": "urgent"
}'
Sample Response
{
"id": 12,
"title": "Critical Bug",
"description": "System is down.",
"status": "open",
"priority": "urgent",
"author_id": 3,
"author_type": "App\\Models\\TeamRobot",
"assigned_id": null,
"team_id": 2,
"created_at": "2026-01-29T12:34:56.000Z",
"updated_at": "2026-01-29T12:34:56.000Z"
}