pagehive

invite_member

Invite an email address to a site, public or private.

MembersChanges dataAll plans

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

NameTypeAbout
site_idrequiredstringThe id of the site. list_sites gives the ids of your sites.
emailrequiredstringThe address to invite. Pagehive emails a link that works once, for 7 days.
roleone of: view, edit, build, publishview (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.
agentsbooleantrue lets the member's own agent work on the site within that role. Default false.
idempotency_keystringAny 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