Embedded API - Customer managers

Use the following endpoints to programmatically manage customer managers.

Rate limits

Customer manager resources have the following rate limit:

TypeResourceLimit
AllAll Customer managers endpoints60 requests per minute

Quick reference

TypeResourceDescription
GET/api/customer_managersList all customer managers.
PUT/api/customer_managers/:idUpdate a customer manager.
POST/api/customer_managersCreate a new customer manager.
DELETE/api/customer_managers/:idDelete a customer manager.

List customer managers

Returns a list of all customer managers in an Embedded partner's account.

For customer managers with access to all workspaces in the Embedded partner's account, moderated_workspaces is an empty array ([]).

bash
GET https://YOUR_DATA_CENTER/api/customer_managers

Sample request

shell
curl  -X GET 'https://YOUR_DATA_CENTER/api/customer_managers' \
      -H 'Authorization: Bearer <api_token>'

Response

json
{
    "result": {
        "items": [
            {
                "id": 1234,
                "user": {
                    "id": 4321,
                    "name": "ACME-HR",
                    "email": "[email protected]",
                    "avatar_url": "https://example.com"
                },
                "privilege_group": {
                    "id": 247,
                    "name": "Customer Admin",
                    "system": false
                },
                "moderated_workspaces": [
                    {
                        "id": 27123,
                        "name": "Nutech"
                    },
                    {
                        "id": 29456,
                        "name": "ACME USA"
                    }
                ],
                "project_role": {
                    "id": "pr-AQRtExgY-cEGWTN",
                    "name": "Builder"
                }
            },
            {
                "id": 5678,
                "user": {
                    "id": 8765,
                    "name": "ACME Corp.",
                    "email": "[email protected]",
                    "avatar_url": "https://example.com"
                },
                "privilege_group": {
                    "id": 2,
                    "name": "Admin",
                    "system": true
                },
                "moderated_workspaces": [],
                "project_role": {
                    "id": "pr-AQRtExgY-cEGWTN",
                    "name": "Builder"
                }
            }
        ]
    }
}

Update a customer manager

Update a customer manager's role in an Embedded partner's account.

bash
PUT https://YOUR_DATA_CENTER/api/customer_managers/:id

URL parameters

NameTypeDescription
idstring
required
The ID of the customer manager whose role you plan to update.

Request body

NameTypeDescription
role_idstring
required
The legacy role to assign the customer manager.
project_role_idstring
optional
The project role to assign the customer manager.
permitted_workspace_idsarray of integers
optional
The list of workspace IDs where the customer manager should have the specified role, according to the role_id you provide.

If omitted or set to an empty array ([]), this parameter grants the customer manager the specified role in all workspaces in the Embedded partner's account.

Sample request

shell
curl  -X PUT 'https://YOUR_DATA_CENTER/api/customer_managers/:id' \
      -H 'Authorization: Bearer <api_token>'\
      -H 'Content-Type: application/json' \
      -d  '{
            "role_id": ":role_id",
            "permitted_workspace_ids": [:permitted_workspace_id_1, :permitted_workspace_id_2],
            "project_role_id": ":project_role_id"
           }'

Response

json
{
    "result": {
        "id": 1234,
        "user": {
            "id": 4321,
            "name": "Alex",
            "email": "[email protected]",
            "avatar_url": ""
        },
        "privilege_group": {
            "id": 2,
            "name": "Admin",
            "system": true
        },
        "moderated_workspaces": [
            {
                "id": 29456,
                "name": "ACME USA"
            },
            {
                "id": 27123,
                "name": "Nutech"
            }
        ],
        "project_role": {
            "id": "pr-AQRtExgY-cEGWTN",
            "name": "Builder"
        }
    }
}

Create a customer manager

Creates a new customer manager in an Embedded partner's account.

bash
POST https://YOUR_DATA_CENTER/api/customer_managers

Request body

NameTypeDescription
team_collaborator_idstring
required
The collaborator's ID.
role_idstring
required
The legacy role to assign the customer manager.
project_role_idstring
optional
The project role to assign the customer manager.
permitted_workspace_idsarray of integers
optional
The list of workspace IDs where the customer manager should have the specified role, according to the role_id you provide.

If omitted or set to an empty array ([]), this parameter grants the customer manager the specified role in all workspaces in the Embedded partner's account.

Sample request

shell
curl  -X POST 'https://YOUR_DATA_CENTER/api/customer_managers' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d  '{
            "team_collaborator_id": :team_collaborator_id_value,
            "role_id": :role_id_value,
            "permitted_workspace_ids": [:permitted_workspace_id_1],
            "project_role_id": ":project_role_id"
          }'

Response

json
{
    "result": {
        "id": 1234,
        "user": {
            "id": 4321,
            "name": "Alex",
            "email": "[email protected]",
            "avatar_url": ""
        },
        "privilege_group": {
            "id": 2,
            "name": "Admin",
            "system": true
        },
        "moderated_workspaces": [
            {
                "id": 29456,
                "name": "ACME USA"
            }
        ],
        "project_role": {
            "id": "pr-AQRtExgY-cEGWTN",
            "name": "Builder"
        }
    }
}

Delete a customer manager

Delete a customer manager from an Embedded partner's account.

bash
DELETE https://YOUR_DATA_CENTER/api/customer_managers/:id

URL parameters

NameTypeDescription
idstring
required
The ID of the customer manager.

Sample request

shell
curl  -X DELETE 'https://YOUR_DATA_CENTER/api/customer_managers/:id' \
      -H 'Authorization: Bearer <api_token>'

Response

json
{
    "result": "ok"
}

Last updated: