Mutation
mutation UpsertRoleScopes($input: UpsertRoleScopesInput!) {
upsertRoleScopes(input: $input) {
role {
id
name
description
permissionsPreset
scopeDefinitions {
resource
scopes {
__typename
}
}
createdAt {
unixTimestamp
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customRoleId": "id",
"resource": "THREAD",
"scopes": [
{
"primitiveType": "LABEL",
"accessMode": "VIEW_ANY"
}
]
}
}Response
{
"data": {
"upsertRoleScopes": {
"role": {
"id": "id",
"name": "string",
"description": "string",
"permissionsPreset": "string",
"scopeDefinitions": [
{
"resource": "THREAD",
"scopes": [
{
"__typename": "RoleScope"
}
]
}
],
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
upsertRoleScopes
Sets the thread-visibility scopes for a custom role, replacing any previously configured scopes for the given resource. Each scope condition limits which threads users with this role can see, based on a primitive type (label, tier, channel, tenant, or company) and an access mode. Requires the roles:edit permission and the custom_roles billing entitlement.
MUTATION
upsertRoleScopes(input: UpsertRoleScopesInput!): UpsertRoleScopesOutput!Arguments
input
required
Returns
role
error
Mutation
mutation UpsertRoleScopes($input: UpsertRoleScopesInput!) {
upsertRoleScopes(input: $input) {
role {
id
name
description
permissionsPreset
scopeDefinitions {
resource
scopes {
__typename
}
}
createdAt {
unixTimestamp
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customRoleId": "id",
"resource": "THREAD",
"scopes": [
{
"primitiveType": "LABEL",
"accessMode": "VIEW_ANY"
}
]
}
}Response
{
"data": {
"upsertRoleScopes": {
"role": {
"id": "id",
"name": "string",
"description": "string",
"permissionsPreset": "string",
"scopeDefinitions": [
{
"resource": "THREAD",
"scopes": [
{
"__typename": "RoleScope"
}
]
}
],
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

