latestSwagger 2.02026-08-109450223.9 KB

94acb422c07d

Users

Create a Membership

This endpoint allows you to invite a user to join your organization or account. A user will often be a person you wish to grant access to, but it could also represent a team, an automated system, or any other type of actor.

If an organization ID is provided, the user will be invited to that organization. If not, they will be invited to the account associated with this API credential. Note that while the sample return value includes both an organization and an account for completeness, in practice, only one or the other will be included.

Note that this is technically creating a Membership Invitation - the actual membership won't be created until the user accepts the invitation.

post/v1/memberships

Request body

emailstring required

The email address of the user you are inviting.

first_namestring required

The first name of the user you are inviting.

last_namestring required

The last name of the user you are inviting.

permissions'Admin' | 'Security Engineer' | 'User' | 'Read-only' | 'Finance' | 'Marketing' | 'Provisioner' required

The specific permissions this membership will grant to the user.

organization_idinteger

Include this parameter to invite a user to an organization instead of your account.

Example request

{
  "email": "accounting@example.com",
  "first_name": "Accounting",
  "last_name": "Department",
  "permissions": "Read-only",
  "organization_id": 123456
}

Response

Create a Membership

Example response

{
  "member_invitation": {
    "permissions": "Read-only",
    "account": {
      "id": 1234,
      "name": "Exemplary Accounting, LLC"
    },
    "organization": {
      "id": 5678,
      "name": "Organic Zations"
    },
    "user": {
      "email": "little_bobby@example.com",
      "name": "Robert Tables"
    }
  }
}