Skip to main content
POST
Create a test-results upload

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 permissions it holds. A key with none can read merge queues but change nothing in them. Permissions cover merge queues and test-result uploads, including the quarantine lookups a CI run makes before it uploads; any key can call the other Flaky Tests and Dynamic CI endpoints, including their writes.

Path Parameters

id
string
required

The collection's id: 8 alphanumeric characters.

Pattern: ^[0-9A-Za-z]{8}$
Example:

"aB3xY9kQ"

Body

application/json

The repository the tests ran in, and the client uploading.

repo
object | null
required

The repository the tests ran in, as the CLI reads it from git. null for an upload made without a repository (--no-repo).

remoteUrls
string[]

The repository's git remote URLs. When present and Trunk does not know the repository yet, it is created.

Maximum array length: 20
Required string length: 1 - 2048
Example:
clientVersion
string

The uploading client's version.

Maximum string length: 256
Example:

"0.12.3"

externalId
string

The CI job's own id, used to match the upload to its GitHub Actions job.

Maximum string length: 256
Example:

"45829103344"

Response

The upload, waiting for its bundle

A test-results upload, waiting for its bundle.

id
string<uuid>
required

The upload's id. The bundle uploaded to uploadUrl must carry it, with createdAt.

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

status
enum<string>
required

The bundle has not been uploaded yet.

Available options:
awaitingData
Example:

"awaitingData"

uploadUrl
string<uri>
required

A pre-signed URL to PUT the bundle to, without Trunk credentials. It expires at expiresAt.

Example:

"https://bundles.s3.us-west-2.amazonaws.com/20261006/0d9c3de1-14a0-4f68-a44a-2fbbcf0dcb2f/a1b2c3/f47ac10b-58cc-4372-a567-0e02b2c3d479.tar.zst?X-Amz-Signature=3f1b8c9e"

expiresAt
string<date-time>
required

When uploadUrl stops accepting the bundle: at most an hour after createdAt, and at least 15 minutes.

Example:

"2026-10-06T17:00:00.000Z"

testCollectionUuid
string<uuid>
required

The collection's internal UUID, which a test's testId is computed from (with repositoryId and the test's own id). Use it only for that: everywhere else a collection is addressed by its id.

Example:

"204b6c93-1c51-4e0f-a13c-e07b9bc60688"

repositoryId
string<uuid>
required

The repository the tests are stored under. The nil UUID for an upload without a repository, or for a repository Trunk could not find or create.

Example:

"7a1f0e3d-2b4c-4d5e-8f90-123456789abc"

createdAt
string<date-time>
required

When the upload was created.

Example:

"2026-10-06T16:00:00.000Z"