Mutation
mutation BulkUpsertThreadFields($input: BulkUpsertThreadFieldsInput!) {
bulkUpsertThreadFields(input: $input) {
results {
threadField {
id
threadId
key
type
isAiGenerated
stringValue
}
result
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"inputs": [
{
"identifier": {
"threadId": "id",
"key": "string"
},
"type": "STRING"
}
]
}
}Response
{
"data": {
"bulkUpsertThreadFields": {
"results": [
{
"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
bulkUpsertThreadFields
Upserts up to 25 thread field values in a single call — useful when setting multiple fields on one or more threads at once. Each entry is independently created or updated; a validation error on the batch as a whole is returned if any entry is invalid. Requires the threadField:create and threadField:update permissions.
MUTATION
bulkUpsertThreadFields(input: BulkUpsertThreadFieldsInput!): BulkUpsertThreadFieldsOutput!Arguments
input
required
Returns
results
error
Mutation
mutation BulkUpsertThreadFields($input: BulkUpsertThreadFieldsInput!) {
bulkUpsertThreadFields(input: $input) {
results {
threadField {
id
threadId
key
type
isAiGenerated
stringValue
}
result
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"inputs": [
{
"identifier": {
"threadId": "id",
"key": "string"
},
"type": "STRING"
}
]
}
}Response
{
"data": {
"bulkUpsertThreadFields": {
"results": [
{
"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?

