Skip to main content

Authentication

All requests to the Xavigate API require a Bearer token in the Authorization header.

Authorization: Bearer test_sk_abc123...

Key structure

Every API key has three components: environment prefix, type, and secret.

PrefixEnvironmentUse
test_pk_*SandboxClient-side (public)
test_sk_*SandboxServer-side (secret)
live_pk_*ProductionClient-side (public)
live_sk_*ProductionServer-side (secret)

sk_* keys are secret. Never expose them in client-side code, browser requests, or version control. Only pk_* keys are safe for client-side use.

The key prefix determines which environment your request runs against — sandbox requests hit the sandbox database, production requests hit production. There is no separate base URL; the same endpoint handles both, routing based on key prefix.

Closed beta base URL

During the closed beta, the Worker is at https://xavigate-api-v2.steven-c8f.workers.dev. The api.xavigate.com domain cuts over at general availability.


Sandbox vs production

SandboxProduction
Keystest_*live_*
DataIsolated test databaseReal data
BillingNo chargesMetered per tier
Webhook eventsDelivered to test endpoints onlyDelivered to production endpoints
Rate limitsStandard tier limitsStandard tier limits

Create unlimited subjects, run assessments, and test your integration in sandbox without touching production data or incurring charges.


Scopes

Keys are minted with specific scopes. A key with nature:read cannot create subjects; a key with nature:write cannot call read-only endpoints on other products.

ScopeOperations
nature:readGET /v1/nature/*
nature:writePOST, PATCH, DELETE /v1/nature/*

Other product scopes (careers:read, situational:write, etc.) exist in the schema but are not mintable until those products launch.

Mint keys with the minimum scopes your integration needs. A server-side integration that only reads profiles doesn't need nature:write.


Managing keys

Closed beta: keys are provisioned directly — email team@xavigate.com to request access or rotate a key.

Self-serve key management opens with the developer dashboard at general availability. When live, the dashboard at dev.xavigate.com/dashboard will support:

  • Create — name a key, select scopes, receive the raw value once (store it securely)
  • Rotate — invalidates the current key and returns a new one
  • Revoke — permanently disables the key; requests using it will receive 401
Revoked keys are permanent

Revocation cannot be undone. If you revoke a key in use, all integrations using it will receive 401 unauthenticated immediately.


Errors

StatusError codeCause
401unauthenticatedMissing Authorization header, malformed key, key not found, key revoked
403insufficient_scopeKey exists but lacks the required scope for this operation

See Errors for the full error model.