Skip to content

Authentication

The Replicer API uses API keys for authentication. Include your key in the Authorization header of every request as a Bearer token.

Making authenticated requests

bash
curl https://api.replicer.ai/v1/agents \
  -H "Authorization: Bearer rpl_live_your_api_key_here"

API Key format

API keys follow a prefixed format for easy identification:

PrefixEnvironmentUsage
rpl_live_ProductionReal calls, real data
rpl_test_TestTesting and development

Creating API keys

  1. Go to your DashboardSettingsAPI
  2. Click Create API Key
  3. Choose a name, environment, and select the scopes you need
  4. Copy the key immediately — it's shown only once

Scopes

Each API key has granular scopes that control access. Only request the scopes you need:

ScopeGrants access to
calls:readList calls, get call details
calls:writeCreate outbound calls
contacts:readList contacts
contacts:writeCreate contacts
agents:readList agents
calendar:readList calendar events
calendar:writeCreate calendar events
messages:readList messages
messages:writeSend messages
webhooks:manageManage webhook endpoints

If your API key lacks a required scope, the API returns a 403 Forbidden error:

json
{
  "error": {
    "code": "insufficient_scope",
    "message": "API key does not have the required scope: calls:write"
  },
  "requestId": "req-abc123"
}

Key security

Important

  • Never share your API key or commit it to version control
  • Store keys in environment variables or a secret manager
  • Use test keys (rpl_test_) during development
  • Rotate keys regularly; revoke unused ones from the dashboard
  • Set an expiration date when possible

Authentication errors

StatusCodeMeaning
401unauthorizedMissing or invalid API key
403forbiddenKey is inactive or expired
403insufficient_scopeKey doesn't have the required scope

Replicer API Documentation