Create a membership

View as Markdown
Ensures an active membership for the given email will be provisioned. - If the user already exists, they will be added to the requestor's organization. - If it doesn't exist, a new user will be provisioned. `role_id` can be one of `'admin'`, `'superuser'`, `'user'` or `'restricteduser'` for the corresponding predefined role, or an ID of a [Role](/resources/roles/). This request requires "Manage Organization" permissions. API access to this endpoint is supported via OAuth only.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:)>.

OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
emailstringRequiredformat: "email"
role_idstringRequired>=1 character

Response

Successful response

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error