---
title: "Create API Key"
method: POST
path: "/projects/{projectId}/apiKeys"
tags: ["Projects -- Api Key"]
---

# Create API Key

`POST /projects/{projectId}/apiKeys`

## Request

- Base URL: `https://partner.peaka.studio/api/v1`
- URL: `https://partner.peaka.studio/api/v1/projects/{projectId}/apiKeys`
- Auth: HTTP bearer

Creates a new API Key for the specified Project. The API Key is used to authenticate requests to the Peaka API on behalf of the Project.

The full key value is only returned once at creation time. Store it securely, as it cannot be retrieved later.

## Path parameters

- `projectId` string, required

## Request body

- ApiKeyRequest
  - `name` string: Name of the API key
  - `expiresAt` string, date-time: The expiration date and time of the API key in ISO-8601 format (e.g., "2025-12-31T23:59:59Z"). If not provided, the API key will not have an expiration date. The time should be in the ISO-8601 standard.

## Response `200`

API Key created

- ApiKey: Represents an API key.
  - `name` string: Name of the API key
  - `apiKey` string: API key. It is a secret and should not be shared. Please store it securely. You will not be able to see it again.
  - `apiKeyId` string, uuid: ID of the API key
  - `expiresAt` string, date-time: Expiration date of the API key. If null, the API key never expires. The time is in the ISO-8601 standard.

---

[API](https://skmtc.dev/peaka/apis/peaka-gateway-api.md) · [All operations](https://skmtc.dev/peaka/apis/peaka-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/peaka/apis/peaka-gateway-api/revisions/e68b033a22d5?raw)
