# Embedded API - Customer managers
Use the following endpoints to programmatically manage customer managers.
# Quick reference
Type | Resource | Description |
---|---|---|
GET | /api/customer_managers | List all customer managers. |
PUT | /api/customer_managers/:id | Update a customer manager. |
POST | /api/customer_managers | Create a new customer manager. |
DELETE | /api/customer_managers/:id | Delete 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 ([]
).
GET /api/customer_managers
# Sample request
curl -X GET 'https://www.workato.com/api/customer_managers' \
-H 'Authorization: Bearer <api_token>'
# Response
{
"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"
}
]
},
{
"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": []
}
]
}
}
# Update a customer manager
Update a customer manager's role in an Embedded partner's account.
PUT /api/customer_managers/:id
# URL parameters
Name | Type | Description |
---|---|---|
id | string required | The ID of the customer manager whose role you plan to update. |
# Request body
Name | Type | Description |
---|---|---|
role_id | string required | The role that you plan for the customer manager to have. |
permitted_workspace_ids | array of integers | 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
curl -X PUT 'https://www.workato.com/api/customer_managers/1234' \
-H 'Authorization: Bearer <api_token>'\
-H 'Content-Type: application/json' \
-d '{
"role_id": "2",
"permitted_workspace_ids": [29456,27123]
}'
# Response
{
"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"
}
]
}
}
# Create a customer manager
Creates a new customer manager in an Embedded partner's account.
POST /api/customer_managers
# Request body
Name | Type | Description |
---|---|---|
team_collaborator_id | string required | The collaborator's ID. |
role_id | string required | The role that you plan for the customer manager to have. |
permitted_workspace_ids | array of integers | 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
curl -X POST 'https://www.workato.com/api/customer_managers' \
-H 'Authorization: Bearer <api_token>' \
-H 'Content-Type: application/json' \
-d '{
"team_collaborator_id": 4321,
"role_id": 2,
"permitted_workspace_ids": [29456]
}'
# Response
{
"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"
}
]
}
}
# Delete a customer manager
Delete a customer manager from an Embedded partner's account.
DELETE /api/customer_managers/:id
# URL parameters
Name | Type | Description |
---|---|---|
id | string required | The ID of the customer manager. |
# Sample request
curl -X DELETE 'https://www.workato.com/api/customer_managers/1236' \
-H 'Authorization: Bearer <api_token>'
# Response
{
"result": "ok"
}
Last updated: 1/29/2024, 5:34:10 PM