Skip to content

Try “workflows”, “templates”, “SOQL” or “create a record”.

Authentication

Create a scoped API token in the console and send it as a bearer token.

The klerc API uses bearer tokens. You create a token in the console, choose what it may do, and send it with every request.

Create a token#

  1. Open Settings → API Tokens.
  2. Choose Generate token, name it after the integration it's for, and pick its scopes.
  3. Copy the token when it's shown. Live tokens start with wk_live_.

The token list shows each token's scope summary, when it was last used and whether it expires. Delete a token to revoke it immediately.

Send it#

Put the token in the Authorization header:

bash
curl https://api.klerc.co/api/v1/objects \  -H "Authorization: Bearer $KLERC_TOKEN"

A missing or invalid token returns 401.

A token never outgrows its owner#

A token can never do more than your account is allowed to. Every request is bounded twice:

  1. by the scopes you picked for the token;
  2. by your live permissions — your role, teams, the hierarchy and field-level security, as they are at the moment of the request.

If your access to a field or an object changes, your tokens change with it. If you leave the organisation, your integrations lose access too.

Scopes#

Scopes are feature:action. Each operation in the reference names the one it needs.

FeatureScopes
Objects, records and listsobjects:view, objects:use, objects:manage
Queryquery:run
Flowsflows:view, flows:use, flows:manage
Tasks and notestasks:view, tasks:use, notes:view, notes:use
Inboxinbox:view, inbox:send
Team inboxteam_inbox:view, team_inbox:send, team_inbox:manage
Reports and dashboardsreports:run, reports:create, dashboards:view, dashboards:create, dashboards:manage
Calendars and formscalendars:view, calendars:use, forms:view, forms:manage
Workflows and chatbotsworkflows:view, workflows:manage, chatbot:view, chatbot:manage
Agents and secretsagents:view, agents:manage, secrets:view, secrets:manage
Knowledge baseknowledge_base:view, knowledge_base:create, knowledge_base:manage, knowledge_base:share, knowledge_base:export
Integrations and audit logsintegrations:view, integrations:manage, audit_logs:view, audit_logs:export

As a rule of thumb: view reads, use creates and edits day-to-day data, and manage changes configuration such as schemas, workflows and forms.

A token without the scope an operation needs gets 403 — the same status as a call to a feature that's switched off. The error message says which.

Molly's token#

Every user has a token named Molly. It's what the assistant uses to act on your behalf, and it's bound by the same rule: never more than you.

Keeping tokens safe#

  • Keep tokens on servers. Never ship one in a browser or mobile app.
  • Give each integration its own token with the fewest scopes it needs.
  • Rotate tokens when people who knew them leave, and delete ones you no longer use.