post_auth_approve
Calls POST /api/auth/approve as the signed-in person · REST reference
Approve a pending organization signup by contact email
Convenience endpoint. The admin console drives /api/approvals/signups/{id}/approve instead, which takes the contact USER ID; this one resolves the user from the email first and then approves. Platform-staff only, gated by requirePlatformStaff (a permission-derived check, never a role name) - the same gate as the /api/approvals routes. The approving user id is taken from the caller's token, never from the body. Unlike the public OTP routes, this one is authenticated, so the 404 for an unknown address is not an enumeration concern.
Arguments
| Argument | Type | Description | |
|---|---|---|---|
bodyJSON | object | required | The request body, as a JSON object. Its fields are listed below. |
Fields of body
| Field | Type | Description | |
|---|---|---|---|
email | string (email) | required | Contact email of the pending signup. |
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.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "post_auth_approve",
"arguments": {
"body": {
"email": "name@example.org"
}
}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
Signup approved.
{
"message": "User approved successfully"
}Fields
| Field | Type | Description |
|---|---|---|
message | string |
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.
400The request was malformed or failed a guard.
403Either the caller is not platform staff, or the bearer is a DONOR token — a valid credential from the other realm, which the platform auth middleware refuses with 403 rather than 401 because re-authenticating would mint the same token.
404No 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.
{
"name": "post_auth_approve",
"description": "POST /api/auth/approve — Convenience endpoint. The admin console drives /api/approvals/signups/{id}/approve instead, which takes the contact USER ID; this one resolves the user from the email first and then approves. Platform-staff only, gated by requirePlatformStaff (a permission-derived check, never a role name) - the same gate as the /api/approvals routes. The approving user id is taken from the caller's token, never from the body. Unlike the public OTP routes, this one is authenticated, so the 404 for an unknown address is not an enumeration concern.\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
"inputSchema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "The JSON request body: { email*: string (Contact email of the pending signup.) }"
}
},
"required": [
"body"
]
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": false
}
}