> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List the CI jobs on a commit

> The latest attempt of every CI job on one commit, oldest first. Address the commit by `pullRequestId` (its head, or `commitSha`) or by `repositoryId` and `commitSha`.

A job is a workflow run and a rendered job name, so each matrix leg is its own job and a re-run folds into the job it re-ran. A failed job carries its failure inline: the failing step, the AI analysis, the log excerpt and its cluster.

The list follows `GET /v2/pull-requests/{id}`'s `ci.jobsUrl`. Send `If-None-Match` with the last `ETag` to get `304` when nothing changed, or `updatedAfter` to read only the jobs that moved.

A page walk is not a snapshot: a job whose data arrives late can sort before a cursor already passed. To be sure of every job, compare the count read with `ci.jobs.total` on the pull request, and read again when it is lower.



## OpenAPI

````yaml /openapi-v2.json get /v2/ci-jobs
openapi: 3.1.0
info:
  title: Trunk API
  version: 2.0.0
  description: >-
    The Trunk public API. Every endpoint is scoped to a single organization and
    requires a credential.


    ## Authentication


    For automation, send an API key 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 no
    permissions can read merge queues but change nothing in them. Each write's
    description names the permission it needs, if any. 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.


    A short-lived token in the `x-trunk-token` header is what Trunk's own tools
    send, such as the `trunk` CLI after `trunk auth login`. Your own
    integrations should use an API key.


    A GitHub Actions job can upload and read impacted targets with no Trunk
    secret: the `trunk-io/login` action exchanges the run's own GitHub
    credential (its OIDC token, or on a pull request from a fork its
    `GITHUB_TOKEN`) for a short-lived first-party token. That token is accepted
    only by `PUT /v2/impacted-targets`, by `GET
    /v2/pull-requests/{id}/impacted-targets` and, on a fork pull request, by the
    Flaky Tests CLI endpoints. It works only for the run's own repository. On a
    fork pull request it works only for that pull request, and the upload works
    only for the pull request's head sha.


    ## Errors


    Errors from the API are an `ErrorResponse`: `{ "error": { "code", "message"
    } }`. Switch on `code`, which is stable; `message` is prose and may change
    at any time.


    Some responses don't have this shape. Trunk's edge answers `401`, `403` for
    some credential problems (including a request with no credential), `429`,
    and gateway errors such as `503` before the request reaches the API. The API
    itself answers `413` for a body over 512 KB and `504` for a request that
    runs past its time limit (usually 5 seconds), both as plain text. Read
    `error.code` only when the body is JSON with an `error` object, and
    otherwise branch on the status code.


    **An authorization denial on a read is reported as `404`, not `403`** —
    whether a resource exists must not leak across organizations, so a resource
    in another organization is indistinguishable from one that does not exist.
    `403 INSUFFICIENT_PERMISSIONS` means the credential is valid but is not
    permitted the action (or carries no organization).


    Every response from the API carries an `X-Request-Id` header; edge responses
    may not. Quote it in support requests.


    ## Rate limiting


    Most requests share one limit per organization (currently 100 requests per
    second), across every API key, user, and CLI session in it. Some requests
    have limits of their own and don't count toward it: `GET` requests on paths
    that start with `/v2/pull-requests`, `/v2/ci-jobs`, `/v2/ci-workflow-runs`,
    or `/v2/ci-failure-clusters` (5 per second per API key or user); the merge
    queue metrics endpoints (5 per second per organization); every request from
    a GitHub Actions login, which includes impacted-target uploads and reads and
    the Flaky Tests CLI endpoints on a fork pull request (10 per second per
    repository, and separately for its fork pull requests; the other limits in
    this list do not apply to it); test-result uploads (1000 per second per
    organization) and quarantine lookups (250 per second per organization).
    Exceeding a limit returns `429`; retry with backoff. The limit is enforced
    at the edge, which does not yet wrap its `429` in the `ErrorResponse`
    envelope or send `Retry-After`, so treat any `429` as rate limiting
    regardless of body.


    ## Compatibility


    Within v2, Trunk may add: new endpoints, new **optional** response fields,
    new members to any enum (including new `code` values, new queue-entry
    states, and new providers), and new optional request parameters. **Clients
    must tolerate values and fields they do not recognize** rather than failing
    closed — a client that switches exhaustively over an enum will break when a
    member is added. Removals and semantic changes require a new major version.


    ## Provider support


    Merge queues, verification runs and checks are **GitHub-only** today;
    `Check.provider` has a single member for that reason. `PUT
    /v2/impacted-targets` accepts GitHub and GitLab repositories. A GitHub
    Actions login (the `trunk-io/login` action, or `trunk auth login
    --github-actions`) uploads only for its own GitHub repository. The
    `Provider` enum lists values the repository index can store, not surfaces
    that are fully supported.


    ## Not yet available


    A pull request's numeric **position** in its queue is not exposed, and list
    responses are not ordered by queue position. `GET
    /v2/merge-queues/{id}/order` returns the order the engine will consider pull
    requests in, but an array index there is not a wait: use a pending entry's
    `directlyAhead` rather than counting, and `GET
    /v2/pull-requests/{id}/queue-entry-estimate` for when it is expected to
    merge (on queues that serve estimates). This API delivers no events of its
    own — poll it, or subscribe to [Merge Queue's
    webhooks](https://docs.trunk.io/merge-queue/webhooks). `Idempotency-Key` is
    not yet honored, so a mutation that times out must be reconciled by reading
    the resource back rather than blindly retried.
  contact:
    name: Trunk Support
    url: https://docs.trunk.io
servers:
  - url: https://api.trunk.io
    description: Production
security:
  - apiKey: []
  - trunkToken: []
tags:
  - name: mergeQueues
    x-group: Merge Queues
  - name: pullRequests
    x-group: Pull Requests
  - name: mergeQueueVerificationRuns
    x-group: Verification Runs
  - name: impactedTargets
    x-group: Impacted Targets
  - name: repositories
    x-group: Repositories
  - name: dynamicCi
    x-group: Dynamic CI
  - name: ciJobs
    x-group: CI Jobs
  - name: ciWorkflowRuns
    x-group: CI Workflow Runs
  - name: ciFailureClusters
    x-group: CI Failure Clusters
  - name: testCollections
    x-group: Test Collections
  - name: tests
    x-group: Tests
  - name: testUploads
    x-group: Test Uploads
  - name: detectionEvents
    x-group: Detection Events
  - name: monitors
    x-group: Monitors
  - name: monitorTests
    x-group: Monitor Tests
paths:
  /v2/ci-jobs:
    get:
      tags:
        - ciJobs
      summary: List the CI jobs on a commit
      description: >-
        The latest attempt of every CI job on one commit, oldest first. Address
        the commit by `pullRequestId` (its head, or `commitSha`) or by
        `repositoryId` and `commitSha`.


        A job is a workflow run and a rendered job name, so each matrix leg is
        its own job and a re-run folds into the job it re-ran. A failed job
        carries its failure inline: the failing step, the AI analysis, the log
        excerpt and its cluster.


        The list follows `GET /v2/pull-requests/{id}`'s `ci.jobsUrl`. Send
        `If-None-Match` with the last `ETag` to get `304` when nothing changed,
        or `updatedAfter` to read only the jobs that moved.


        A page walk is not a snapshot: a job whose data arrives late can sort
        before a cursor already passed. To be sure of every job, compare the
        count read with `ci.jobs.total` on the pull request, and read again when
        it is lower.
      operationId: ciJobs.list
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
            description: Page size, between 1 and 100.
            example: 25
          required: false
          description: Page size, between 1 and 100.
          name: limit
          in: query
        - schema:
            type: string
            description: >-
              Opaque cursor from a previous response's `nextCursor`. A cursor is
              bound to the operation and filter it was minted for.
            example: AQEKZm9vYmFy
          required: false
          description: >-
            Opaque cursor from a previous response's `nextCursor`. A cursor is
            bound to the operation and filter it was minted for.
          name: cursor
          in: query
        - schema:
            type: boolean
            default: false
            description: >-
              Set true to include `total` in the response. Costs an extra COUNT
              query, so it is off by default.
            example: false
          required: false
          description: >-
            Set true to include `total` in the response. Costs an extra COUNT
            query, so it is off by default.
          name: includeTotal
          in: query
        - schema:
            type: string
            format: uuid
            description: >-
              Read the CI of this pull request. Mutually exclusive with
              `repositoryId`.
            example: 0f8fad5b-d9cb-469f-a165-70867728950e
          required: false
          description: >-
            Read the CI of this pull request. Mutually exclusive with
            `repositoryId`.
          name: pullRequestId
          in: query
        - schema:
            type: string
            format: uuid
            description: >-
              Read the CI of one commit of this repository, for a commit no pull
              request names, such as a push to the default branch. Needs
              `commitSha`.
            example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
          required: false
          description: >-
            Read the CI of one commit of this repository, for a commit no pull
            request names, such as a push to the default branch. Needs
            `commitSha`.
          name: repositoryId
          in: query
        - schema:
            type: string
            pattern: ^[0-9a-f]{40}(?:[0-9a-f]{24})?$
            description: >-
              The full commit sha. Defaults to the pull request's head when
              `pullRequestId` is sent.
            example: a0de7a77e8d758a346f83ed19209a5a25814bb17
          required: false
          description: >-
            The full commit sha. Defaults to the pull request's head when
            `pullRequestId` is sent.
          name: commitSha
          in: query
        - schema:
            type: string
            minLength: 1
            description: >-
              Comma-separated statuses: `queued`, `running`, `completed`,
              `abandoned`.
            example: queued,running
          required: false
          description: >-
            Comma-separated statuses: `queued`, `running`, `completed`,
            `abandoned`.
          name: status
          in: query
        - schema:
            type: string
            minLength: 1
            description: >-
              Comma-separated conclusions: `success`, `failure`, `timedOut`,
              `cancelled`, `skipped`. A match has finished.
            example: failure,timedOut
          required: false
          description: >-
            Comma-separated conclusions: `success`, `failure`, `timedOut`,
            `cancelled`, `skipped`. A match has finished.
          name: conclusion
          in: query
        - schema:
            type: string
            minLength: 1
            description: Only the jobs of this `CiWorkflowRun`.
            example: 5e1d2c3b4a596877
          required: false
          description: Only the jobs of this `CiWorkflowRun`.
          name: workflowRunId
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              Only rows that changed strictly after this time: queued, started
              or finished. Send the time of your last read to fetch only what
              moved.
            example: '2026-09-29T12:40:00.000Z'
          required: false
          description: >-
            Only rows that changed strictly after this time: queued, started or
            finished. Send the time of your last read to fetch only what moved.
          name: updatedAfter
          in: query
      responses:
        '200':
          description: A page of jobs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CiJobRunList'
        '304':
          description: >-
            Not modified: the `ETag` sent in `If-None-Match` still describes the
            response.
        '400':
          description: '`VALIDATION_FAILED` | `INVALID_CURSOR`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                VALIDATION_FAILED:
                  summary: VALIDATION_FAILED
                  value:
                    error:
                      code: VALIDATION_FAILED
                      message: 'Invalid input: expected string, received undefined'
                INVALID_CURSOR:
                  summary: INVALID_CURSOR
                  value:
                    error:
                      code: INVALID_CURSOR
                      message: Invalid or expired cursor.
        '401':
          description: >-
            `AUTHENTICATION_REQUIRED` | `INVALID_TOKEN`. A malformed, expired,
            or deleted credential. Trunk's edge usually answers this before the
            request reaches the API, with a body that is not this envelope
            (`{"error": "unauthorized: invalid api key"}` for a bad API key, or
            plain text for a bad `x-trunk-token`), so branch on the status. A
            request with no credential at all gets `403` from the edge.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                AUTHENTICATION_REQUIRED:
                  summary: AUTHENTICATION_REQUIRED
                  value:
                    error:
                      code: AUTHENTICATION_REQUIRED
                      message: No credential was supplied
                INVALID_TOKEN:
                  summary: INVALID_TOKEN
                  value:
                    error:
                      code: INVALID_TOKEN
                      message: The supplied token failed verification
        '403':
          description: '`INSUFFICIENT_PERMISSIONS`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                INSUFFICIENT_PERMISSIONS:
                  summary: INSUFFICIENT_PERMISSIONS
                  value:
                    error:
                      code: INSUFFICIENT_PERMISSIONS
                      message: >-
                        The supplied credential is missing the required
                        permission
        '404':
          description: '`PR_NOT_FOUND` | `REPOSITORY_NOT_FOUND`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                REPOSITORY_NOT_FOUND:
                  summary: REPOSITORY_NOT_FOUND
                  value:
                    error:
                      code: REPOSITORY_NOT_FOUND
                      message: Repository not found
                PR_NOT_FOUND:
                  summary: PR_NOT_FOUND
                  value:
                    error:
                      code: PR_NOT_FOUND
                      message: Pull request not found
        '429':
          description: >-
            `RATE_LIMIT_EXCEEDED`. Trunk's edge answers this, and does not yet
            wrap it in the error envelope or send `Retry-After`: treat any `429`
            as rate limiting, whatever its body, and retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                RATE_LIMIT_EXCEEDED:
                  summary: RATE_LIMIT_EXCEEDED
                  value:
                    error:
                      code: RATE_LIMIT_EXCEEDED
                      message: Rate limit exceeded; retry with backoff
        '500':
          description: '`INTERNAL_ERROR`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                INTERNAL_ERROR:
                  summary: INTERNAL_ERROR
                  value:
                    error:
                      code: INTERNAL_ERROR
                      message: An unexpected error occurred
components:
  schemas:
    CiJobRunList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CiJobRun'
          maxItems: 100
        nextCursor:
          type:
            - string
            - 'null'
          description: >-
            Opaque cursor for the next page, or null on the last page. Pass it
            back verbatim as `cursor`; do not construct or inspect one.
          example: AQEKZm9vYmFy
        hasMore:
          type: boolean
          description: True when another page is available.
          example: true
        total:
          type: integer
          description: >-
            Total rows matching the filter. Present only when the request set
            `includeTotal=true`.
          example: 1247
      required:
        - data
        - nextCursor
        - hasMore
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/ErrorCode'
            message:
              type: string
              description: >-
                Human-readable description of what went wrong. Not stable — do
                not parse.
              example: An unexpected error occurred
          required:
            - code
            - message
      required:
        - error
      description: >-
        The error envelope. Every error this API itself returns has this shape,
        except a `413` for a body over 512 KB and a `504` for a request that
        runs past its time limit, which are plain text. Responses from Trunk's
        edge, such as a `401`, a `403` for a missing credential, a `429` or a
        `503`, can arrive before the request reaches the API and may not have
        it, so read `error.code` only when the body is JSON with an `error`
        object.
    CiJobRun:
      type: object
      properties:
        id:
          type: string
          description: Opaque. Identifies the job's latest attempt.
          example: 1a289f57705150d7~q1790685507000
        commitSha:
          type: string
          example: a0de7a77e8d758a346f83ed19209a5a25814bb17
        name:
          type: string
          example: test (2/2)
        workflowName:
          type:
            - string
            - 'null'
          example: CI
        workflowRunId:
          type:
            - string
            - 'null'
          description: The `CiWorkflowRun.id` of the job's run.
          example: 5e1d2c3b4a596877
        attempt:
          type: integer
          example: 1
        attemptCount:
          type: integer
          description: Every attempt of the job, the latest included.
          example: 2
        failedAttemptCount:
          type: integer
          example: 1
        status:
          $ref: '#/components/schemas/CiJobStatus'
        conclusion:
          anyOf:
            - $ref: '#/components/schemas/CiConclusion'
            - type: 'null'
          description: Set when `status` is `completed`.
        required:
          type:
            - boolean
            - 'null'
          description: >-
            Whether the job is a required check on the pull request's base
            branch or its merge queue. Null when the list is read by commit,
            with no pull request to say which branch.
          example: true
        queuedAt:
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-09-29T12:37:00.000Z'
        startedAt:
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-09-29T12:38:27.000Z'
        finishedAt:
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-09-29T12:44:03.000Z'
        queuedMs:
          type:
            - integer
            - 'null'
          example: 87000
        durationMs:
          type:
            - integer
            - 'null'
          example: 336000
        updatedAt:
          type: string
          format: date-time
          example: '2026-09-29T12:44:03.000Z'
        url:
          type:
            - string
            - 'null'
          example: https://github.com/acme/widgets/actions/runs/36498062451/job/1
        failure:
          anyOf:
            - $ref: '#/components/schemas/CiJobFailure'
            - type: 'null'
          description: Set when `conclusion` is `failure` or `timedOut`.
      required:
        - id
        - commitSha
        - name
        - workflowName
        - workflowRunId
        - attempt
        - attemptCount
        - failedAttemptCount
        - status
        - conclusion
        - required
        - queuedAt
        - startedAt
        - finishedAt
        - queuedMs
        - durationMs
        - updatedAt
        - url
        - failure
      description: >-
        The latest attempt of one CI job on a commit. Named apart from Dynamic
        CI's `CiJob`, which is a job's definition rather than a run of it. A job
        is a workflow run and a rendered job name, so each matrix leg is its own
        job.
    ErrorCode:
      type: string
      enum:
        - AUTHENTICATION_REQUIRED
        - INVALID_TOKEN
        - INSUFFICIENT_PERMISSIONS
        - INTERNAL_ERROR
        - VALIDATION_FAILED
        - NOT_FOUND
        - INVALID_CURSOR
        - MERGE_QUEUE_NOT_FOUND
        - PR_ALREADY_ENQUEUED
        - PR_NOT_ENQUEUEABLE
        - UPSTREAM_ERROR
        - VERIFICATION_RUN_NOT_FOUND
        - PR_NOT_FOUND
        - IMPACTED_TARGETS_NOT_FOUND
        - REPOSITORY_NOT_FOUND
        - IMPACTED_TARGETS_UNSUPPORTED
        - QUEUE_ALREADY_EXISTS
        - QUEUE_HAS_ACTIVE_ENTRIES
        - MODE_CHANGE_IN_PROGRESS
        - PR_NOT_IN_ACTIVE_STATE
        - MERGE_QUEUE_NOT_CREATABLE
        - PR_TESTS_NOT_RESTARTABLE
        - ALLOWED_BOT_SUBMITTERS_FROZEN
        - ESTIMATE_NOT_ENABLED
        - PR_RERUN_FEATURE_DISABLED
        - PR_RERUN_NOT_PENDING_FAILURE
        - PR_RERUN_QUEUE_DOES_NOT_KEEP_FAILED_RUNS
        - PR_RERUN_NOT_A_REQUIRED_CHECK_FAILURE
        - PR_RERUN_CHECK_NOT_RERUNNABLE
        - PR_RERUN_RUN_TORN_DOWN
        - PR_RERUN_HOLD_LIMIT_REACHED
        - PR_RERUN_FORGE_NOT_SUPPORTED
        - PROVIDER_URL_NOT_FOUND
        - CI_HOST_UNSUPPORTED
        - CI_JOB_NOT_FOUND
        - CI_FAILURE_CLUSTER_NOT_FOUND
        - TEST_COLLECTION_NOT_FOUND
        - TEST_NOT_FOUND
        - TEST_UPLOAD_NOT_FOUND
        - MONITOR_NOT_FOUND
        - MONITOR_LIMIT_EXCEEDED
        - MONITOR_NOT_ACTIVE
        - OUT_OF_RANGE
        - TEST_UNAVAILABLE
        - TICKETING_NOT_CONFIGURED
        - TICKETING_CREDENTIALS_INVALID
        - TICKETING_SITE_REFUSED
        - TICKET_NOT_FOUND
        - TICKET_NOT_LINKED
        - TICKET_LINK_CONFLICT
        - TEST_ALREADY_LINKED
        - TICKET_FIELDS_REJECTED
        - TICKET_CONTENT_UNAVAILABLE
        - TICKETING_CREATE_REFUSED
        - RATE_LIMIT_EXCEEDED
      description: >-
        Stable machine-readable error identifier. Switch on this, never on
        `message`. A shipped code's meaning never changes, but **new codes may
        be added within v2** — treat an unrecognized code as a generic failure
        of its HTTP status rather than failing closed.
      example: INTERNAL_ERROR
    CiJobStatus:
      type: string
      enum:
        - queued
        - running
        - completed
        - abandoned
      description: >-
        `abandoned` is a job whose queue or run never reported an end, past the
        25-hour open-span cap.
      example: completed
    CiConclusion:
      type: string
      enum:
        - success
        - failure
        - timedOut
        - cancelled
        - skipped
      example: failure
    CiJobFailure:
      type: object
      properties:
        failingStep:
          type:
            - string
            - 'null'
          example: Typecheck
        analysis:
          $ref: '#/components/schemas/CiFailureAnalysis'
        logExcerpt:
          anyOf:
            - $ref: '#/components/schemas/CiLogExcerpt'
            - type: 'null'
        cluster:
          anyOf:
            - $ref: '#/components/schemas/CiFailureClusterRef'
            - type: 'null'
          description: >-
            Other failures with the same cause. Null until the hourly clustering
            run assigns this one.
        annotationCount:
          type: integer
          description: Read them with `GET /v2/ci-jobs/{id}/annotations`.
          example: 0
      required:
        - failingStep
        - analysis
        - logExcerpt
        - cluster
        - annotationCount
    CiFailureAnalysis:
      type: object
      properties:
        state:
          $ref: '#/components/schemas/CiAnalysisState'
        summaryShort:
          type:
            - string
            - 'null'
          example: Frontend TypeScript checks failed
        summary:
          type:
            - string
            - 'null'
          example: Frontend TypeScript checks failed on a type mismatch
        rootCause:
          type:
            - string
            - 'null'
          example: A string is passed where a number is expected.
      required:
        - state
        - summaryShort
        - summary
        - rootCause
    CiLogExcerpt:
      type: object
      properties:
        startLine:
          type: integer
          example: 69
        endLine:
          type: integer
          example: 71
        text:
          type:
            - string
            - 'null'
          description: >-
            The stored reduced excerpt, which outlives the 30-day log. Null when
            the failure has no analysis, or without the **Read CI logs**
            permission. Read the lines with `GET /v2/ci-jobs/{id}/log-lines`.
          example: 'error TS2322: Type ''string'' is not assignable to type ''number''.'
      required:
        - startLine
        - endLine
        - text
      description: The failure's lines in the job's log, 1-based and inclusive.
    CiFailureClusterRef:
      type: object
      properties:
        id:
          type: string
          example: 0894d6a25f35e0786faac29a
        occurrences:
          type: integer
          example: 6
      required:
        - id
        - occurrences
    CiAnalysisState:
      type: string
      enum:
        - pending
        - ready
        - unavailable
      description: >-
        `pending` for 15 minutes after a failed job finished with no analysis
        yet. `unavailable` after that: the organization is not enabled, AI
        features are off, or the analysis failed.
      example: ready
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        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.
    trunkToken:
      type: apiKey
      in: header
      name: x-trunk-token
      description: >-
        A short-lived token that Trunk's own tools send in the `x-trunk-token`
        header: the `trunk` CLI after `trunk auth login`, and the
        `trunk-io/login` action in a GitHub Actions run. Your own integrations
        should use an API key instead. Never send `Authorization` and
        `x-trunk-token` on the same request.


        **A token from a GitHub Actions run can only upload and read impacted
        targets** (`PUT /v2/impacted-targets` and `GET
        /v2/pull-requests/{id}/impacted-targets`), for the repository the run
        belongs to. On a pull request from a fork it can also call the Flaky
        Tests CLI endpoints. Every other endpoint refuses it.

````