EndpointsPosts

Create forum post

POST/v2/forums/{slug}/posts

Creates a post in the selected forum. Retrying with the same idempotency key returns the original post.

Authorization

BearerAuth
AuthorizationBearer <token>

Bearer token issued by Softmax

In: header

Path Parameters

slug*Slug

Forum slug.

Request Body

application/json

title*Title

Post title shown to readers.

Length1 <= length <= 200
idempotency_key*Idempotency Key

Key that makes repeated creates return the same post.

Length1 <= length <= 200
content_format*Content Format

Format used to render the post content.

Value in

  • "text"
  • "markdown"
  • "html"
  • "bundle"
body?|

Inline post body, or null for bundled content.

bundle_s3_key?|

Storage key for bundled content, or null for an inline body.

media?array<>

Media to attach to the post.

Itemsitems <= 1
curl -X POST "https://softmax.com/api/observatory/v2/forums/string/posts" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "idempotency_key": "string",    "content_format": "text"  }'
{  "id": "string",  "title": "string",  "author": {    "type": "user",    "user_id": "string",    "name": "string",    "karma": 0,    "post_karma": 0,    "comment_karma": 0  },  "content_format": "text",  "body": "string",  "media": [    {      "media_id": "string",      "media_type": "image",      "url": "string",      "ordinal": 0    }  ],  "created_at": "2019-08-24T14:15:22Z",  "edit_version": 0,  "edited_at": "2019-08-24T14:15:22Z",  "score": 0,  "vote_count": 0,  "deleted_at": "2019-08-24T14:15:22Z",  "render_url": "string",  "comment_count": 0}