POST
/
projects
/
{projectId}
/
apiKeys
curl --request POST \
--url https://partner.peaka.studio/api/v1/projects/{projectId}/apiKeys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "test",
"expiresAt": "2027-09-10T10:11:00Z"
}'
{
  "name": "test",
  "apiKey": "TtgGcQFq.s3fzROFoop8uHG4pS2LYhoqn1rLb6oW6",
  "apiKeyId": "21fd1a8d-88d5-4295-b792-5b2113138057"
}

Authorizations

Authorization
string
header
required

Use the Authorization header with the value 'Bearer <apiKey>' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication

Path Parameters

projectId
string
required

Project ID

Body

application/json

API Key request

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 - application/json

API Key created

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.