---
title: "Create Api Key"
method: POST
path: "/v2/integrations/api-keys"
tags: ["integrations-v2"]
---

# Create Api Key

`POST /v2/integrations/api-keys`

## Request

- Base URL: `https://api.traversal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.traversal.com/v2/integrations/api-keys`
- Auth: none declared

Create a new API key for the authenticated user.

The API key is returned ONCE in the response. Store it securely
as it cannot be retrieved again.

## Request body

- CreateApiKeyRequest: Request to create a new API key.
  - `name` string, required: Human-readable name for the API key (e.g., 'MCP key', 'CI key')

## Response `200`

Successful Response

- CreateApiKeyResponse: Response with newly created API key. WARNING: The `token` field contains the full API key and is only returned once during creation. Store it securely - it cannot be retrieved later.
  - `api_key` ApiKeyResponse, required: Public information about an API key (no secrets). This response is returned for list operations and includes only metadata about the key, not the actual secret.
    - `id` string, required: Unique identifier for the API key
    - `name` string, required: Human-readable name for the key
    - `prefix` string, required: Display prefix for the key (e.g., 'trv_ak_a7f3c9e2')
    - `created_at` string, date-time, required: When the key was created
    - `status` 'active' | 'revoked', required: Lifecycle state of a stored API key. Revoked keys stay in the table.
  - `token` string, required: The full API key token. IMPORTANT: This is only shown once.

## Other responses

- `422`: Validation Error

## Changes

> 66 revisions in range; 9 not diffed.

- **2026-09-28** `ff08ffe40f1a`: 1 info
  - added the required property `api_key/status` to the response with the `200` status

[Operation history](https://skmtc.dev/traversal/apis/traversal-api/changes/v2/integrations/api-keys/post.md)

---

[API](https://skmtc.dev/traversal/apis/traversal-api.md) - [All operations](https://skmtc.dev/traversal/apis/traversal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traversal/apis/traversal-api/revisions/31e1a8b7cf89?raw)
