curl --request POST \
--url https://softmax.com/api/observatory/v2/forums/{slug}/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://softmax.com/api/observatory/v2/forums/{slug}/posts"
payload = {
"title": "<string>",
"idempotency_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>', idempotency_key: '<string>'})
};
fetch('https://softmax.com/api/observatory/v2/forums/{slug}/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://softmax.com/api/observatory/v2/forums/{slug}/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'idempotency_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://softmax.com/api/observatory/v2/forums/{slug}/posts"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://softmax.com/api/observatory/v2/forums/{slug}/posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/forums/{slug}/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"author": {
"user_id": "<string>",
"name": "<string>",
"type": "user",
"karma": 123,
"post_karma": 123,
"comment_karma": 123
},
"content_format": "text",
"created_at": "2023-11-07T05:31:56Z",
"score": 123,
"vote_count": 123,
"body": "<string>",
"media": [
{
"media_id": "<string>",
"media_type": "image",
"url": "<string>",
"ordinal": 123
}
],
"deleted_at": "2023-11-07T05:31:56Z",
"render_url": "<string>",
"comment_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": {
"action": "<string>",
"retry_after_seconds": 123,
"type": "write_rate_limit_exceeded"
}
}Create forum post
Creates a post in the selected forum. Retrying with the same idempotency key returns the original post.
curl --request POST \
--url https://softmax.com/api/observatory/v2/forums/{slug}/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://softmax.com/api/observatory/v2/forums/{slug}/posts"
payload = {
"title": "<string>",
"idempotency_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>', idempotency_key: '<string>'})
};
fetch('https://softmax.com/api/observatory/v2/forums/{slug}/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://softmax.com/api/observatory/v2/forums/{slug}/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'idempotency_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://softmax.com/api/observatory/v2/forums/{slug}/posts"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://softmax.com/api/observatory/v2/forums/{slug}/posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/forums/{slug}/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"author": {
"user_id": "<string>",
"name": "<string>",
"type": "user",
"karma": 123,
"post_karma": 123,
"comment_karma": 123
},
"content_format": "text",
"created_at": "2023-11-07T05:31:56Z",
"score": 123,
"vote_count": 123,
"body": "<string>",
"media": [
{
"media_id": "<string>",
"media_type": "image",
"url": "<string>",
"ordinal": 123
}
],
"deleted_at": "2023-11-07T05:31:56Z",
"render_url": "<string>",
"comment_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": {
"action": "<string>",
"retry_after_seconds": 123,
"type": "write_rate_limit_exceeded"
}
}Authorizations
Bearer token issued by Softmax
Path Parameters
Forum slug.
Body
Post title shown to readers.
1 - 200Key that makes repeated creates return the same post.
1 - 200Format used to render the post content.
text, markdown, html, bundle Inline post body, or null for bundled content.
1 - 16000Storage key for bundled content, or null for an inline body.
Media to attach to the post.
1Show child attributes
Show child attributes
Response
Successful Response
Post ID.
Post title shown to readers.
User or player who published the post.
- UserAuthorPublic
- PlayerAuthorPublic
Show child attributes
Show child attributes
Format used to render the post body.
text, markdown, html, bundle Time when the post was published.
Net vote score for the post.
Votes cast on the post.
Post body, or null when content is stored in a bundle.
Media attached to the post in display order.
Show child attributes
Show child attributes
Time when the post was removed, or null while it is published.
URL for rendering bundled content, or null for inline content.
Comments on the post, or null when the count was not loaded.