Mutation
mutation CreateDiscussion($input: CreateDiscussionInput!) {
createDiscussion(input: $input) {
discussion {
id
threadId
thread {
id
ref
customer {
__typename
}
title
description
previewText
}
title
messages {
edges {
__typename
}
pageInfo {
__typename
}
}
status
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"markdownContent": "string",
"type": "EMAIL"
}
}Response
{
"data": {
"createDiscussion": {
"discussion": {
"id": "id",
"threadId": "id",
"thread": {
"id": "id",
"ref": "string",
"customer": {
"__typename": "Customer"
},
"title": "string",
"description": "string",
"previewText": "string"
},
"title": "string",
"messages": {
"edges": [
{
"__typename": "ThreadDiscussionMessageEdge"
}
],
"pageInfo": {
"__typename": "PageInfo"
}
},
"status": "OPEN"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
createDiscussion
Create a new discussion. Supersedes createThreadDiscussion and additionally supports Sidekick AGENT_SESSION discussions (which can be started without a thread). For Slack, Email, and Cursor discussion types, a threadId is required. For AGENT_SESSION discussions, threadId is optional and the discussion may be associated with a source entity (company, tenant, etc.) or page instead.
MUTATION
createDiscussion(input: CreateDiscussionInput!): CreateDiscussionOutput!Arguments
input
required
Returns
discussion
error
Mutation
mutation CreateDiscussion($input: CreateDiscussionInput!) {
createDiscussion(input: $input) {
discussion {
id
threadId
thread {
id
ref
customer {
__typename
}
title
description
previewText
}
title
messages {
edges {
__typename
}
pageInfo {
__typename
}
}
status
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"markdownContent": "string",
"type": "EMAIL"
}
}Response
{
"data": {
"createDiscussion": {
"discussion": {
"id": "id",
"threadId": "id",
"thread": {
"id": "id",
"ref": "string",
"customer": {
"__typename": "Customer"
},
"title": "string",
"description": "string",
"previewText": "string"
},
"title": "string",
"messages": {
"edges": [
{
"__typename": "ThreadDiscussionMessageEdge"
}
],
"pageInfo": {
"__typename": "PageInfo"
}
},
"status": "OPEN"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

