post_orgs_by_id_approve

Changes data · you confirm first

Calls POST /api/orgs/{id}/approve as the signed-in person · REST reference

Approve an organization

Platform staff only (there is no dedicated org-approve command permission). Sets status to 'APPROVED' and saves. There is no per-organization check, so a platform operator can approve an org they do not belong to. 'APPROVED' is a ROUTE-LAYER status: the DAL's OrgStatus enum is ACTIVE | INACTIVE | SUSPENDED, so an approved org is not counted by activeCount on /api/orgs/summary and is not returned by GET /api/orgs?status=ACTIVE. The request body is read by nothing — send it empty.

Arguments

ArgumentTypeDescription
idpathstring (uuid)required

Example call

A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "post_orgs_by_id_approve",
    "arguments": {
      "id": "11111111-1111-4111-8111-111111111111"
    }
  }
}
Confirmation
The client shows the person the exact request and waits. Nothing runs until they tick Make this change. See Reading and changing.

Result

On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.

The organization after the status change, as the DAL answered the write — epoch millisecond timestamps, createdAt included, as on PATCH /api/orgs/{id}.

json
{
  "id": "11111111-1111-4111-8111-111111111111",
  "name": "string",
  "status": "APPROVED",
  "createdAt": 1
}

Fields

FieldTypeDescription
createdAtintegerEpoch milliseconds, straight off the DAL entity.
idstring (uuid)
namestring
status"APPROVED"

When it fails

A failed call returns isError: true with the API's message as text. A change the person declines, or lets time out, also comes back this way and nothing changes.

403

Authenticated, but the caller holds none of the required permissions.

404

No such resource — or none this caller may see.

What the model is shown

This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.

json
{
  "name": "post_orgs_by_id_approve",
  "description": "POST /api/orgs/{id}/approve — Platform staff only (there is no dedicated org-approve command permission). Sets `status` to 'APPROVED' and saves. There is no per-organization check, so a platform operator can approve an org they do not belong to. 'APPROVED' is a ROUTE-LAYER status: the DAL's `OrgStatus` enum is ACTIVE | INACTIVE | SUSPENDED, so an approved org is not counted by `activeCount` on `/api/orgs/summary` and is not returned by `GET /api/orgs?status=ACTIVE`. The request body is read by nothing — send it empty.\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      }
    },
    "required": [
      "id"
    ]
  },
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": false
  }
}