Skip to main content
POST
Link a ticket to a test

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer <key>. An organization admin creates one in the Trunk app under Settings → Developer → API Keys and chooses the merge-queue permissions it holds; a key with none can read merge queues but change nothing. Those permissions scope merge queue only: every key can use the Flaky Tests and Dynamic CI endpoints, including their writes, whatever permissions it holds.

Path Parameters

testId
string
required

The test's globally unique id.

Minimum string length: 1
Example:

"bfeebcf4-0000-8000-8000-000000000001"

Body

application/json

The ticket to link to a test in a test collection.

externalTicketId
string
required

The ticket to link, as its provider key (TRUNK-123, a Linear identifier, an Asana task gid) or as its browser URL — either form is accepted.

Required string length: 1 - 2048
Example:

"TRUNK-1234"

integrationId
string<uuid>

Which of the organization's ticketing connections the ticket lives on. Defaults to the collection's default connection.

Example:

"2b3c4d5e-6f70-4a1b-8c9d-0e1f2a3b4c5d"

Response

The linked ticket

id
string
required

Trunk's id for the linked ticket.

Example:

"5d4c3b2a-1f0e-4a1b-8c9d-0e1f2a3b4c5d"

provider
enum<string>
required

The ticketing system a ticket lives in.

Available options:
jiraCloud,
linear,
asana
Example:

"jiraCloud"

key
string
required

The provider's human-readable key. Mutable on some providers (a Jira issue moved between projects gets a new one).

Example:

"TRUNK-1234"

url
string<uri>
required
Example:

"https://acme.atlassian.net/browse/TRUNK-1234"

title
string
required
Example:

"[Flaky Test] suite::test_case_name"

status
string
required

The provider's status name, as last synced.

Example:

"In Progress"

assignee
string | null
required

The provider's assignee display name; null when unassigned.

Example:

"Ada Lovelace"

syncedAt
string<date-time>
required

When Trunk last read the ticket back from its provider.

Example:

"2026-09-15T14:45:01.000Z"