Skip to main content

Working with the Leanmote API

Your first API call in five steps, tokens and the Organization header, the executive summary endpoint and errors. Full reference at developers.leanmote.com.

Leanmote's data is reachable programmatically. This article is the entry point: how to make your first call, which surfaces exist, how to authenticate, and where the full reference lives.


​

The complete reference of every endpoint, a quickstart and a Postman collection are at developers.leanmote.com.


​

Quick start


​

1. Create a token


​

In Leanmote, open Integrations, find Leanmote API and create a token. Give it a name and an expiry, and copy it right away: it is shown only once.


​

2. Check the connection


​

Call GET /users/me. It answers who the token belongs to, with their organization and role.


​

curl https://api.leanmote.com/v1/users/me \
-H "Authorization: Bearer YOUR_TOKEN"


​

3. Read your headline metrics


​

POST /metrics-summary returns DORA, time to market, AI adoption and more for a period, globally or per segment (see Executive summary below).


​

curl -X POST https://api.leanmote.com/v1/metrics-summary \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"from": "2026-10-01", "to": "2026-10-31"}'


​

4. Explore the reference


​

At developers.leanmote.com every endpoint has its parameters, an example response and its errors. Import the Postman collection to try them without writing code.


​

5. Prefer to ask in plain language?


​

Connect Leanmote to Claude, ChatGPT or your AI tool of choice with the Leanmote MCP connector: it uses this same API with your own permissions.


​

The four API surfaces


​

  • REST API — https://api.leanmote.com/v1. Organizations, teams, users, boards, tasks, interactions, calendars, saved views, alert rules, and the executive summary (/metrics-summary).

  • Metrics API — https://api.leanmote.com/v1/metrics/. The analytical payloads behind the dashboards: DORA, flow, collaboration and financial views. Same domain, separate service.

  • SCIM — https://api.leanmote.com/scim/v2. User and group provisioning for enterprise identity providers, with /Users, /Groups and ServiceProviderConfig. Requests and responses use application/scim+json.

  • OTLP ingestion — telemetry from AI coding tools. The endpoint is generated per organization rather than being a fixed URL, so you get it from the integration's page instead of building it yourself.


​

Authenticate


​

Every request carries an Authorization header. The Bearer prefix is optional: the token is accepted with or without it.


​

Three kinds of credential work:


​

  • Your own API tokens, which you create yourself from Integrations → Leanmote API. You can have several, each with its own name and expiry; the list shows when each one was last used, and you can revoke any of them at once. A token acts as you: it sees exactly what you see in the app, nothing more, and it stops working if you are archived.

  • An API token issued by an organization Admin for a user, with POST /admin/users/{user_id}/api-credentials. An Admin can list a user's tokens, see which are still in use and revoke them.

  • A browser session, when the call comes from a signed-in context.


​

The Organization header is optional. Without it, a token works on its owner's first organization. If you belong to more than one, send Organization with the id of the one you want to read.


​

What a token can reach


​

A token reaches the public API: the endpoints documented at developers.leanmote.com. The routes the Leanmote app uses internally answer 403 with forbidden_for_token to a token, even when the same person can see that screen in the app.


​

Executive summary


​

POST /metrics-summary answers the questions an executive dashboard asks, in one call: for a period, each metric with its unit, the previous period of the same length and the change.


​

  • Metrics: deployment frequency, lead time for changes, change failure rate and mean time to recover (DORA); time to market; AI seat utilization and AI-assisted pull requests; availability and observability coverage from Datadog; mean time to recover by incident severity (for example, your P1s); and the share of traffic outside a monolith.

  • Segments: up to six, each one a slice of your organization such as a country or a business unit, built from teams, repositories, boards or people, Datadog SLOs and services, incident severities, the monolith's services and the country of your transactions.


​

{
"from": "2026-10-01",
"to": "2026-10-31",
"segments": [
{"name": "Global", "severities": ["SEV-1"]},
{"name": "Colombia", "teams": [220, 299], "countries": ["co"], "monolith": ["core-monolith"]}
]
}


​

A metric that cannot be measured comes back with value: null and an error that says what is missing — for example datadog_not_connected, monolith_required or country_not_found — while the rest of the summary still answers. The reference lists every metric, filter and error.


​

What you can read


​

The REST API is organized around the same objects you see in the product:


​

  • Organizations — the organization, its members, its teams and its connected apps.

  • Teams — a team, its members, its leads, its tasks and its interactions. Teams can be created and edited, and members added or removed.

  • Users — a user, the teams they belong to, the tools they are mapped to and their saved views. GET /users/me resolves who the credential belongs to.

  • Work — boards and their tasks, plus the interactions (commits, pull requests, reviews, comments) Leanmote ingested.

  • Calendars — connected calendars and their events.

  • Saved views — the dashboard views and custom filters an organization has set up, including the catalog of what can be built.

  • Alert rules — create, edit and disable them.

  • Org chart — the resolved team hierarchy, plus the import flow that proposes a hierarchy from team names and lets you apply or undo it.

  • Executive summary — the headline metrics per segment, described above.


​

Errors


​

Responses come in an envelope: {"status": "success", "data": ...} when it works, and {"status": "failed", "code": ..., "data": {"message": ...}} when the request is refused. The code is stable, so your integration can branch on it; the message says what to fix.


​

  • 401 with {"message": "Unauthorized"} — the token is missing, wrong, expired or revoked, or the person it belongs to has been archived.

  • 403 — the token cannot use that route (forbidden_for_token), or the person behind it cannot see that data.

  • 422 — the request is malformed: the message names the field and the valid values.


​

Common use cases


​

  • Feed an executive dashboard — call /metrics-summary once per period, globally and per country or business unit.

  • Embed metrics in your own dashboards — read from the Metrics API and render in the data tool you already use.

  • Automate the user lifecycle — point your identity provider at SCIM to create, update and deactivate users.

  • Send AI tool telemetry — use the OTLP endpoint for Claude Code and other instrumented tools.

  • Build a custom integration — combine the REST API and the Metrics API to bring Leanmote's data into internal tools.


​

Related articles


​

  • Leanmote MCP connector

  • Integrations overview

  • SSO and SCIM

  • Claude Code integration (OTLP)

Did this answer your question?