POST
/
v1
/
keys
cURL
curl --request POST \
  --url https://api.unkey.dev/v1/keys \
  --header 'Content-Type: application/json' \
  --data '{
  "apiId": "api_123",
  "prefix": "<string>",
  "name": "my key",
  "byteLength": 16,
  "ownerId": "team_123",
  "meta": {
    "billingTier": "PRO",
    "trialEnds": "2023-06-16T17:16:37.161Z"
  },
  "expires": 1623869797161,
  "remaining": 1000,
  "ratelimit": {
    "type": "fast",
    "limit": 10,
    "refillRate": 1,
    "refillInterval": 60
  }
}'
{
  "keyId": "key_123",
  "key": "prefix_xxxxxxxxx"
}

Body

application/json

Response

200
application/json

The configuration for an api

The response is of type object.