SetCustomerTeamAccessRequest
| Field | Type | Description |
|---|---|---|
customer_id | string | Customer or prospect the team gets access to. |
team_id | string | Team from ListTeams. |
level | string | The team's access level after the call. |
Required scope: customer_access:write
Gives a team exactly one access level on a customer or prospect: read_only,
read_write or full_access. The team’s members then find it in their
customer and prospect lists. What they can do there, such as claiming a
prospect, still comes from their roles and flows.
The call creates the team’s access, or raises or lowers it to the level you
send. Sending the level the team already has changes nothing and returns
changed: false, so it is safe to repeat. Access given to members, roles or a
team together with a role is not touched; use
Remove Customer Team Access
to take the team off again.
The API key needs read_write access to the customer and never sets or changes
a team’s access above its own level, so full_access needs full access.
Get team IDs from List Teams (scope
team:read), so give the key both scopes.
| Error | When |
|---|---|
invalid_argument | Unknown level, or the team is an external partner (partners never reach customers) |
permission_denied | The key cannot manage this customer, or the level or the team’s current access is above the key’s own |
not_found | The customer or team is not in the key’s workspace |
POST /public-api/publicapi.v1.Customer/SetCustomerTeamAccess Gives a team exactly the given access level on one customer or prospect, so its members find it and can work on it with the flows their roles allow. Creates the team's grant, or raises or lowers it to the level; repeating the same level changes nothing (changed false). Grants for members or roles are left alone. Requires read_write access to the customer; a key never sets a level above its own, nor changes a team whose current access is above its own. External partner teams cannot get customer access. Idempotent.
| Field | Type | Description |
|---|---|---|
customer_id | string | Customer or prospect the team gets access to. |
team_id | string | Team from ListTeams. |
level | string | The team's access level after the call. |
| Field | Type | Description |
|---|---|---|
access | CustomerTeamAccess | The team's access after the request. |
changed | bool | False when the team already had exactly this level. |
{ "customerId": "be85f4d1-b680-4964-bf62-9828fdf4ce04", "teamId": "3f1c2b7e-8a44-4d1b-9c55-1e2f3a4b5c6d", "level": "read_write"}{ "access": { "customerId": "be85f4d1-b680-4964-bf62-9828fdf4ce04", "teamId": "3f1c2b7e-8a44-4d1b-9c55-1e2f3a4b5c6d", "level": "read_write" }, "changed": true}