v1.19.0Web App
•2 min read

The REST API now has rate limits and paginated key listing

The key endpoints (/api/keys and everything under it) now allow 600 requests a minute for each user and each service token. Past that, a request returns 429 with the code RATE_LIMITED and a Retry-After header giving the seconds until the next minute starts. The CLI and MCP server already show that delay when they hit a limit.

The limit is shared by everything a user does: the dashboard, the CLI and MCP connections count against one budget. Each service token has its own. apivault run and apivault env export make one request per key, so a CI matrix sharing a token with a large project can approach the limit; give parallel jobs separate tokens if they do. Wrong vault keys keep their own, stricter limit.

Refused requests appear in the project's request logs with status 429 and error code RATE_LIMITED.

#Paginated key listing

GET /api/keys still returns every key when you don't ask for pages, so existing scripts keep working. To page through a large project:

  1. Send limit, from 1 to 500: GET /api/keys?limit=100.
  2. If more keys follow, the response has an X-Next-Cursor header.
  3. Send its value as cursor with the same limit and environment filter: GET /api/keys?limit=100&cursor=<value>.
  4. Stop when a response has no X-Next-Cursor header.

The body is the same array of keys either way. A bad limit returns 400 INVALID_LIMIT, and a cursor that isn't a key in the listing returns 400 INVALID_CURSOR.

#Bulk import cap

POST /api/keys/bulk now accepts up to 500 items per request. Larger requests return 400 TOO_MANY_ITEMS without saving anything; split them into batches.

Read more in the REST API documentation.