Skip to Content
🚀 Finally launched — the long-awaited @incenta/sdk is live on npm. Get it →
DocsAuthentication

Authentication

All API requests require an API key passed via the Authorization header as a Bearer token.

API Keys

Authorization: Bearer rk_xxxxx

API keys are generated per app from the dashboard. Each app has a single API key that identifies the app. Keep your API key secure — never expose it in client-side code.

Use environment variables:

const INCENTA_API_KEY = process.env.INCENTA_API_KEY

Then include it in requests:

const res = await fetch('https://incenta.dev/api/v1/referrals', { headers: { Authorization: `Bearer ${process.env.INCENTA_API_KEY}` } })

Key prefixes

PrefixUse
rk_API keys (all environments)

Rate limiting

API usage is tracked per app via ApiUsageLog. Each app has a monthly limit configured in the dashboard. When exceeded, the API returns a 429 Too Many Requests response.

Errors

The API uses conventional HTTP response codes:

CodeMeaning
200Success
201Created
400Bad request — check your request body
401Unauthorized — invalid or missing API key
404Resource not found
429Rate limit exceeded
500Internal server error

Error responses include a message:

{ "error": "Referral code not found" }
Last updated on