What it does
Invite an email address to a site, public or private. On a public site everyone else stays a visitor; the member signs in to get their role. role is view (default: sees the site), edit (also runs member actions and commands), build (their own agent may also change the draft and the site's tables) or publish (and publish). agents true lets their own agent work on the site within that role; it defaults to false. Pagehive emails a link that works once for 7 days; the link is never returned to you. Inviting the same address again sends a new link and voids the old one, and changes the role when you send one. The account must be claimed and have can_invite_members. Limits: max_members_per_site and max_member_invites_per_day (in get_account).
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
site_idrequired | string | The id of the site. list_sites gives the ids of your sites. |
emailrequired | string | The address to invite. Pagehive emails a link that works once, for 7 days. |
role | one of: view, edit, build, publish | view (default) sees the site; edit also runs member actions and commands; build lets their agent change the draft and tables; publish also lets it publish. |
agents | boolean | true lets the member's own agent work on the site within that role. Default false. |
idempotency_key | string | Any unique string (1-200 printable ASCII). A retry with the same key and arguments returns the first call's result instead of running again. Same as the Idempotency-Key header. |
Example
Call invite_member with these arguments:
{
"site_id": "01a1…",
"email": "sam@example.com",
"role": "edit"
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Site members and rolesInvite people by email and decide what they may do.
- Open a site with a PINLet family or a group in without accounts.