Skip to content

API overview

View as Markdown

The Ligament API lets your own code read and change the same records, workflows and app definitions that people use in the app. Use it to sync records with another system, build a dashboard, run a nightly export or give an AI agent controlled access to your workspace.

This page covers what every call has in common. The full list of endpoints is in the REST API reference, and the same API is published as an OpenAPI document at /openapi.json.

The API lives on the same origin as the app, under /api:

https://app.ligament.ai/api

Send an API key as a Bearer token on every request:

Authorization: Bearer <your key>

You create keys in the app under Settings › API keys (see API keys and scopes). The key is shown once, when you create it. Keep it in a secret store or an environment variable; the examples in these docs read it from $LIGAMENT_API_KEY.

The app itself calls the same endpoints with a signed-in browser session instead of a key. The two are not interchangeable:

Question API key Signed-in session
Who it acts as The person who created the key, capped at their current role The signed-in person
What limits it The key’s scopes, then that person’s access That person’s role and access
Where it works Every endpoint that declares a scope Every endpoint, including the session-only ones

A few areas only accept a signed-in session: managing API keys, SSO providers, the security policy and OIDC clients among them. A key gets 403 session_required there. The scopes reference lists them.

Request and response bodies are JSON. Send Content-Type: application/json on POST, PUT and PATCH. Timestamps are ISO 8601 in UTC (2026-11-30T13:57:30.540Z).

Errors are JSON too, with an HTTP status that tells you what kind of problem it is. Most permission errors carry a machine-readable code and a fix you can show to a person or feed back to an agent. See Errors.

Records are addressed by entity key, for example incident, person or case. This lists the newest incident in the workspace:

Terminal window
curl -s "https://app.ligament.ai/api/records/incident?limit=1" \
-H "Authorization: Bearer $LIGAMENT_API_KEY"

The response has the rows, the total number of matching records and what to send for the next page (trimmed to a few fields here):

{
"rows": [
{
"id": "cmx3c1hkc010fxjg0ona7p9j5",
"number": "INC0000050",
"title": "Verification API: elevated latency on document checks",
"priority": "high",
"state": "new",
"createdAt": "2026-11-30T13:57:30.540Z",
"updatedAt": "2026-11-30T14:30:03.676Z"
}
],
"total": 39,
"nextCursor": "MjAyNi0xMS0zMFQxMzo1NzozMC41NDBafGNteDNjMWhrYzAxMGZ4amcwb25hN3A5ajU"
}

Each row has the record’s fields plus id, state, createdAt, updatedAt, createdBy and updatedBy. Fields the key’s creator isn’t allowed to see are left out. Lists, filters and pagination covers filtering, sorting, search and paging.

To create a record, POST the field values to the same path:

Terminal window
curl -s -X POST "https://app.ligament.ai/api/records/incident" \
-H "Authorization: Bearer $LIGAMENT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Printer on 3rd floor offline", "priority": "medium"}'

A successful create answers 201 Created with the new record:

{"record":{"id":"cmx6au3qf00kd6x6suwxls72s","state":"new","title":"Printer on 3rd floor offline","number":"INC0000119","priority":"medium","time_worked_hours":null}}

The workspace fills in defaults and numbering (state, number) as it would for a record created in the app.

A key belongs to the workspace you were working in when you created it, and it only ever sees that workspace. There’s no workspace parameter on API calls. If your organisation has subsidiaries, create a key in each workspace your integration needs.

To check what a key acts as, call GET /api/access/whoami (needs records:read):

{
"userId": "vtvYBRvkNm4bYx6I0D9xqXS1lxzj7rBJ",
"role": "admin",
"admin": true,
"keyId": "cmx6aqk0b00ef6x6sdme04cmc",
"scopes": ["records:read", "records:write:incident"],
"evaluator": "v2",
"accessVersion": 468,
"canExplainOthers": true
}

role is the role the key acts with: its creator’s current role, at most admin.

  • The MCP server at https://app.ligament.ai/api/mcp gives AI clients the same records, access and spec tools over JSON-RPC.
  • The CLI wraps the API for scripts and terminals.
  • Inbound hooks and run callbacks cover calls that come from other systems into your workspace, and callbacks your workspace sends when a workflow run finishes.