Mutation
mutation UpsertThreadField($input: UpsertThreadFieldInput!) {
upsertThreadField(input: $input) {
threadField {
id
threadId
key
type
isAiGenerated
stringValue
}
result
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"identifier": {
"threadId": "id",
"key": "string"
},
"type": "STRING"
}
}Response
{
"data": {
"upsertThreadField": {
"threadField": {
"id": "id",
"threadId": "id",
"key": "string",
"type": "STRING",
"isAiGenerated": true,
"stringValue": "string"
},
"result": "UPDATED",
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
upsertThreadField
Sets (or updates) a single thread field value on a thread, identified by thread ID and field key. Creates the field if it does not exist, or overwrites the existing value if it does. Requires the threadField:create and threadField:update permissions.
MUTATION
upsertThreadField(input: UpsertThreadFieldInput!): UpsertThreadFieldOutput!Arguments
input
required
Returns
threadField
result
error
Mutation
mutation UpsertThreadField($input: UpsertThreadFieldInput!) {
upsertThreadField(input: $input) {
threadField {
id
threadId
key
type
isAiGenerated
stringValue
}
result
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"identifier": {
"threadId": "id",
"key": "string"
},
"type": "STRING"
}
}Response
{
"data": {
"upsertThreadField": {
"threadField": {
"id": "id",
"threadId": "id",
"key": "string",
"type": "STRING",
"isAiGenerated": true,
"stringValue": "string"
},
"result": "UPDATED",
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

