Mutations
addLabels
Add one or more labels to a thread. Labels that are already present on the thread are silently skipped. Archived label types are rejected with error code cannot_add_label_using_archived_label_type. Requires the label:create permission.
MUTATION
addLabels(input: AddLabelsInput!): AddLabelsOutput!Arguments
input
required
Returns
labels
[Label!]!
thread
error
Mutation
mutation AddLabels($input: AddLabelsInput!) {
addLabels(input: $input) {
labels {
id
labelType {
id
name
icon
color
type
description
}
createdAt {
unixTimestamp
iso8601
}
createdBy {
__typename
... on UserActor {
__typename
}
}
updatedAt {
unixTimestamp
iso8601
}
updatedBy {
__typename
... on UserActor {
__typename
}
}
}
thread {
id
ref
customer {
id
externalId
fullName
shortName
email {
__typename
}
avatarUrl
}
title
description
previewText
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"labelTypeIds": [
"id"
],
"threadId": "id"
}
}Response
{
"data": {
"addLabels": {
"labels": [
{
"id": "id",
"labelType": {
"id": "id",
"name": "string",
"icon": "string",
"color": "string",
"type": "DEFAULT",
"description": "string"
},
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"createdBy": {
"__typename": "UserActor"
},
"updatedAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"updatedBy": {
"__typename": "UserActor"
}
}
],
"thread": {
"id": "id",
"ref": "string",
"customer": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"__typename": "EmailAddress"
},
"avatarUrl": "string"
},
"title": "string",
"description": "string",
"previewText": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?
⌘I
Mutation
mutation AddLabels($input: AddLabelsInput!) {
addLabels(input: $input) {
labels {
id
labelType {
id
name
icon
color
type
description
}
createdAt {
unixTimestamp
iso8601
}
createdBy {
__typename
... on UserActor {
__typename
}
}
updatedAt {
unixTimestamp
iso8601
}
updatedBy {
__typename
... on UserActor {
__typename
}
}
}
thread {
id
ref
customer {
id
externalId
fullName
shortName
email {
__typename
}
avatarUrl
}
title
description
previewText
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"labelTypeIds": [
"id"
],
"threadId": "id"
}
}Response
{
"data": {
"addLabels": {
"labels": [
{
"id": "id",
"labelType": {
"id": "id",
"name": "string",
"icon": "string",
"color": "string",
"type": "DEFAULT",
"description": "string"
},
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"createdBy": {
"__typename": "UserActor"
},
"updatedAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"updatedBy": {
"__typename": "UserActor"
}
}
],
"thread": {
"id": "id",
"ref": "string",
"customer": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"__typename": "EmailAddress"
},
"avatarUrl": "string"
},
"title": "string",
"description": "string",
"previewText": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}
