Authentication

All API endpoints require an API key. Keys are tied to a specific user account and workspace — requests are automatically scoped to that workspace's data.

Getting a key

  1. Sign in at /login with your PulseLABS account.
  2. Go to Dashboard → click + New key.
  3. Give the key a name and choose which API scopes it can access.
  4. Copy the generated key — it is only shown once.

Using the key

Pass the key in the x-api-key request header. You may also use Authorization: Bearer sk_live_xxx if your HTTP client requires it.

curl
curl https://api.yourdomain.com/v1/conversations \
  -H "x-api-key: sk_live_a1b2c3d4e5f6g7h8i9j0k1l2"
javascript
const res = await fetch('https://api.yourdomain.com/v1/conversations', {
  headers: {
    'x-api-key': 'sk_live_a1b2c3d4e5f6g7h8i9j0k1l2',
    'Content-Type': 'application/json',
  },
})
const { conversations } = await res.json()
python
import requests

res = requests.get(
    'https://api.yourdomain.com/v1/conversations',
    headers={'x-api-key': 'sk_live_a1b2c3d4e5f6g7h8i9j0k1l2'},
)
data = res.json()

Request headers

NameTypeRequiredDescription
x-api-keystringrequiredYour API key (sk_live_…)
Content-TypestringrequiredMust be application/json for POST/PUT/PATCH requests

Scopes

Each key can be restricted to a subset of API modules. If a request requires a scope the key doesn't have, the API returns 403 Forbidden.

NameTypeRequiredDescription
conversationsscopeoptionalCreate and query AI debate conversations
agentsscopeoptionalManage agent personas and memories
sim-enginescopeoptionalBusiness simulations and scenario trees
life-copilotscopeoptionalLife plans and profile data
market-analysisscopeoptionalMarket research and competitive analysis
risk-evaluatorscopeoptionalRisk sessions and probability trees

Error responses

NameTypeRequiredDescription
401UnauthorizedoptionalMissing, invalid, revoked, or expired API key
403ForbiddenoptionalKey does not have the required scope
404Not FoundoptionalResource not found in your workspace
500Server ErroroptionalInternal error — check the error message field