Reten Docs

Authentication

Required headers, permissions, and authentication methods for the integration API.

All integration endpoints require authentication via an API key. JWT (user token) authentication is not supported on these endpoints.

Required header

Each request must include the following header:

HeaderValueDescription
x-api-keyrtn_sk_...API key generated from the administration panel
curl -X GET BASE_URL/api/integration/activities/tasks \
  -H "x-api-key: YOUR_API_KEY"

There is no need to send the x-tenant-id header. Each API key is associated with a specific tenant and the system resolves the tenant automatically from the key.

The API key is shown only once at creation time. If you lose it, you will need to revoke it and create a new one from the administration panel.

Obtaining an API key

Reten Environments

EnvironmentAdmin PanelAPI Base URL
Developmentapp-development.reten.aihttps://api-development.reten.ai
Stagingapp-staging.reten.aihttps://api-staging.reten.ai
Productionapp.reten.aihttps://api.reten.ai

Use the admin panel URL to manage API keys and dispatch configurations. Replace BASE_URL in code examples with the API base URL for your environment.

API keys are created from the Reten administration panel by a user with ADMIN role or higher:

  1. Navigate to Settings → API Keys
  2. Click Create API Key
  3. Assign a descriptive name (e.g., "Task Dispatch — YOM")
  4. Select the required permissions based on the endpoints you will use
  5. Copy the generated key and store it securely

Permissions per endpoint

Each integration endpoint requires a specific permission on the API key:

EndpointMethodRequired permission
/api/integration/activities/tasksGETVIEW_ACTIVITIES
/api/integration/activity-results/tasksPOSTSUBMIT_ACTIVITY_RESULT
/api/integration/task-result-type-configsGETVIEW_ACTIVITIES

An API key can only have permissions that are a subset of the permissions of the user who created it. If you need an additional permission, contact a tenant administrator.

Tenant scope

Each API key is associated with a single tenant. The system resolves the tenant automatically from the key — there is no need to send x-tenant-id:

  • If x-api-key is invalid or revoked → 401 Unauthorized response
  • If the key does not have the required permission → 403 Forbidden response
  • Returned data always corresponds to the key's tenant

User token vs API key

FeatureJWT (User token)API Key
Primary useInteractive sessions in the appProgrammatic integrations
Duration15 minutes (access token)No expiration (or configurable date)
RenewalAutomatic via refresh tokenNot applicable — the key is permanent
PermissionsAll permissions from the user's roleSubset selected at key creation
x-tenant-id headerRequiredNot needed (tenant resolved from the key)
Integration endpointsNot supportedRequired

Endpoints under /api/integration/* only accept API key authentication. Requests with JWT will be rejected.