REST API

Authenticate with a pbk_ API key and read or write CRM data over HTTPS.

Getting a key

Tools → API Keys & Claude → Create key. The key is shown once — it's stored as a hash, so it can't be recovered later. Lose it and you create a new one.

Keys look like pbk_ followed by 64 hex characters, and act as the user who created them: same tenant, same role, same product restrictions.

Authenticating

curl https://yourdomain.com/api/contacts \
  -H "Authorization: Bearer pbk_your_key_here"

Everything is JSON in and JSON out. Errors come back as { "error": "message" } with a meaningful status code.

Common endpoints

GET    /api/contacts              list and filter contacts
POST   /api/contacts              create a contact
GET    /api/contacts/:id          one contact with related records
PUT    /api/contacts/:id          update

GET    /api/deals                 list and filter deals
POST   /api/deals                 create a deal
PUT    /api/deals/:id             update, including stage moves

GET    /api/companies             list companies
GET    /api/pipeline-stages       stages, with won/lost flags
GET    /api/tasks                 tasks
POST   /api/activities            log an activity

Rate limits

Per key. Exceeding them returns 429 with a Retry-After header. Back off rather than retrying immediately.

Revoking

Tools → API Keys & Claude lists every key with its prefix and creation date. Delete one and it stops working instantly. Key creation and deletion are both recorded in the audit log.