Authentication & Permissions
Authenticating requests
API access is token-based, not username/password. Send the token as a bearer token on every request:
Authorization: Bearer <your-token>There's no session, no cookies, no CSRF token to worry about: this header is the entire authentication mechanism. A missing or invalid token always gets a clean 401 JSON response, no Accept header needed.
Admins create and revoke tokens in the app; see API Tokens. A revoked token stops working immediately.
Who a token acts as
Every token belongs to a user. Every request made with it is attributed to that user: records it creates show that user as the owner, and changes show up in the audit trail under that user's name.
A token isn't limited by its user's role. When it can do more through the API than that user can in the app, the token list marks it Exceeds role, see Roles and Permissions.
Permissions
Every token has a specific set of module:action grants (or full access), chosen when it was created. If a request needs a grant the token doesn't have, you get a 403. This applies per module and per action:
| Grant | Allows |
|---|---|
leads:read | List and get leads |
leads:write | Create and update leads, including upserts |
leads:delete | Delete leads |
leads:link | Link and unlink leads to other records |
Line items and attendees belong to their record: writing them needs Write on the quote, order, invoice or meeting, nothing more.
Modules the API can't touch
Users, User Invites, Roles, Workspace, PDF Templates and Line Items are never available as modules of their own. A request to one gets a 404, whatever the token may do, and they aren't offered when you create a token. Line items are read and written as part of their quote or order; see Line items.