Create a test collection
Creates a test collection and returns it. Its id is server-assigned; testCount is 0 until the collection’s first upload is ingested.
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 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.
Body
Response
The created test collection
The collection's id.
"aB3xY9kQ"
"Backend integration tests"
"Owned by the platform team."
Distinct tests seen in this collection. Reflects ingested uploads, so a brand-new collection reports 0 until its first upload is processed. GET /v2/test-collections/{id} may serve a value up to a minute old.
1284
Whether quarantining is turned on for this collection. False until configured.
true
Whether flaky tests are quarantined automatically. False until configured.
false
"2026-01-14T09:12:00.000Z"
"2026-07-20T16:44:10.000Z"