Skip to main content
The legacy API uses your organization API token, sent in the x-api-token header:
The organization API token works only with the legacy API. API keys don’t work with the legacy API. The token can do everything in your organization, so it has no permissions to choose. Some tools don’t accept API keys yet. Keep using the organization API token with them:
  • The Trunk Analytics CLI and trunk-io/analytics-uploader.
  • The Trunk MCP server’s token sign-in.
The Terraform provider accepts API keys from version 2.0.

Find your organization API token

In the Trunk app, navigate to Settings → Developer → API Keys. The token is in the Token field of the Organization API token (v1) section. Click the eye icon to show the token, then the copy icon to copy it.

Rotate the token

If you are an admin, click Rotate, then Yes, rotate token, to replace the token. Rotation immediately stops the old token from working, so update every integration that uses it. If your organization has no token yet, click Create token. If you are not an admin, the Rotate button is disabled. If your organization has no token yet, ask an administrator to create one.