Skip to content
sign in

Create a user API key (user key auth)

POST /api/v1/keys

Request

Body (application/json)

  • name (string, required)

Responses

201

Key, shown once

  • id (string, required)
  • key (string, required)

default

Error as { error: { code, message } }

  • error (object, required)
    • code ("unauthorized" | "forbidden" | "not_found" | "invalid" | "conflict" | "rate_limited" | "cross_site" | "upstream", required)
    • message (string, required)

Example

curl -X POST \
  -H "Authorization: Bearer cupof_uk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string"}' \
  https://cupof.ai/api/v1/keys