Tickets API
Automate ticket management. Create, update, and track tickets through the REST API.
Endpoints
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /tickets | tickets:read | List tickets |
GET | /tickets/board | tickets:read | Get Kanban board view |
GET | /tickets/:slug | tickets:read | Get ticket by slug |
POST | /tickets | tickets:write | Create a new ticket |
PUT | /tickets/:slug | tickets:write | Update a ticket |
PATCH | /tickets/:slug/status | tickets:write | Update ticket status |
DELETE | /tickets/:slug | tickets:write | Delete 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| repository_id | integer | Optional | - | Filter by repository ID |
| status | string | Optional | - | Filter by status (backlog, todo, in_progress, in_review, done) |
| type | string | Optional | - | docs.api.tickets.details.listTickets.params.type |
| assignee_id | integer | Optional | - | Filter by assignee user ID |
| labels | string | Optional | - | Filter by labels (comma-separated) |
| limit | integer | Optional | 20 | Maximum number of results to return |
| offset | integer | Optional | 0 | Number 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| repository_id | integer | Optional | Filter 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| slug | string | Required | Ticket 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
| Field | Type | Required | Description |
|---|---|---|---|
| type | string | Required | docs.api.tickets.details.createTicket.fields.type |
| title | string | Required | Ticket title (1-500 characters) |
| priority | string | Optional | Priority level: low, medium, high, or urgent |
| status | string | Optional | Initial status (defaults to backlog) |
| assignee_id | integer | Optional | User ID to assign the ticket to |
| repository_id | integer | Optional | Repository to associate with |
| labels | string[] | Optional | Array of label strings |
| parent_slug | string | Optional | Parent 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| slug | string | Required | Ticket slug (e.g., AM-123) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Optional | Updated ticket title |
| type | string | Optional | docs.api.tickets.details.updateTicket.fields.type |
| priority | string | Optional | Updated priority level |
| status | string | Optional | Updated status |
| assignee_id | integer | Optional | Updated assignee user ID |
| labels | string[] | Optional | Updated array of label strings |
| parent_slug | string | Optional | Updated 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| slug | string | Required | Ticket slug (e.g., AM-123) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| status | string | Required | New 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| slug | string | Required | Ticket slug (e.g., AM-123) |
Response Example
{
"message": "Ticket deleted"
}