Create a test-results upload
Starts an upload of one CI run’s test results to a collection. PUT the results bundle to the returned uploadUrl before expiresAt. A repository Trunk does not know is created when remoteUrls is sent. Requires the Upload test results permission.
Authorizations
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
The collection's id: 8 alphanumeric characters.
^[0-9A-Za-z]{8}$"aB3xY9kQ"
Body
The repository the tests ran in, and the client uploading.
The repository the tests ran in, as the CLI reads it from git. null for an upload made without a repository (--no-repo).
The repository's git remote URLs. When present and Trunk does not know the repository yet, it is created.
201 - 2048The uploading client's version.
256"0.12.3"
The CI job's own id, used to match the upload to its GitHub Actions job.
256"45829103344"
Response
The upload, waiting for its bundle
A test-results upload, waiting for its bundle.
The upload's id. The bundle uploaded to uploadUrl must carry it, with createdAt.
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
The bundle has not been uploaded yet.
awaitingData "awaitingData"
A pre-signed URL to PUT the bundle to, without Trunk credentials. It expires at expiresAt.
"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"
When uploadUrl stops accepting the bundle: at most an hour after createdAt, and at least 15 minutes.
"2026-10-06T17:00:00.000Z"
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.
"7a1f0e3d-2b4c-4d5e-8f90-123456789abc"
When the upload was created.
"2026-10-06T16:00:00.000Z"