Tickets API¶
Service: $client->tickets()
List tickets¶
$options = new TicketListOptions(
boardId: $boardId,
query: 'deployment',
perPage: 100,
page: 1,
);
$page = $client->tickets()->list($projectId, $options)->pagination();
Route GET /projects/{project}/tickets; scope tickets:read.
The OpenAPI defines board_id, q, and per_page. The SDK exposes page for Laravel paginator compatibility and tagIds for the tag_ids filter. These are compatibility extensions not explicitly defined in the OpenAPI file.
Create ticket¶
$request = new CreateTicketRequest(
title: 'Validate database migration',
boardSlug: 'open',
descriptionHtml: '<p>Check locks and rollback.</p>',
priority: TicketPriority::Highest,
dueAt: new DateTimeImmutable('+2 days'),
assigneeIds: [$engineerId],
labelIds: [$releaseLabelId],
);
$response = $client->tickets()->create($projectId, $request);
Route POST /projects/{project}/tickets; scope tickets:write.
Reorder tickets¶
$client->tickets()->reorder($projectId, new ReorderTicketsRequest(
boardId: $boardId,
ticketIds: [$ticketA, $ticketB, $ticketC],
));
Route PUT /projects/{project}/tickets/reorder; scope tickets:write; success is 204.
Read¶
Update¶
$client->tickets()->update(
$ticketId,
UpdateTicketRequest::create()
->title('Validate migration and rollback')
->priority(TicketPriority::Critical)
->dueAt(null),
);
Move¶
$client->tickets()->move($ticketId, new MoveTicketRequest(
boardId: $inProgressBoardId,
position: 0,
));
If position is omitted, the ticket is appended to the destination board.
Comment¶
Route POST /tickets/{ticket}/comments; scope comments:write.
Delete¶
Route DELETE /tickets/{ticket}; scope tickets:write. Deletion is a soft delete.