Read the key you call with, and create, change and delete API keys with a management key.
| Method | Path | Key | Does |
|---|---|---|---|
GET | /v1/key | API key | this key: its cap, what is left, its usage |
GET | /v1/keys | management key | lists your API keys |
POST | /v1/keys | management key | creates one |
GET | /v1/keys/{hash} | management key | reads one |
PATCH | /v1/keys/{hash} | management key | changes one |
DELETE | /v1/keys/{hash} | management key | deletes one |
All are free. Every amount is in DA. A key is named by its hash: the SHA-256 of the key, in lowercase hex. See Authentication for the two kinds of key.
curl https://opendunes.com/v1/key \
-H "Authorization: Bearer $OPENDUNES_API_KEY"{
"data": {
"limit": 2000,
"limit_reset": "monthly",
"limit_remaining": 1240.5,
"usage": 759.5,
"usage_daily": 42.1,
"usage_weekly": 310.75,
"usage_monthly": 759.5
}
}limit, limit_reset and limit_remaining are null for a key with no cap. The fields are explained on Limits.
curl https://opendunes.com/v1/keys \
-H "Authorization: Bearer $OPENDUNES_MANAGEMENT_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Souk Bot",
"limit": 2000,
"limit_reset": "monthly",
"expires_at": "2026-12-31T23:59:00Z",
"storage": true
}'| Field | Description |
|---|---|
name | Required, up to 255 characters |
limit | The cap in DA; null or absent for none |
limit_reset | daily, weekly or monthly; absent, the cap never resets |
expires_at | A date and time in the future; set only when the key is created |
storage | Whether the files this key sends and gets back are kept; true by default |
The answer is 201, with the key's value in key — shown this once:
{
"data": {
"hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"name": "Souk Bot",
"label": "sk-a1B2c…",
"disabled": false,
"limit": 2000,
"limit_remaining": 2000,
"limit_reset": "monthly",
"usage": 0,
"usage_daily": 0,
"usage_weekly": 0,
"usage_monthly": 0,
"storage": true,
"created_at": "2026-09-24T09:12:03+00:00",
"updated_at": "2026-09-24T09:12:03+00:00",
"expires_at": "2026-12-31T23:59:00+00:00"
},
"key": "sk-…"
}GET /v1/keys lists your active keys, 100 at a time from offset; include_disabled=true adds the disabled ones.GET /v1/keys/{hash} answers one key, as above, without its value.PATCH /v1/keys/{hash} takes name, limit, limit_reset, storage and disabled. A disabled key answers 401 until it is enabled again. The expiry cannot be changed.DELETE /v1/keys/{hash} deletes the key and answers { "deleted": true }; requests with it answer 401 from then on.A hash that is not one of your keys is a 404.
Management keys themselves are created and revoked from Settings → Management keys in your dashboard — see Management keys.