Team
Add or invite a member
If the email already belongs to a whatsappx.si account, that person is added immediately and the response is a member. Otherwise a pending invite is created (valid for 7 days) and emailed when email is configured; the response then includes invite_url. Only owners can add admins.
- Console only: owner or admin
- Workspace:
X-Tenant-ID
Headers
CookiestringrequiredThe
whatsappx_sessioncookie the app sets when you sign in. Browsers send it automatically; API keys are not accepted on this endpoint.X-Tenant-IDuuidrequiredWorkspace id. Required for session requests. You can pass
?tenant=<id>instead.
Body
application/jsonemailstringrequiredEmail address of the person to add.
roleenumrequiredadminoragent.
Response
201 Createdapplication/json
iduuidInvite id.
emailstringInvited email address (lower case).
roleenumadminoragent.statusstringInvite status,
pendingwhile it can be accepted.expires_atintegerExpiry in Unix seconds (7 days after it was sent).
invite_urlstringmay be absentLink the invitee opens to join. Returned when an invite is created or resent.
email_sentbooleanWhether the invite email was sent.
createdbooleantruefor an invite (as opposed to a member added immediately).
Status codes
- 201Created. Either a member (existing account, added now) or an invite (
created: true). - 400Bad request.
enter a valid email address,role must be admin or agent,user is already a member,an invite is already pending for this emailorinvalid request. - 401Unauthorized. No signed-in session (
unauthorized). - 403Forbidden. API keys can never call this endpoint (
API keys cannot administer workspaces). A signed-in user who is not an owner or admin getsadmin required; a user who is not a member of the workspace getsforbidden. Admins who try to add an admin getonly owners can add admins.
When the person already has an account, the 201 body is a member object instead: id, user_id, email, name, role.