Skip to main content

API Keys

All API requests require authentication using an API key. You can generate API keys from your Affonso Dashboard.
API keys are only shown once when created. Make sure to copy and store your key securely.

Using Your API Key

Include your API key in the Authorization header as a Bearer token:

Key Formats

Permissions

API keys can have different permission levels:

Error Responses

Example Error

Security Best Practices

API keys should only be used in server-side code. Never include them in JavaScript that runs in the browser.
Store your API keys in environment variables, not in your codebase.
Regenerate your API keys periodically and after any potential security incident.
Only grant the permissions your integration actually needs.