Roles

Roles are a core part of the User Segmentation feature. On this page, we'll dive into the different role endpoints you can use to manage them programmatically. We'll look into giving your users specific roles and thereby allowing them to view specific boards.


POST/v2/organization/roles

Add users to roles

This endpoint allows you to add users to roles. Those roles can then be used to control access to boards & changelogs.

Required attributes

  • Name
    emails
    Type
    string[]
    Description

    An array of emails to add to the role.

  • Name
    roles
    Type
    string[]
    Description

    The roles to give these users.

Request

POST
/v2/organization/roles
curl -X 'POST' 'https://do.featurebase.app/v2/organization/roles' \
  -H 'X-API-Key: {token}' \
  -H 'Content-Type: application/json' \
  -d '{
        "emails": [
            "yourcustomer@gmail.com",
            "yoursecondcustomer@gmail.com
        ],
        "roles": ["Employee", "Customer"]
      }'

Response

{
    "success": true
}

DELETE/v2/organization/roles

Remove users from roles by email

This endpoint allows you to remove roles from users.

Required attributes

  • Name
    emails
    Type
    string[]
    Description

    An array of emails to remove roles from.

Optional attributes

  • Name
    roles
    Type
    string[]
    Description

    An array of roles to remove from the users. If not provided, all roles will be removed.

Request

DELETE
/v2/organization/roles
curl -X 'DELETE' 'https://do.featurebase.app/v2/organization/roles' \
  -H 'X-API-Key: {token}' \
  -H 'Content-Type: application/json' \
  -d '{
        "emails": [
            "yourcustomer@gmail.com",
        ],
        "roles": ["Employee"]
      }'

Response

{
  "success": true
}