Add a member to a workspace
POST/api/v1/workspaces/:workspace_id/members
Adds a new member to the workspace. If the email belongs to an existing user, they are added to the workspace and notified via email. If the email is new, a new user account is created and an invitation email is sent.
Requires the write scope.
Request
Responses
- 201
- 400
- 401
- 403
- 422
Returns the newly added member. If the email belongs to an existing user they are added to the workspace directly; otherwise a new user account is created and an invitation email is sent.
The request body is empty or does not carry the member root key.
The request did not include a valid OAuth 2.0 access token.
The access token's OAuth application is not linked to this workspace, or no such workspace exists.
The member payload failed validation, or the address belongs to a deactivated account. The response body's error field is unprocessable_entity. details.email carries the full list of messages whatever the field at fault, and any field named by a validation is also listed under its own key (for example role).