Skip to main content
POST
/
api
/
keys
Create API Key
curl --request POST \
  --url https://encrata.com/api/keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "id": "key_abc123",
  "name": "Production",
  "key": "enc_live_a1b2c3d4e5f6g7h8i9j0...",
  "created_at": "2024-01-15T10:00:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.encrata.com/llms.txt

Use this file to discover all available pages before exploring further.

Authentication

Requires an API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY

Request

name
string
required
A display name for the key (e.g., “Production”, “Development”).

Example request

curl -X POST https://encrata.com/api/keys \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"name": "Production"}'

Response

id
string
Unique key identifier.
name
string
Display name for the key.
key
string
The full API key. This is only shown once — store it securely.
created_at
string
ISO 8601 creation timestamp.

Example response

{
  "id": "key_abc123",
  "name": "Production",
  "key": "enc_live_a1b2c3d4e5f6g7h8i9j0...",
  "created_at": "2024-01-15T10:00:00Z"
}
The full key value is only returned at creation time. You won’t be able to retrieve it again. Store it securely.
{
  "id": "key_abc123",
  "name": "Production",
  "key": "enc_live_a1b2c3d4e5f6g7h8i9j0...",
  "created_at": "2024-01-15T10:00:00Z"
}