Mendloop Docs Request access

Approvals

The approvals inbox: list approval requests, count them, read one and decide.

When a workflow reaches an approval gate, it creates an approval request with the fix plan and waits. Nothing is written to code until the request is approved. Approvers are chosen by your policies (code owners by default). The same request can be decided in the app, in Slack or by email; these endpoints are the app's.

All approval endpoints need a signed-in session. approval.requested and approval.decided live events carry the request.

The approval request object#

Field Type Description
id uuid Approval request id
run_id uuid or null The workflow run waiting on it
step_id string The workflow step that asked
issue object or null {id, title, severity, platform, release, project_id, short_id}
plan object {summary, root_cause, confidence, files: [{path, additions, deletions}], risk, regression_test}
plan_version integer Which version of the plan is up for approval
approvers object[] {kind: user|team|role, id, name, escalated}
min_approvals integer Approvals needed
approvals_so_far integer Approvals recorded
policy_note string Why these approvers and this minimum
flags object[] {kind: risky_path|safety_gate, detail}
requested_at datetime When it was requested
remind_at datetime or null When approvers are reminded
escalate_at datetime or null When it escalates
expires_at datetime or null When it expires
channels string[] Where it was sent, e.g. slack, in_app
state string waiting, approved, changes_requested, reassigned, not_a_bug or expired
decisions object[] {actor: {id, name}, decision, channel, comment, at, plan_version}
decided_at datetime or null When it was decided
can_decide boolean Whether you may decide it now

List approval requests#

GET/api/v1/orgs/{org_id}/approvals

Approval requests, newest first. Use tab for the inbox tabs, or state and mine directly.

Auth: session only. Secret keys get 403 api_key_not_allowed. The role needs issues.view.

Path parameters

Parameter Type Required Description
org_id uuid required Organization id

Query parameters

