splitwise_add_user_to_group
Add a friend by user ID or invite a new person by name and email to an existing Splitwise group. Requires write access enabled.
Instructions
Add a person to a group, by user id or by inviting a name + email. 🔒 write.
Calls POST /add_user_to_group with group_id plus EITHER user_id OR all of
first_name, last_name, email (a oneOf, checked locally before any call; an
invited email may receive a Splitwise invitation). Splitwise answers HTTP 200 even on
failure; the client turns success: false / non-empty errors into an error, and the
person is reported as added only when the body says success: true and returns the user.
Refused with Error: … writes are disabled unless SPLITWISE_ALLOW_WRITES=1. Undo:
splitwise_remove_user_from_group with the returned user id.
When to Use:
To add a friend (user id) or a new person (name + email) to an existing group.
When NOT to Use:
To create a group with its members in one call (use
splitwise_create_group).To find a friend's user id by name (use
splitwise_resolve_friendfirst), or a group's id by name (usesplitwise_resolve_group).
Returns:
A confirmation with the user Splitwise returned (First Last (id N)) and its success value.
Examples:
params = {"group_id": 12345, "user_id": 5823}
params = {"group_id": 12345, "first_name": "Ana", "last_name": "Diaz", "email": "ana@example.com"}
Error Handling:
Both or neither identity → rejected before the call; success: false → Error: Splitwise rejected the request ...; 403 → you are not a member of the group.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |