post_org_admin_groups_by_groupid_members

Changes data · you confirm first

Calls POST /api/org-admin/groups/{groupId}/members as the signed-in person · REST reference

Put a person in a group — an existing account by email, or a new account

With the caller's own token, against the GROUP's organization. { email } names an EXISTING account, and is refused (403) before any lookup to a caller who does not hold admin.groups.members.add in the organization. If they have already joined the organization they are added ACTIVE (admin.groups.members.add); if not, they are INVITED to the organization and the group — an invited membership confers nothing until the invitee accepts it — and are emailed that they were invited (no token: a link to sign in and answer). { newUser } creates the account INTO the organization (admin.users.create), then adds it to the group ACTIVE. Either way the DAL refuses (403) putting anyone in a group whose roles grant something the caller does not hold in the organization. An organization's OWNER group takes no member (409).

Arguments

ArgumentTypeDescription
groupIdpathstring (uuid)required
bodyJSONobjectrequiredThe request body, as a JSON object. Its fields are listed below.

Fields of body

A free-form JSON object.

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_org_admin_groups_by_groupid_members",
    "arguments": {
      "groupId": "11111111-1111-4111-8111-111111111111",
      "body": {
        "email": "name@example.org"
      }
    }
  }
}
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 201) the tool returns one text item holding the API's JSON, pretty-printed.

The person is in the group — ACTIVE, or INVITED pending their acceptance.

json
{
  "data": {
    "created": true,
    "status": "ACTIVE",
    "userId": "11111111-1111-4111-8111-111111111111",
    "invitationEmailed": true
  },
  "success": true
}

Fields

FieldTypeDescription
dataobject
data.createdbooleanTrue when a new account was created.
data.invitationEmailedbooleanOn an invitation only — whether the invitee was emailed. False when the email could not be sent; the invitation stands either way and the invitee sees it in the portal.
data.status"ACTIVE" | "INVITED"
data.userIdstring (uuid)
successtrue

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.

400

The request was malformed or failed a guard.

403

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

404

No such group, or (for email) no account uses that email — create a new member instead.

409

The OWNER group, or (for newUser) an account already uses that email — add them by email.

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_org_admin_groups_by_groupid_members",
  "description": "POST /api/org-admin/groups/{groupId}/members — With the caller's own token, against the GROUP's organization. `{ email }` names an EXISTING account, and is refused (403) before any lookup to a caller who does not hold `admin.groups.members.add` in the organization. If they have already joined the organization they are added ACTIVE (`admin.groups.members.add`); if not, they are INVITED to the organization and the group — an invited membership confers nothing until the invitee accepts it — and are emailed that they were invited (no token: a link to sign in and answer). `{ newUser }` creates the account INTO the organization (`admin.users.create`), then adds it to the group ACTIVE. Either way the DAL refuses (403) putting anyone in a group whose roles grant something the caller does not hold in the organization. An organization's OWNER group takes no member (409).\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "groupId": {
        "type": "string"
      },
      "body": {
        "type": "string",
        "description": "The JSON request body: { email*: string } or { newUser*: { email*: string; firstName*: string; lastName*: string } }"
      }
    },
    "required": [
      "groupId",
      "body"
    ]
  },
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": false
  }
}