Skip to content

API reference

API: API keys

Markdown version

MethodPathWhat it doesScope
GET/v1/api-keysList API keys (secrets are never returned)keys:write
POST/v1/api-keysCreate an API key. The secret is shown once in this response. (web app only)keys:write
DELETE/v1/api-keys/:idRevoke an API keykeys:write
PATCH/v1/api-keys/:idChange a key's name, address ranges or expiry (from now, at most 365 days; never expiring: owners, with a reason) (web app only)keys:write
POST/v1/api-keys/:id/rollReplace a key's secret. The old secret stops working immediately; the new one is shown once. (web app only)keys:write

Examples

GET /v1/api-keys

List API keys (secrets are never returned)

curl -s "https://api.closefinch.com/v1/api-keys" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/api-keys`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

DELETE /v1/api-keys/$ID

Revoke an API key

curl -s -X DELETE "https://api.closefinch.com/v1/api-keys/$ID" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/api-keys/${id}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

Request and response schemas: https://www.closefinch.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.

Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.