Authentication
The Simplr API uses API keys for product integrations and bearer tokens for portal management endpoints.
API Keys
Include your API key in the X-API-Key header:
curl https://api.simplr-ai.com/v1/check \
-H "Content-Type: application/json" \
-H "X-API-Key: sk_live_xxxxxxxxxxxxx" \
-d '{"email": "user@example.com"}'
Key Types
| Type | Prefix | Usage |
|---|---|---|
| Live Secret | sk_live_ | Server-side production calls; consumes credits |
| Test Secret | sk_test_ | Server-side testing; usage is recorded but does not consume credits |
| Live Public | pk_live_ | Client SDK calls in production |
| Test Public | pk_test_ | Client SDK testing |
Getting Your Keys
- Log in to simplr-ai.com
- Go to API Keys
- Click Create API Key
- Copy your key (only shown once)
Security Best Practices
Keep Keys Secret
- Never expose
sk_*secret keys or portal bearer tokens in client-side code - Never commit credentials to version control
- Store server credentials in environment variables or a secret manager
- Use only
pk_*public keys in browser/mobile SDKs
Portal bearer tokens
Organization, billing, webhook, operations, and other dashboard-management endpoints use Authorization: Bearer <access-token>. Obtain the access/refresh token pair through the portal authentication flow. Do not substitute an API key for a bearer token unless the endpoint explicitly documents client authentication.
# .env
SIMPLR_API_KEY=sk_live_xxxxxxxxxxxxx
// server.js
const apiKey = process.env.SIMPLR_API_KEY;
Key rotation
Rolling a secret key revokes the old key immediately and returns a replacement once. If a key is compromised:
- Go to API Keys in your dashboard
- Click the compromised key
- Roll it to create a replacement, or revoke it without replacement
- Update your application with the replacement before rolling whenever possible; there is no overlap window
Error Responses
Missing API Key
{
"success": false,
"message": "Missing X-API-Key header"
}
Invalid API Key
{
"success": false,
"message": "Invalid API key"
}
Revoked API Key
{
"success": false,
"message": "Invalid API key"
}