Skip to content

Write a new "wallpost" for the given store. Returns 200 and the created entry, 401 if not logged in, or 403 if you may not view this store.

POST
/api/stores/{storeId}/posts

Authorizations

api_key
Type: API Key (header: X-CSRF-Token)

Parameters

Path Parameters

storeId*
Typestring
Required

Request Body

JSON
{
"text": "string"
}

Responses

Authorization
api_key
Variables
Key
Value
storeId*
cURL
curl -X POST \
'http://localhost/api/stores/{storeId}/posts' \
 --data '{
  "text": "string"
}'

Samples

cURL
curl -X POST http://localhost/api/stores/{storeId}/posts
JavaScript
fetch("http://localhost/api/stores/{storeId}/posts", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/stores/{storeId}/posts");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("http://localhost/api/stores/{storeId}/posts")
print(response.json())