Post Mutations
Create Post
Create a new post in a board.
Mutation Structure
mutation CreatePost(
$title: String!
$comment: String!
$files: [String]
$properties: [PostPropertyInput]
) {
createPost(
title: $title
comment: $comment
files: $files
properties: $properties
) {
id
title
comments {
nodes {
id
text
}
}
properties {
id
parent
values
}
}
}
Input Fields
| Field | Type | Description |
|---|---|---|
title | String! | Title of the post |
comment | String! | First comment for the post |
files | [String] | Array of file IDs to attach |
properties | [PostPropertyInput] | Array of custom field values |
PostPropertyInput
| Field | Type | Description |
|---|---|---|
parent | String! | ID of the field (field node) |
values | [String]! | Values of the field (fieldValue node) |
Update Post
Update an existing post's properties.
Mutation Structure
mutation UpdatePost(
$id: String!
$title: String
$isLocked: Boolean
$isPinned: Boolean
) {
updatePost(
id: $id
title: $title
isLocked: $isLocked
isPinned: $isPinned
) {
node {
id
title
isLocked
isPinned
}
comment {
id
text
}
}
}
Input Fields
| Field | Type | Description |
|---|---|---|
id | String! | Post ID |
title | String | New title for the post |
isLocked | Boolean | Whether the post should be locked |
isPinned | Boolean | Whether the post should be pinned |
Delete Post
Delete an existing post.
Mutation Structure
mutation DeletePost($postId: String!) {
deletePost(postId: $postId) {
id
title
}
}
Input Fields
| Field | Type | Description |
|---|---|---|
postId | String! | ID of the post to delete |
Change Post Status
Change the status of a post.
Mutation Structure
mutation ChangePostStatus(
$postId: String!
$statusType: StatusType!
$statusId: String
) {
changePostStatus(
postId: $postId
statusType: $statusType
statusId: $statusId
) {
id
statusId
}
}
Input Fields
| Field | Type | Description |
|---|---|---|
postId | String! | Post ID |
statusType | StatusType! | Type of status to set |
statusId | String | ID of custom status (required if StatusType is CUSTOM) |
Change Post Moderation Status
Change the moderation status of a post.
Mutation Structure
mutation ChangePostModerationStatus(
$id: String!
$moderationStatus: PostModerationStatus!
$commentId: String
) {
changePostModerationStatus(
id: $id
moderationStatus: $moderationStatus
commentId: $commentId
) {
id
moderationStatus
moderatedBy
}
}
Input Fields
| Field | Type | Description |
|---|---|---|
id | String! | Post ID |
moderationStatus | PostModerationStatus! | New moderation status |
commentId | String | Optional comment ID related to moderation |
Merge Posts
Merge one post into another.
Mutation Structure
mutation MergePosts($sourceId: String!, $targetId: String!) {
mergePost(sourceId: $sourceId, targetId: $targetId) {
node {
id
title
}
comment {
id
text
}
}
}
Input Fields
| Field | Type | Description |
|---|---|---|
sourceId | String! | ID of the post to merge from |
targetId | String! | ID of the post to merge into |
Subscribe to Post
Subscribe or unsubscribe from a post.
Mutation Structure
mutation SubscribeToPost(
$postId: String!
$type: SubscribeToPostType!
) {
subscribeToPost(postId: $postId, type: $type)
}
Input Fields
| Field | Type | Description |
|---|---|---|
postId | String! | Post ID |
type | SubscribeToPostType! | SUBSCRIBE or CANCEL |
Vote on Post
Vote on a post.
Mutation Structure
mutation VotePost($postId: String!, $type: VoteType!) {
votePost(postId: $postId, type: $type) {
id
upvoteCount
downvoteCount
}
}
Input Fields
| Field | Type | Description |
|---|---|---|
postId | String! | Post ID |
type | VoteType! | UP, DOWN, or CANCEL |
Vote on Post on Behalf of User
Vote on a post on behalf of another user.
Mutation Structure
mutation VotePostOnBehalfUser(
$postId: String!
$type: VoteType!
$ssoId: String
$name: String
) {
votePostOnBehalfUser(
postId: $postId
type: $type
ssoId: $ssoId
name: $name
) {
id
upvoteCount
downvoteCount
}
}
Input Fields
| Field | Type | Description |
|---|---|---|
postId | String! | Post ID |
type | VoteType! | UP, DOWN, or CANCEL |
ssoId | String | SSO ID of the user to vote on behalf of |
name | String | Name of the user |
Assign User to Post
Assign a user to a post.
Mutation Structure
mutation AssignPost($postId: ID!, $ssoId: String!) {
assignPost(postId: $postId, ssoId: $ssoId) {
user {
ssoId
name
}
assignedBy {
id
name
}
}
}
Input Fields
| Field | Type | Description |
|---|---|---|
postId | ID! | ID of the post to assign the user to |
ssoId | String! | SSO ID of the user to assign |
Return Type
Returns an Assign object containing:
| Field | Type | Description |
|---|---|---|
user | User! | The user who was assigned |
assignedBy | User! | The user who made the assignment |
Unassign User from Post
Remove a user's assignment from a post.
Mutation Structure
mutation UnassignPost($postId: ID!, $ssoId: String!) {
unassignPost(postId: $postId, ssoId: $ssoId)
}
Input Fields
| Field | Type | Description |
|---|---|---|
postId | ID! | ID of the post to unassign the user from |
ssoId | String! | SSO ID of the user to unassign |
Return Type
Returns a boolean indicating success (true) or failure (false).
Authentication
All post mutations require authentication with write access. You must include your API key and SSO information in the HTTP headers:
{
"apikey": "YOUR_API_KEY",
"ssotype": "YOUR_SSO_TYPE",
"ssoid": "YOUR_SSO_ID"
}
Error Handling
The mutations may return errors in the following cases:
- Invalid API key
- Missing write access
- Missing SSO type in headers
- Missing SSO ID in headers
- Invalid Post ID
- Post not found
- Post belongs to a different board
- Invalid status type or missing required status ID
- Invalid moderation status
- Invalid vote type
- User not found
- Field not found (for custom properties)
Example error response:
{
"errors": [
{
"message": "Write access required",
"path": ["createPost"]
}
]
}