API keys authenticate every request to the Borga API. Each key has aDocumentation Index
Fetch the complete documentation index at: https://docs.borga.is/llms.txt
Use this file to discover all available pages before exploring further.
type of either publishable (safe to expose in client-side code) or secret (server-side only), and a mode of either test or live. You can manage keys here or through the dashboard.
List API keys
GET /v1/api_keys
Returns a list of all API keys for your merchant account.
Response fields
Array of API key objects.
Create an API key
POST /v1/api_keys
Creates a new API key. The full key value is returned only in this response — store it securely before continuing.
Request parameters
Key type. One of
publishable or secret.Key mode. One of
test or live.Optional label to help identify the key’s purpose (e.g.
"Production server", "Mobile app").Response fields
Unique key identifier.
Key type:
publishable or secret.Key mode:
test or live.Key label.
The full key value. This is the only time it is returned in plaintext — save it now.
Last four characters of the key value.
ISO 8601 timestamp of when the key was created.
Rotate an API key
POST /v1/api_keys/{id}/rotate
Generates a new value for an existing key and immediately invalidates the old one. Use this to rotate credentials without deleting and re-creating the key object.
Path parameters
The ID of the key to rotate.
Response fields
Returns the updated key object with the newkey value in plaintext. After this response, the new value is only available via last4.
Unique key identifier.
Key type.
Key mode.
Key label.
The new full key value. Save this now — it will not be shown again.
Last four characters of the new key value.
ISO 8601 timestamp of the original key creation.
Revoke an API key
DELETE /v1/api_keys/{id}
Permanently revokes an API key. Any requests using this key will be rejected immediately.
Path parameters
The ID of the key to revoke.
Response fields
Returns an empty body with a204 No Content status on success.