Skip to main content

createPost

Description

Create a new post in a space.


Response

Returns a Post


Arguments

NameDescription
input - CreatePostInput!
spaceId - ID!

Mutation
mutation createPost(
$input: CreatePostInput!,
$spaceId: ID!
) {
createPost(
input: $input,
spaceId: $spaceId
) {
allowedEmojis
allowedReactions
attachmentIds
createdAt
createdById
description
embedIds
externalId
externalUrl
followersCount
forbiddenEmojis
forbiddenReactions
hasMoreContent
id
imageIds
isAnonymous
isHidden
language
lastActivityAt
locked
mentionedMembers
negativeReactions
negativeReactionsCount
networkId
ownerId
pinnedInto
positiveReactions
positiveReactionsCount
postTypeId
primaryReactionType
publishedAt
reactionsCount
relativeUrl
repliedToId
repliedToIds
repliesCount
shortContent
singleChoiceReactions
slug
spaceId
status
subscribersCount
tagIds
textContent
thumbnailId
title
topicIds
totalRepliesCount
updatedAt
url
}
}
Variables
{
"input": "CreatePostInput",
"spaceId": 4
}
Response
{
"data": {
"createPost": {
"allowedEmojis": [
"xyz789"
],
"allowedReactions": [
"abc123"
],
"attachmentIds": [
"4"
],
"attachments": [
"File"
],
"authMemberProps": "PostAuthMemberProps",
"contentSummary": "PostContentSummary",
"createdAt": "2007-12-03T10:15:30Z",
"createdBy": "SpaceMember",
"createdById": "4",
"customSeoDetail": "CustomSeoDetail",
"description": "abc123",
"embedIds": [
"xyz789"
],
"embeds": [
"Embed"
],
"externalId": 4,
"externalUrl": "abc123",
"fields": [
"CustomField"
],
"followersCount": 987,
"forbiddenEmojis": [
"xyz789"
],
"forbiddenReactions": [
"xyz789"
],
"hasMoreContent": false,
"id": "4",
"imageIds": [
4
],
"images": [
"Emoji"
],
"isAnonymous": true,
"isHidden": false,
"language": "xyz789",
"lastActivityAt": "2007-12-03T10:15:30Z",
"lastActivityDetail": "PostLastActivityDetail",
"locked": false,
"mappingFields": [
"PostMappingField"
],
"mentionedMembers": [
"xyz789"
],
"mentions": [
"Member"
],
"negativeReactions": [
"xyz789"
],
"negativeReactionsCount": 123,
"networkId": "4",
"owner": "SpaceMember",
"ownerId": 4,
"pinnedInto": [
"member"
],
"pinnedReplies": [
"Post"
],
"positiveReactions": [
"abc123"
],
"positiveReactionsCount": 123,
"postType": "PostType",
"postTypeId": "4",
"primaryReactionType": "EMOJI_BASE",
"publishedAt": "2007-12-03T10:15:30Z",
"reactions": [
"PostReactionDetail"
],
"reactionsCount": 987,
"relativeUrl": "abc123",
"repliedTo": "Post",
"repliedToId": 4,
"repliedToIds": [
"xyz789"
],
"repliedTos": [
"Post"
],
"replies": "PaginatedPost",
"repliesCount": 987,
"seoDetail": "PostSeoDetail",
"shortContent": "abc123",
"shortcuts": [
"Shortcut"
],
"singleChoiceReactions": [
"xyz789"
],
"slug": "abc123",
"space": "Space",
"spaceId": 4,
"status": "ARCHIVED",
"subscribersCount": 123,
"tagIds": [
"xyz789"
],
"tags": [
"Tag"
],
"textContent": "xyz789",
"thumbnail": "Emoji",
"thumbnailId": "xyz789",
"title": "abc123",
"topRepliers": [
"PostTopReplier"
],
"topicIds": [
"xyz789"
],
"totalRepliesCount": 123,
"updatedAt": "2007-12-03T10:15:30Z",
"url": "xyz789"
}
}
}