MonCha
Skip to article

API tokens and scopes

Search MonCha documentation

Search the full guides for topics such as renewal, ticket alerts, OAuth or knowledge refresh.

Create, restrict, expire and revoke workspace API tokens.

On this page

Create and test a token

  1. Select the intended workspace and open API & Agents.
  2. Create a token with a descriptive integration name.
  3. Choose only the scopes the integration needs.
  4. Choose all bots or a specific bot allowlist. Bot-restricted tokens cannot create new bots.
  5. Choose an expiry of 30, 90 or 365 days, or no expiry.
  6. Copy the token when it is shown and store it in your backend/client secret environment.
  7. Call a permitted read operation to confirm access before enabling writes.
curl "https://api.dev-moncha.com/v1/bots" \
  -H "Authorization: Bearer $MONCHA_API_TOKEN"

Scope reference

The standard preset includes the day-to-day scopes and excludes bots:write. The full preset includes all ten. Review write scopes before allowing an agent to act.

ScopeAllows
bots:readList accessible bots.
bots:writeCreate a bot within eligible workspace/tier capacity; requires an all-bots token.
kb:readList knowledge documents.
kb:writeQueue URL/text knowledge ingestion.
chat:invokeAsk a bot; normal usage rules apply.
conversations:readRead conversation lists and transcripts.
leads:readRead leads.
analytics:readRead aggregate 30-day analytics.
bookings:readRead booking lists and details.
bookings:writeConfirm, reject, reschedule or cancel eligible bookings.

Restrictions, expiry and rotation

  • Pass an allowed chatbotId when a bot-restricted token calls knowledge, chat, leads or analytics.
  • A valid token cannot bypass the current plan, payment state or bot allowlist.
  • The complete secret is shown only when created. If it is lost, create a replacement.
  • Rotate by creating a new token, updating the consuming application, testing it and revoking the old token.
  • Revocation or expiry causes authentication failure. Restoring paid/live service can restore an otherwise valid token without replacing it.
  • Keep tokens out of browser bundles, source control, screenshots and support messages.

Related guides

Something unclear? Tell us.

Start free trial