Lelemon
  • Get started
  • Use cases
  • Guides
  • API basics
  • Webhooks
  • SDK, CLI and MCP
  • API reference
  • Changelog
  • v1 (legacy)
Authentication and scopesScope catalogIDs and objectsListsErrorsIdempotencyRate limitsVersioningError codes
powered by Zudoku
API basics

Authentication and scopes

Base URL: https://api.lelemon.cl/v2. Everything is HTTPS and JSON.

Send your key as a bearer token:

Keys belong to the organization, never to a person. Keep them on your server: anyone can read a key shipped in a browser or a mobile app.

Key types

PrefixUse
lel_live_...Your organization's data

Keys are created, rotated and revoked in the dashboard, with the session of a person. No key can manage keys, so a leaked key cannot mint others. See API keys.

Scopes

Each key carries scopes written resource:action. A route that needs a scope the key lacks answers 403 scope_missing, and detail names the scope. GET /v2/me returns the scopes of the key you are using, and the scope catalog lists all of them.

Two scopes cost money or move data outside Lelemon, so they are separate:

  • cases:converse writes as the contact, which runs the agent and spends model tokens.
  • actions:write and webhooks:write decide where your conversation data goes.

Acting on a subaccount

A platform key adds Lelemon-Subaccount: sub_... to any request. See Run Lelemon for your customers.

Scope catalog
On this page
  • Key types
  • Scopes
  • Acting on a subaccount
curl https://api.lelemon.cl/v2/me \ -H "Authorization: Bearer $LELEMON_API_KEY"