Skip to content

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

$ticket = Ticket::fromResponse($client->tickets()->get($ticketId));

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

$client->tickets()->comment($ticketId, new TicketCommentRequest(
    '<p>Validation complete.</p>'
));

Route POST /tickets/{ticket}/comments; scope comments:write.

Delete

$client->tickets()->delete($ticketId);

Route DELETE /tickets/{ticket}; scope tickets:write. Deletion is a soft delete.