List Tickets

Get a list of support tickets.

Request

Method: GET
URL: /api/tickets
Headers: Authorization: Bearer {token}

Example Request

curl -X GET "https://example.com/api/tickets" \
  -H "Authorization: Bearer {token}"

Success Response (200)

{
  "records": [
    {
      "id": 1,
      "title": "Login Issue",
      "status": "open",
      "priority": "high",
      "project_id": 1,
      "client_id": 1,
      "created_at": "1403-05-10"
    }
  ],
  "meta": {
    "total": 15,
    "current_page": 1,
    "per_page": 20
  }
}

Errors

Code Description
401 Invalid token

Create Ticket

Create a new support ticket.

Request

Method: POST
URL: /api/tickets
Headers: Authorization: Bearer {token}
Content-Type: application/json

Example Request

curl -X POST "https://example.com/api/tickets" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Reporting Issue",
    "description": "Unable to generate monthly report",
    "project_id": 1,
    "priority": "medium"
  }'

Success Response (201)

{
  "record": {
    "id": 2,
    "title": "Reporting Issue",
    "status": "open",
    "priority": "medium",
    "project_id": 1,
    "created_at": "1403-06-01"
  }
}

Errors

Code Description
401 Invalid token
422 Validation error
Type to search...