White Label Admin - Add user to an organization

White Label Admin - Add user to an organization

White label admin only API to add a user to an organization. If no user is provided, the current user is used.

POSThttps://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/members
Path parameters
organizationId*integer

Organization ID

innerOrganizationId*integer

Organization ID within the context of a white label

Body
usernameOrEmailstring

Username or email of the user to be added to the project or organization. If no user is provided, the user ID attached to the JWT will be used.

Example: "janjongboom"
role*OrganizationMemberRole (enum)
adminmemberguest
datasets*array of string

Only used for 'guest' users. Limits the datasets the user has access to.

Response

OK

Body
success*boolean

Whether the operation succeeded

errorstring

Optional error description (set if 'success' was false)

Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/members', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "role": "admin",
      "datasets": [
        "text"
      ]
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text"
}

Last updated