REST API (API keys + OAuth)
The v1 REST API accepts two credential types:- API keys (
sai_<64hex>) — server-to-server. Create them in Integrations → Sight AI API. Shown once at creation. - OAuth access tokens (
sai_oauth_*) — for app integrations that completed the OAuth consent flow. See MCP Setup and Webhooks for the OAuth flow.
Key format (API keys)
- Prefix:
sai_ - 64 hex characters after the prefix
- Team-scoped; optional site restrictions at creation time
OAuth (app integrations)
App integrations use OAuth 2.1 Authorization Code + PKCE. Register an OAuth client in Integrations → Sight AI API → OAuth apps, redirect users to/oauth/authorize, exchange the code at /oauth/token. The resulting sai_oauth_* access token works on both /api/v1/* and /mcp. See Webhooks for an end-to-end example.
PKCE (S256) is required for every client, including server-side ones.
Public vs. confidential clients
When registering an OAuth app you choose how the client authenticates at the token endpoint:
Confidential clients are created only by an authenticated team admin in the dashboard, which returns the
client_secret (sai_ocsec_…) once. Store it server-side; it cannot be retrieved later. At the token endpoint, present it alongside PKCE:
client_secret_basic—Authorization: Basic base64(client_id:client_secret)client_secret_post—client_idandclient_secretin the request body
client_secret and a valid PKCE exchange — so confidential clients add defense-in-depth on top of PKCE. Use a public client only when the integrator genuinely can’t hold a secret.
Rotating a client secret
If aclient_secret is exposed (or just on a schedule), rotate it from Integrations → Sight AI API → OAuth apps:
- Find the confidential client and click Rotate secret.
- Confirm — the old secret stops working immediately. The new secret is shown once; store it server-side.
- Update your integration with the new secret.
Scopes
Idempotency-Key
ThePOST /api/v1/sites/{siteId}/outreach/inbox/messages endpoint accepts an optional Idempotency-Key header. When supplied, a repeat request with the same key replays the cached response (HTTP 200) instead of re-running the ingestion pipeline — so you can safely retry a failed or timed-out request without creating duplicate conversations.
- Any opaque string up to 128 characters (alphanumeric,
.,_,-,:). - Scoped to your API key — two different keys can reuse the same value.
- Cached for 24 hours; after that the same key is treated as a fresh ingestion.
MCP (OAuth only)
MCP clients must not use API keys. Use OAuth 2.1 Authorization Code + PKCE.- Authorization:
GET /oauth/authorize - Token:
POST /oauth/token - Metadata:
GET /.well-known/oauth-authorization-server