Tickets API

Automate ticket management. Create, update, and track tickets through the REST API.

Endpoints

MethodPathScopeDescription
GET/ticketstickets:readList tickets
GET/tickets/boardtickets:readGet Kanban board view
GET/tickets/:slugtickets:readGet ticket by slug
POST/ticketstickets:writeCreate a new ticket
PUT/tickets/:slugtickets:writeUpdate a ticket
PATCH/tickets/:slug/statustickets:writeUpdate ticket status
DELETE/tickets/:slugtickets:writeDelete a ticket

Code Examples

List all tickets

curl -X GET \
  "https://your-domain.com/api/v1/ext/orgs/my-org/tickets" \
  -H "X-API-Key: amk_your_api_key_here"

Create a new ticket

curl -X POST \
  "https://your-domain.com/api/v1/ext/orgs/my-org/tickets" \
  -H "X-API-Key: amk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Implement user auth",
    "type": "feature",
    "priority": "high"
  }'

Endpoint Details

GET /tickets

Retrieve a paginated list of tickets. Supports filtering by repository, status, assignee, and labels.

Query Parameters

ParameterTypeRequiredDefaultDescription
repository_idintegerOptional-Filter by repository ID
statusstringOptional-Filter by status (backlog, todo, in_progress, in_review, done)
typestringOptional-docs.api.tickets.details.listTickets.params.type
assignee_idintegerOptional-Filter by assignee user ID
labelsstringOptional-Filter by labels (comma-separated)
limitintegerOptional20Maximum number of results to return
offsetintegerOptional0Number of results to skip for pagination

Response Example

{
  "tickets": [
    {
      "id": 1,
      "slug": "AM-42",
      "type": "feature",
      "title": "Implement user authentication",
      "status": "in_progress",
      "priority": "high",
      "assignee_id": 10,
      "repository_id": 1,
      "labels": ["backend", "auth"],
      "created_at": "2025-01-10T08:00:00Z",
      "updated_at": "2025-01-15T14:20:00Z"
    }
  ],
  "total": 156,
  "limit": 20,
  "offset": 0
}

GET /tickets/board

Retrieve the Kanban board view with tickets organized into columns by status.

Query Parameters

ParameterTypeRequiredDescription
repository_idintegerOptionalFilter board by repository ID

Response Example

{
  "board": {
    "columns": [
      {
        "status": "open",
        "tickets": [
          {
            "id": 2,
            "slug": "AM-43",
            "title": "Fix CSS layout issue",
            "type": "bug",
            "priority": "medium",
            "assignee_id": 5
          }
        ]
      },
      {
        "status": "in_progress",
        "tickets": []
      }
    ]
  }
}

GET /tickets/:slug

Retrieve detailed information about a specific ticket by its human-readable slug.

Path Parameters

ParameterTypeRequiredDescription
slugstringRequiredTicket slug (e.g., AM-123)

Response Example

{
  "ticket": {
    "id": 1,
    "slug": "AM-42",
    "type": "feature",
    "title": "Implement user authentication",
    "status": "in_progress",
    "priority": "high",
    "assignee_id": 10,
    "repository_id": 1,
    "labels": ["backend", "auth"],
    "parent_slug": null,
    "created_at": "2025-01-10T08:00:00Z",
    "updated_at": "2025-01-15T14:20:00Z"
  }
}

POST /tickets

Create a new ticket. Requires a title at minimum.

Request Body

FieldTypeRequiredDescription
typestringRequireddocs.api.tickets.details.createTicket.fields.type
titlestringRequiredTicket title (1-500 characters)
prioritystringOptionalPriority level: low, medium, high, or urgent
statusstringOptionalInitial status (defaults to backlog)
assignee_idintegerOptionalUser ID to assign the ticket to
repository_idintegerOptionalRepository to associate with
labelsstring[]OptionalArray of label strings
parent_slugstringOptionalParent ticket slug for sub-tasks

Response Example

{
  "ticket": {
    "id": 1,
    "slug": "AM-42",
    "type": "feature",
    "title": "Implement user authentication",
    "status": "in_progress",
    "priority": "high",
    "assignee_id": 10,
    "repository_id": 1,
    "labels": ["backend", "auth"],
    "parent_slug": null,
    "created_at": "2025-01-10T08:00:00Z",
    "updated_at": "2025-01-15T14:20:00Z"
  }
}

PUT /tickets/:slug

Update an existing ticket. All fields are optional — only provided fields will be updated.

Path Parameters

ParameterTypeRequiredDescription
slugstringRequiredTicket slug (e.g., AM-123)

Request Body

FieldTypeRequiredDescription
titlestringOptionalUpdated ticket title
typestringOptionaldocs.api.tickets.details.updateTicket.fields.type
prioritystringOptionalUpdated priority level
statusstringOptionalUpdated status
assignee_idintegerOptionalUpdated assignee user ID
labelsstring[]OptionalUpdated array of label strings
parent_slugstringOptionalUpdated parent ticket slug

Response Example

{
  "ticket": {
    "id": 1,
    "slug": "AM-42",
    "type": "feature",
    "title": "Implement user authentication",
    "status": "in_progress",
    "priority": "high",
    "assignee_id": 10,
    "repository_id": 1,
    "labels": ["backend", "auth"],
    "parent_slug": null,
    "created_at": "2025-01-10T08:00:00Z",
    "updated_at": "2025-01-15T14:20:00Z"
  }
}

PATCH /tickets/:slug/status

Update only the status of a ticket. This is a convenience endpoint for status transitions.

Path Parameters

ParameterTypeRequiredDescription
slugstringRequiredTicket slug (e.g., AM-123)

Request Body

FieldTypeRequiredDescription
statusstringRequiredNew status: backlog, todo, in_progress, in_review, or done

Response Example

{
  "message": "Status updated"
}

DELETE /tickets/:slug

Permanently delete a ticket. This action cannot be undone.

Path Parameters

ParameterTypeRequiredDescription
slugstringRequiredTicket slug (e.g., AM-123)

Response Example

{
  "message": "Ticket deleted"
}