Skip to main content

Overview

Create a new API key for integrations; the plaintext key is returned once in the response.

POST /api/v1/api-keys

Purpose: create a new API key. The plaintext key is returned only once. Body:
{ "name": "My Production Key", "purpose": "zapier" }
Allowed purpose values: zapier, n8n, google sheets, custom. Example request:
curl -X POST \
  'https://api.example.com/api/v1/api-keys' \
  -H 'Content-Type: application/json' \
  -d '{"name":"My Production Key","purpose":"zapier"}'

Response

Status: 201 Created Example response:
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "user_id": "550e8400-e29b-41d4-a716-446655440000",
  "key": "sk_live_abcdef...",
  "name": "My Production Key",
  "purpose": "zapier",
  "created_at": "2025-01-01T12:00:00Z"
}
Response fields:
  • key: plaintext key (store securely; it will not be returned again).
Errors:
  • 400 invalid request.
  • 401 unauthorized.
  • 500 internal error.