Skip to main content
POST
/
v1
/
api-keys
Create API Key
curl --request POST \
  --url https://api.example.com/v1/api-keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "permission": "<string>"
}
'
name
string
required
A descriptive name for the API key.
permission
string
default:"full_access"
Permission level: full_access, sending_access, or read_only.

Request

cURL
curl -X POST https://www.unosend.co/api/v1/api-keys \
  -H "Authorization: Bearer un_xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Server"
  }'

Response

200
{
  "id": "key_123",
  "name": "Production Server",
  "key": "un_abc123xyz...",
  "created_at": "2024-01-15T10:30:00.000Z"
}
The full API key is only returned once upon creation. Store it securely.