Parameter Type Required Description
tab string optional mine (waiting for you), others (waiting for someone else) or decided. Overrides state and mine.
state string optional waiting or decided
mine boolean optional true: you may still decide (you haven't approved yet); false: the rest
issue_id uuid optional Only this issue
run_id uuid optional Only this workflow run
severity string optional P0 to P4. Repeat for several: ?severity=P0&severity=P1
project_id uuid optional Only this project
q string optional Search the issue title or plan summary, up to 200 characters
limit integer optional 1 to 200, default 50
cursor string optional next_cursor from the previous page

Response

A page of approval request objects.

Shell
curl "https://app.getmendloop.com/api/v1/orgs/ORG_ID/approvals?tab=mine" \
  --cookie "ml_session=…"
Response 200JSON
{
  "items": [
    {
      "id": "0193c5a1-9b0c-7d1e-af23-4b5c6d7e8f90",
      "run_id": "0193c5a0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
      "step_id": "approve",
      "issue": {
        "id": "0193b7e2-0a4c-7f19-b8d2-51c3e9a7f604",
        "title": "TypeError: Cannot read properties of undefined (reading 'id')",
        "severity": "P2",
        "platform": "javascript",
        "release": "web@1.8.3",
        "project_id": "0193a2c4-61b0-7d3e-9a15-7c2e4f8b1d02",
        "short_id": "RIDER-12"
      },
      "plan": {
        "summary": "Guard against a missing product in CartItem.",
        "root_cause": "CartItem reads item.product.id before the product has loaded.",
        "confidence": "high",
        "files": [
          {
            "path": "src/cart.tsx",
            "additions": 4,
            "deletions": 1
          }
        ],
        "risk": "low",
        "regression_test": "Render CartItem with product undefined"
      },
      "plan_version": 1,
      "approvers": [
        {
          "kind": "user",
          "id": "0193a2c4-5e20-7c11-a3f0-6b9d2e4c8a15",
          "name": "Priya Shah",
          "escalated": false
        }
      ],
      "min_approvals": 1,
      "approvals_so_far": 0,
      "policy_note": "Code owners of src/cart.tsx approve; 1 approval needed.",
      "flags": [],
      "requested_at": "2026-11-05T09:16:20Z",
      "remind_at": "2026-11-05T13:16:20Z",
      "escalate_at": "2026-11-06T09:16:20Z",
      "expires_at": "2026-11-12T09:16:20Z",
      "channels": [
        "slack",
        "in_app"
      ],
      "state": "waiting",
      "decisions": [],
      "decided_at": null,
      "can_decide": true
    }
  ],
  "next_cursor": null
}

Count approval requests#

GET/api/v1/orgs/{org_id}/approvals/counts

The inbox tab counts, with the same filters as the list.

Auth: session only. Secret keys get 403 api_key_not_allowed. The role needs issues.view.

Path parameters

Parameter Type Required Description
org_id uuid required Organization id

Query parameters

Parameter Type Required Description
issue_id uuid optional Only this issue
run_id uuid optional Only this workflow run
severity string optional P0 to P4. Repeat for several: ?severity=P0&severity=P1
project_id uuid optional Only this project
q string optional Search the issue title or plan summary, up to 200 characters

Response

Field Type Description
mine integer Waiting for you: you may decide and haven't approved yet
others integer Waiting on someone else, including ones you approved that need a second approver
decided integer Decided
Shell
curl "https://app.getmendloop.com/api/v1/orgs/ORG_ID/approvals/counts" \
  --cookie "ml_session=…"
Response 200JSON
{
  "mine": 2,
  "others": 5,
  "decided": 41
}

Get an approval request#

GET/api/v1/orgs/{org_id}/approvals/{request_id}

One approval request with its plan and decisions.

Auth: session only. Secret keys get 403 api_key_not_allowed. The role needs issues.view.

Path parameters

Parameter Type Required Description
org_id uuid required Organization id
request_id uuid required Approval request id

Response

The approval request object.

Errors

Status Code When
404 approval_not_found No such request in this mode, or its issue is in a project you can't see
Shell
curl "https://app.getmendloop.com/api/v1/orgs/ORG_ID/approvals/APPROVAL_ID" \
  --cookie "ml_session=…"
Response 200JSON
{
  "id": "0193c5a1-9b0c-7d1e-af23-4b5c6d7e8f90",
  "run_id": "0193c5a0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
  "step_id": "approve",
  "issue": {
    "id": "0193b7e2-0a4c-7f19-b8d2-51c3e9a7f604",
    "title": "TypeError: Cannot read properties of undefined (reading 'id')",
    "severity": "P2",
    "platform": "javascript",
    "release": "web@1.8.3",
    "project_id": "0193a2c4-61b0-7d3e-9a15-7c2e4f8b1d02",
    "short_id": "RIDER-12"
  },
  "plan": {
    "summary": "Guard against a missing product in CartItem.",
    "root_cause": "CartItem reads item.product.id before the product has loaded.",
    "confidence": "high",
    "files": [
      {
        "path": "src/cart.tsx",
        "additions": 4,
        "deletions": 1
      }
    ],
    "risk": "low",
    "regression_test": "Render CartItem with product undefined"
  },
  "plan_version": 1,
  "approvers": [
    {
      "kind": "user",
      "id": "0193a2c4-5e20-7c11-a3f0-6b9d2e4c8a15",
      "name": "Priya Shah",
      "escalated": false
    }
  ],
  "min_approvals": 1,
  "approvals_so_far": 0,
  "policy_note": "Code owners of src/cart.tsx approve; 1 approval needed.",
  "flags": [],
  "requested_at": "2026-11-05T09:16:20Z",
  "remind_at": "2026-11-05T13:16:20Z",
  "escalate_at": "2026-11-06T09:16:20Z",
  "expires_at": "2026-11-12T09:16:20Z",
  "channels": [
    "slack",
    "in_app"
  ],
  "state": "waiting",
  "decisions": [],
  "decided_at": null,
  "can_decide": true
}

Decide an approval request#

POST/api/v1/orgs/{org_id}/approvals/{request_id}/decide

Approves, requests changes, reassigns, or marks the issue as not a bug. The decision is recorded with channel web and audit logged; the waiting workflow run continues once the request resolves. Requests that need two approvals stay waiting after the first.

Auth: session only. Secret keys get 403 api_key_not_allowed. The role needs fixes.approve.

Note:

You must be one of the request's approvers, and your role must allow fixes.approve. Developers may approve only for code they own; Admins may approve any.

Path parameters

Parameter Type Required Description
org_id uuid required Organization id
request_id uuid required Approval request id

Body (JSON)

Parameter Type Required Description
decision string required approve, request_changes, reassign or not_a_bug
comment string optional Up to 4,000 characters
reassign_to string optional user:<id>, team:<id or slug>, or a user id
ignore_rule object optional Only with not_a_bug: how to ignore the issue, {mode, value} as in Ignore an issue. Default mode forever.

Response

The updated approval request object.

Errors

Status Code When
404 approval_not_found No such request
403 not_an_approver You aren't one of its approvers
403 permission_denied Your role can't approve fixes
409 approval_decided It was already decided
409 approval_expired It expired
409 already_approved You already approved it
422 invalid_input ignore_rule sent with a decision other than not_a_bug
Shell
curl -X POST "https://app.getmendloop.com/api/v1/orgs/ORG_ID/approvals/APPROVAL_ID/decide" \
  --cookie "ml_session=…" \
  -H "Content-Type: application/json" \
  -d '{
    "decision": "approve",
    "comment": "Looks right."
  }'
