Project

Create a Project API Key

Changed on

Create a project API key. Requires project:api_keys:write; project keys cannot create other keys. If you cannot grant a selected permission, the request returns 403 without creating a key. Each successful request creates a new key. Store the returned secret securely.

post/v2/projects/{projectId}/api-keys

Request

  • Base URL: https://api.gtx.dev
  • URL: https://api.gtx.dev/v2/projects/{projectId}/api-keys
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

projectIdstring required

Headers

gt-api-version'2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1'

API contract version. Defaults to the oldest supported version.

Request body

namestring required

Key name, 1–255 characters after trimming.

permissionsProjectApiKeyPermission[]

Project permissions to grant. Select at least one, or omit to grant all project permissions you can delegate. You must hold every selected permission. Duplicates are ignored. Write permissions do not include Read.

type'production' | 'development'

Ignored. All new keys are project-scoped API keys for any environment.

Response

Project API key created

Changes