API and MCP

Everything Lana does, your code can do too.

A REST API and an MCP server, opened from the same Console, with the same permissions as your team. Plug your CRM, your dashboards and your AI assistant into your workspace.

PlannedThe API opens with the private beta. The docs are the published contract.

  • REST APIYour code reads and changes the workspace.https://api.lanachat.ai/v1
  • MCP serverYour AI assistant works in the Console with you.https://app.lanachat.ai/mcp
  • WebhooksSigned events land on your server as they happen.sale.completed

One token, the permissions you pick

What you can build

Your tools, wired into Lana.

Six things agencies build first. Each one has its guide, with the endpoints and the code.

Plug your CRM

Sync fans, conversations and what each fan bought into the CRM your team already uses.

Conversations API

Sales in your dashboard

Read today's revenue per creator, per link and per source, every hour, in your own reports.

Quick recipes

Drive Lana from your AI assistant

Connect Claude, Cursor or VS Code through MCP: it drafts scripts and persona changes for you to review.

MCP guide

Creators and accounts in bulk

One script adds a creator, connects her Telegram accounts, uploads her Vault and writes her first script.

Creators API

Hear every sale

Get a signed webhook on your server when a fan buys, a refund lands or an account loses its connection.

Webhooks

One tracking link per ad

Create a link for each ad from your ad tools, then read clicks, conversations and buyers per link.

Tracking API

Your API key

Your key in 30 seconds.

  1. 1

    Open API & MCP

    In the Console, open Users › API & MCP and press Create token.

  2. 2

    Pick its permissions

    Name it, then choose Workspace setup, or Custom permissions to tick them one by one, for example Read sales.

  3. 3

    Copy it once

    Press Copy token, or Copy client configuration for your assistant. The token is shown once: rotate or revoke it at any time.

Only the workspace owner and agency owners can create tokens. One token per tool you connect.

MCP

Plug an AI assistant with MCP.

MCP is an open standard that lets an assistant use tools in an app on your behalf. Add the LanaChat server to your assistant with your token, then ask it what it can see.

Run it in your terminal.

claude mcp add --transport http lanachat https://app.lanachat.ai/mcp \
  --header "Authorization: Bearer YOUR_MCP_TOKEN"

~/.cursor/mcp.jsonThen turn LanaChat on in Settings › MCP.

{
  "mcpServers": {
    "lanachat": {
      "url": "https://app.lanachat.ai/mcp",
      "headers": { "Authorization": "Bearer YOUR_MCP_TOKEN" }
    }
  }
}

In Settings › Developer › Edit Config. The mcp-remote bridge needs Node.js 18 or later.

{
  "mcpServers": {
    "lanachat": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://app.lanachat.ai/mcp", "--header", "Authorization:${LANACHAT_AUTH}"],
      "env": { "LANACHAT_AUTH": "Bearer YOUR_MCP_TOKEN" }
    }
  }
}

.vscode/mcp.jsonIn your project.

{
  "servers": {
    "lanachat": {
      "type": "http",
      "url": "https://app.lanachat.ai/mcp",
      "headers": { "Authorization": "Bearer YOUR_MCP_TOKEN" }
    }
  }
}

Replace the URL with the one of your workspace (Copy URL on the API & MCP page) and YOUR_MCP_TOKEN with your token. Web connectors that only offer an OAuth sign-in (ChatGPT connectors, custom connectors on claude.ai) cannot connect yet.

Tools the assistant gets

The assistant only sees the tools its token allows. A tool it cannot use is not listed at all.

ToolWhat it doesPermission
list_creators get_creatorRead creators, their identity and setup progresscan_setup
update_creator update_personaChange a creator's identity or persona pagescan_setup can_engine
list_accounts update_accountRead Telegram accounts, change brain, market or trafficcan_setup
list_media upload_media update_media create_media_folderAdd media to a Vault, sort them, suggest descriptions (shown for review before saving)can_setup
list_scripts draft_script update_scriptRead scripts and draft new ones: steps, media and Stars pricescan_setup
list_members update_memberRead and change team memberscan_setup
get_brain update_brain_draft test_brainRead a brain, edit its draft, try it in the Playgroundcan_engine
publish_brainPublish an ordinary brain draftcan_publish
test_advanced_ai tune_advanced_ai publish_advanced_aiAdvanced AI drafts, settings and profiles (owner workspace only)can_ai_test can_ai_tune can_ai_publish
list_experiment_reportsRead commercial experiment reports (owner workspace only)can_commercial_reports
list_fans get_conversationRead fans and conversation historycan_fan_read
import_fan_historyAdd past fans and messages to the records; never sends a messagecan_fan_import
list_salesRead recorded sales for reportscan_sales_read

No tool sends a message to a fan. Ask the assistant to work in drafts: publishing needs a token with the Publish AI Brain drafts permission. Leave it off to keep the last word.

Platforms

Telegram today, more platforms through the API.

Everything you read on this page is available for Telegram today: accounts, conversations, sales in Stars, the Vault, scripts and tracking. Other platforms will come later, and only through the API. LanaChat itself stays focused on Telegram.

Your first call

Plain JSON over HTTPS.

Keep the token in an environment variable, then call the API. This first call returns your workspace and what the token may do.

  • Base URLhttps://api.lanachat.ai/v1
  • HeaderAuthorization: Bearer <token>
  • Errors, pagination, rate limits and idempotency are in the quick start.
API quick start
Request
curl https://api.lanachat.ai/v1/workspace \
  -H "Authorization: Bearer $LANACHAT_TOKEN"
Response200 OK
{
  "id": "ws_7Hq2",
  "name": "Mia Agency",
  "kind": "agency",
  "timezone": "Europe/Paris",
  "token": { "id": "tok_31", "name": "Reporting script", "permissions": ["can_fan_read", "can_sales_read"], "expires_at": "2027-01-06T00:00:00Z" }
}

Planned

The API opens with the private beta.

Read the docs now, get your key on day one.