Add or edit a member
upsert_memberAdd or edit a household member's name, phone, email, and role. Update contact details without removing and re-adding, which breaks their vote link.
Instructions
Add a household member, or edit one: name is the key (case-insensitive), or pass member_id from get_members to rename. Phone and email update when given; an empty string clears them. Use this when someone wants to add or fix a member's contact details; never remove and re-add, which breaks their vote link. Roles: member (default) can vote, rate and browse once they sign in; admin can also change settings, recipes and weeks like the owner.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| role | No | Only for members who have signed in to Agent Chef (has_account); admin needs an account | |
| No | An empty string clears it. | ||
| phone | No | E.164, e.g. +15551234567. An empty string clears it. | |
| member_id | No | Edit this member by id (from get_members); this is how you rename someone. Without it, name is the match key. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| name | Yes | ||
| role | No | owner = primary owner; admin = runs the household like the owner; member = votes, rates and browses | |
| No | |||
| phone | No | ||
| vote_link | No | Personal voting page for this member | |
| has_account | No | True once this member has signed in to Agent Chef with their own account | |
| push_subscribed | No | Has a device opted in to push notifications |