Skip to content

Authentication

All server-to-server REST endpoints authenticate with an API key via the X-API-Key header.

X-API-Key: sk_live_agent_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
KeyUsageExposable?
sk_live_agent_…Server-side REST API (this doc)No — backend only
pk_live_…Browser widget (client embed)Yes — frontend

The public key (pk_live_) is rejected on server-to-server REST routes. You’d get a 403 AUTH_API_KEY_FORBIDDEN.

API keys are created from Settings → API Keys in the admin dashboard. You can create multiple keys (one per environment, per integration, etc.) and revoke them individually.

The full key is shown once at creation — copy it immediately.

A read-only, side-effect-free call that returns the app tied to your key:

curl
curl https://supportdesk.innovartx.com/api/v1/auth/whoami \
-H "X-API-Key: $SUPPORTDESK_API_KEY"

If all good, you get a 200 OK with:

{
"success": true,
"data": {
"appId": "cl…",
"slug": "your-app",
"name": "Your App",
"keyType": "agent"
}
}
HTTP codeBusiness codeCause
401AUTH_API_KEY_MISSINGX-API-Key header missing
401AUTH_API_KEY_INVALIDKey is malformed or matches no app
401AUTH_API_KEY_EXPIREDKey has passed its expiration date
403AUTH_API_KEY_FORBIDDENYou used a pk_live_ instead of a sk_live_agent_

See Errors for full error response format.