All API requests require authentication via a Bearer token. Your API key acts as the token.
AgentRef uses prefixed API keys to distinguish key types:
Making Requests
Include your API key as a Bearer token in the Authorization header:
Base URL
All API endpoints are served from:
Scopes
API keys are scoped to control access. When creating a key, you choose which scopes to grant.
Merchant Scopes
Affiliate Scopes
Scope Presets
For convenience, you can use presets when creating API keys:
Creating API Keys
- Log in to your AgentRef dashboard
- Go to Settings → API Keys
- Click Create API Key
- Select scopes or a preset
- Copy the key – it won’t be shown again
Store your API key securely. Treat it like a password. Never commit API keys to version control or expose them in client-side code.
Authentication Errors