Skip to main content
All API requests require authentication using Bearer tokens. The token is sent in the Authorization header of every request.

Header Format

All authenticated requests must include the following header:
The token can be either:
  • JWT Token: An ID token from your authentication provider (Cognito)
  • API Key: A service-to-service API key generated via the auth service

Token Types

JWT Tokens (User Authentication)

JWT tokens are issued when users log in through your authentication provider. These tokens are temporary and expire after a set period (typically 1 hour). When to use: Web applications, mobile apps, user-facing integrations

API Keys (Machine-to-Machine)

API keys are permanent credentials for server-to-server integrations. They are generated via the auth service and associated with a specific role. When to use: Backend services, automated integrations, scheduled jobs

Example Requests

Using JWT Token

Using API Key

Token Validation

The authorization service automatically:
  • Validates the token format and signature
  • Extracts tenant identification from the token
  • Verifies required permissions for the requested operation
  • Passes tenant context to the backend Lambda functions
You do not need to include tenant_id in request bodies - it is automatically extracted from your token.

Permissions

Each token is associated with specific permissions following the resource:action pattern. The required permission varies by endpoint:

KYC Operations

Watchlist Operations

Usage & Monitoring

Tenant Management

Error Responses

401 Unauthorized

This occurs when:
  • The Authorization header is missing
  • The token format is invalid
  • The token has expired (JWT tokens only)

403 Forbidden

This occurs when:
  • The token is valid but lacks required permissions
  • The token’s associated role doesn’t grant access to the resource

Getting API Keys

To generate an API key for machine-to-machine authentication:
  1. Contact your account administrator
  2. Provide the intended use case and required permissions
  3. The API key will be generated with appropriate role-based permissions
For security, API keys should be:
  • Stored securely (environment variables, secrets manager)
  • Never committed to version control
  • Rotated periodically
  • Revoked immediately if compromised