Skip to content
FreeTicketDocs
Esc
↑↓navigate↵open⌘Jpreview

Publish community content (including articles)

Creates a community post. type=ARTICLE requires title and body (Markdown) and builds a slug unique per organization (manual via slug, or derived from title if omitted); type=TEXT/IMAGE require content or imageUrl, same as the dashboard composer. Unlike the dashboard, this path does NOT resolve the link’s Open Graph snapshot (link is always null in the response). Minimum role ADMIN, like every other POST in /api/v1. If the workspace has the community_v2 flag enabled, publishing enqueues a notification to members in the same transaction; with a future publishedAt, the notification goes out when the post is published. The response does not change.

POST/content/posts
Authorization
AuthorizationAPI key · headerrequired

API key prefixed with Bearer . Alternative: the x-api-key header with the raw key. Available scopes: read and write (see /.well-known/oauth-protected-resource).

or
x-api-keyAPI key · headerrequired

Raw API key (without Bearer ), alternative to Authorization.

Header parameters
X-Workspace-Idstring

Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).

Request body
requiredapplication/json
typestringrequired
default: "TEXT"
Allowed:TEXTIMAGEARTICLE
contentstring
max length 5000
imageUrlstring<uri> | null
Show properties
Any of:
string<uri>
string<uri>
null
null
titlestring

Required when type=ARTICLE.

min length 1 · max length 140
subtitlestring | null
Show properties
Any of:
string
string
null
null
slugstring | null

Manual; if omitted it is derived from the title.

Show properties
Any of:
string
string
null
null
bodystring

Markdown. Required when type=ARTICLE.

min length 1 · max length 100000
lockedbooleanrequired

true = restricted to current members.

default: false
eventIdstring | null
Show properties
Any of:
string
string
null
null
publishedAtstring<date-time>
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Responses
201

OK

dataContentPostrequired
Show properties
idstringrequired
typestringrequired
Allowed:TEXTIMAGEVIDEOARTICLE
contentstring | nullrequired
Show properties
Any of:
string
string
null
null
imageUrlstring | nullrequired

ARTICLE post: also serves as the article's cover image.

Show properties
Any of:
string
string
null
null
videoIdstring | nullrequired

VIDEO post: id of the ContentVideo, to cross-reference with GET /content/videos.

Show properties
Any of:
string
string
null
null
eventIdstring | nullrequired
Show properties
Any of:
string
string
null
null
lockedbooleanrequired

true = post restricted to current members; its content arrives redacted.

titlestring | nullrequired

ARTICLE posts only; null for every other type.

Show properties
Any of:
string
string
null
null
subtitlestring | nullrequired

ARTICLE posts only.

Show properties
Any of:
string
string
null
null
slugstring | nullrequired

ARTICLE posts only. Permalink at /comunidades/articulos/{slug}, unique per organization.

Show properties
Any of:
string
string
null
null
bodystring | nullrequired

ARTICLE posts only. Body in Markdown.

Show properties
Any of:
string
string
null
null
readingMinutesinteger | nullrequired

ARTICLE posts only. Not redacted when locked: it does not leak content, only its length.

Show properties
Any of:
integer
integer
null
null
linkobject | nullrequired

Open Graph snapshot of the first link in the text. Always null for ARTICLE posts.

Show properties
Any of:
object
urlstringrequired
titlestring | nullrequired
Show properties
Any of:
string
string
null
null
descriptionstring | nullrequired
Show properties
Any of:
string
string
null
null
imageUrlstring | nullrequired
Show properties
Any of:
string
string
null
null
domainstringrequired
null
null
commentsCountintegerrequired

Visible comments: excludes deleted ones and those hidden by moderation (and replies to a hidden comment). 0 if the post arrives redacted.

min -9007199254740991 · max 9007199254740991
publishedAtstringrequired
401

Missing or invalid credential.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsany
403

Insufficient role or resource not accessible.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsany
404

Resource does not exist or is out of scope.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsany
422

Request body/parameter validation failed.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsany
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://admin.appfreeticket.com/api/v1/content/posts' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "TEXT",
  "content": "string",
  "imageUrl": "http://example.com",
  "title": "string",
  "subtitle": "string",
  "slug": "string",
  "body": "string",
  "locked": false,
  "eventId": "string",
  "publishedAt": "2019-08-24T14:15:22Z"
}'
Response
{
  "data": {
    "id": "string",
    "type": "TEXT",
    "content": "string",
    "imageUrl": "string",
    "videoId": "string",
    "eventId": "string",
    "locked": true,
    "title": "string",
    "subtitle": "string",
    "slug": "string",
    "body": "string",
    "readingMinutes": -9007199254740991,
    "link": {
      "url": "string",
      "title": "string",
      "description": "string",
      "imageUrl": "string",
      "domain": "string"
    },
    "commentsCount": -9007199254740991,
    "publishedAt": "string"
  }
}