Response 200JSON
{
  "id": "0193c5a1-9b0c-7d1e-af23-4b5c6d7e8f90",
  "run_id": "0193c5a0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
  "step_id": "approve",
  "issue": {
    "id": "0193b7e2-0a4c-7f19-b8d2-51c3e9a7f604",
    "title": "TypeError: Cannot read properties of undefined (reading 'id')",
    "severity": "P2",
    "platform": "javascript",
    "release": "web@1.8.3",
    "project_id": "0193a2c4-61b0-7d3e-9a15-7c2e4f8b1d02",
    "short_id": "RIDER-12"
  },
  "plan": {
    "summary": "Guard against a missing product in CartItem.",
    "root_cause": "CartItem reads item.product.id before the product has loaded.",
    "confidence": "high",
    "files": [
      {
        "path": "src/cart.tsx",
        "additions": 4,
        "deletions": 1
      }
    ],
    "risk": "low",
    "regression_test": "Render CartItem with product undefined"
  },
  "plan_version": 1,
  "approvers": [
    {
      "kind": "user",
      "id": "0193a2c4-5e20-7c11-a3f0-6b9d2e4c8a15",
      "name": "Priya Shah",
      "escalated": false
    }
  ],
  "min_approvals": 1,
  "approvals_so_far": 1,
  "policy_note": "Code owners of src/cart.tsx approve; 1 approval needed.",
  "flags": [],
  "requested_at": "2026-11-05T09:16:20Z",
  "remind_at": "2026-11-05T13:16:20Z",
  "escalate_at": "2026-11-06T09:16:20Z",
  "expires_at": "2026-11-12T09:16:20Z",
  "channels": [
    "slack",
    "in_app"
  ],
  "state": "approved",
  "decisions": [
    {
      "actor": {
        "id": "0193a2c4-5e20-7c11-a3f0-6b9d2e4c8a15",
        "name": "Priya Shah"
      },
      "decision": "approve",
      "channel": "web",
      "comment": "Looks right.",
      "at": "2026-11-05T09:40:02Z",
      "plan_version": 1
    }
  ],
  "decided_at": "2026-11-05T09:40:02Z",
  "can_decide": false
}