Accounting made easy | Modernbanc

API Keys

API keys are used to authenticate requests to our API. They can be generated with custom user defined or predefined roles, and can be revoked at any time.

Requirements

  1. A workspace setup with Modernbanc.

Create

  • Navigate to the Settings tab in the navigation dropdown or by pressing G and then S.
  • Navigate to the API Keys tab in the navigation dropdown or by pressing G and then A.
  • Click the Create button in the upper right corner.
Create API Key Modal
  • Enter a name for the API key.
  • Select a role for the key.
  • Choose an expiration date.
  • Click the Create button.

Edit

curl --location --request PUT 'https://api.modernbanc.com/v1/api-keys/YOUR_API_KEY_ID' \
--header 'Content-Type: application/json' \
--header 'Authorization: APIKey YOUR_API_KEY' \
--data-raw '{
    "name": "APIKey updated name"
}'

Revoke

curl --location --request PUT 'https://api.modernbanc.com/v1/api-keys/YOUR_API_KEY_ID' \
--header 'Content-Type: application/json' \
--header 'Authorization: APIKey YOUR_API_KEY' \
--data-raw '{
    "status": "revoked"
}'

Delete

curl --location --request DELETE 'https://api.modernbanc.com/v1/api-keys/YOUR_API_KEY_ID' \
--header 'Content-Type: application/json' \
--header 'Authorization: APIKey YOUR_API_KEY' \