Quickstart
From a token to a real question about your team's work, with curl.
Step 1
Get a token
In Leanmote, open Integrations, find Leanmote API and create a token with a name and an expiry. Copy it right away: it is shown only once. It acts as you: it sees what you see in the app, nothing more. Keep it out of source code; you can revoke it from the same place.
export LEANMOTE_TOKEN="paste-your-token-here"
Step 2
Check who you are
curl -s https://api.leanmote.com/v1/users/me \
-H "Authorization: Bearer $LEANMOTE_TOKEN"
The answer names you, your organization and your role. If you belong to more than one organization, add
-H "Organization: <id>" to pick one; without it the token works on your first organization.
Every response has the same envelope:
{ "status": "success", "data": { ... }, "meta": { ... } }
and on error:
{ "status": "failed", "code": "forbidden", "data": { "message": "..." } }
Step 3
Read your headline metrics
curl -s https://api.leanmote.com/v1/metrics-summary \
-H "Authorization: Bearer $LEANMOTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"from": "2026-10-01", "to": "2026-10-31"}'
DORA, time to market, AI adoption, availability and more, each with its previous period. Add
"segments" to split them by teams, repositories or countries — see Executive summary in the reference.
Step 4
List your teams
curl -s "https://api.leanmote.com/v1/teams?per_page=50" \
-H "Authorization: Bearer $LEANMOTE_TOKEN"
Lists paginate with page and per_page; meta carries total and total_pages.
Step 5
Ask a real question
What did team 15 merge since the 1st of the month?
curl -s -G https://api.leanmote.com/v1/pull-requests \
-H "Authorization: Bearer $LEANMOTE_TOKEN" \
--data-urlencode "team_id=15" \
--data-urlencode "state=merged" \
--data-urlencode "merged_at[gte]=2026-11-01"
/pull-requests, /commits and /deployments search the whole organization at once,
across GitHub, GitLab, Bitbucket and Azure DevOps.
Errors you may meet
| Status | Code | What it means |
|---|---|---|
401 | The token is missing or no longer valid. | |
403 | forbidden | Your role does not reach that resource. |
403 | forbidden_for_token | The route is not part of the public API. |
404 | …_not_found | It does not exist in your organization. |
422 | invalid_… | The request is malformed: the message names the field and the valid values. |
Next
Browse every endpoint in the reference, import the Postman collection
(set its token variable), or generate a client from openapi.json.