Skip to main content
The legacy API will be deprecated. Use the API for new integrations. To move existing code, see Migrate Merge Queue from the legacy API and Migrate Flaky Tests from the legacy API.
The legacy API is at https://api.trunk.io/v1. Endpoint paths in this section don’t include /v1, so add it to the base URL. For example, send POST https://api.trunk.io/v1/submitPullRequest.

Authentication

Send your organization API token in the x-api-token header:
The organization API token works only with the legacy API, and API keys don’t work with it. To find or rotate the token, see Legacy API authentication.

Request format

Most endpoints are POST and take a JSON body. A request body can’t be larger than 20 MiB. Legacy endpoints address a repository by its coordinates, not by an ID: Each endpoint page shows its exact fields.