OAuth 2.1
LeadLex supports OAuth 2.1 with dynamic client registration (RFC 7591), so a client needs only the server URL.- The client reads the discovery documents and registers itself at
/register. - It sends you to
/authorize, which redirects to the LeadLex consent screen onapp.leadlex.com. - After you approve, the client exchanges the authorization code at
/token.
- PKCE with
S256is required. Plain PKCE is not accepted. - Scopes are
read,writeandlexi. A client registered without a scope getsread write. - Authorization codes work once.
- Access tokens last 1 hour. Refresh tokens last 30 days.
- Refresh tokens rotate: every refresh revokes the old pair and issues a new one. A refresh request can narrow the scope but never widen it.
- Redirect URIs must be
https,httponlocalhostor127.0.0.1, or a custom app scheme. They are matched exactly. - Token endpoint authentication can be
none(public client),client_secret_postorclient_secret_basic. - Registration is rate limited per IP address.
Discovery
Both documents are also served with a
/mcp suffix for clients that derive the URL from the resource path. A 401 from the MCP endpoint carries a WWW-Authenticate header that points to the protected resource metadata.
Scopes
Revoke access
Open Settings, then API & Integrations, then Connected AI Assistants in the LeadLex dashboard. A client can also call/revoke with its token.
Workspace API key
Create a key under Settings then API & Integrations in the LeadLex dashboard. Keys start withwbk_. Send the key in the X-API-Key header:
- The key’s permissions decide what it can do. Tools that write need the
writepermission, otherwise the call returns403. - Records the key creates are attributed to the key’s owner when the key has one.
- Keep the key out of source control. See the API key guide for permissions and rotation.
OAuth only tools
An API key has no user behind it. These tools act for one person and refuse a key:create_campaign, list_sending_accounts, set_campaign_sending_account and all of the LinkedIn tools (linkedin_status, request_linkedin_connection, send_linkedin_message, list_linkedin_conversations, set_linkedin_do_not_contact, set_linkedin_settings).
Email search also differs. With OAuth, email tools read the signed-in user’s own synced mailbox. With an API key, they read across the workspace.
Rate limits
Every OAuth connection and API key can make 60 tool calls a minute. If you need more, write to support@leadlex.com. Over the limit, the server returns429 with a Retry-After header.