# Customer workspace collaborators
This API enables you to manage collaborators in a customer workspace. To work with collaborators in an admin workspace, refer to the Developer API documentation for workspace collaborators.
# Quick reference
Type | Resource | Description |
---|---|---|
POST | /api/managed_users/:id/member_invitation | Invites a collaborator to a customer workspace. |
# Invite collaborator to managed customer workspace
Invites a collaborator to a managed customer workspace. An email invite is sent if the provided email isn’t associated with an existing collaborator. Invited collaborators can join the workspace after they create a Workato account.
POST /api/managed_users/:id/member_invitations
# URL parameters
Name | Type | Description |
---|---|---|
id | string required | Embedded customer ID/external ID. The External ID must be URL encoded and prefixed with an E (for example, EA2300 ). |
# Payload
Name | Type | Description |
---|---|---|
name | string required | The name of the collaborator. |
string required | The email of the collaborator. | |
role_name | string conditional | The role to assign the collaborator. Required if env_roles is not provided. |
env_roles | object conditional | The environment roles object. Required if role_name is not provided. |
env_roles[environment_type] | string conditional | The type of environment in the customer workspace where you plan to invite the collaborator. Required if role_name is not provided. |
env_roles[name] | string conditional | The role to assign the collaborator for the specific environment. Required if role_name is not provided. |
SPECIFY ROLES FOR DIFFERENT ENVIRONMENTS
You must provide either role_name
or env_roles
in the payload. role_name
only assigns a role in the dev
environment. Use env_roles
to specify the environment type and role for other environments.
Workato does not support a mixed approach to assigning roles. This means that when you combine the env_roles
and role_name
in the payload, Workato ignores the role_name
and only assigns the roles specified by the env_roles
object.
# Sample request
This example request creates an invitation for the dev
, test
, and prod
environments. It assigns the collaborator an Admin
role in the dev
environment, an Analyst
role in the test
environment, and an Operator
role in the prod
environment.
curl -X POST https://www.workato.com/api/managed_users/123/member_invitations \
-H 'Authorization: Bearer <api_token>' \
-d '{
"name": "John",
"email": "[email protected]",
"env_roles": [
{ "environment_type": "dev", "name": "Admin" },
{ "environment_type": "test", "name": "Analyst" },
{ "environment_type": "prod", "name": "Operator" }
]
}'
# Response
{
"result": "ok"
}
Last updated: 9/24/2024, 6:05:04 PM