Skip to content

Add a post to a wall.

POST
/api/wall/{target}/{targetId}

Authorizations

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

Parameters

Path Parameters

target*
Typestring
Required
targetId*
Typestring
Required

Request Body

JSON
{
"id": 1,
"body": "Hello world!",
"time": "2024-01-14 09:57:24",
"pictures": [
"/api/uploads/bcb57ea1-ed73-4fde-849b-c88b11393690"
],
"author": {
"id": 0,
"name": "string",
"avatar": "string",
"isSleeping": true
}
}

Responses

Success
JSON
{
"id": 1,
"body": "Hello world!",
"time": "2024-01-14 09:57:24",
"pictures": [
"/api/uploads/bcb57ea1-ed73-4fde-849b-c88b11393690"
],
"author": {
"id": 0,
"name": "string",
"avatar": "string",
"isSleeping": true
}
}
Authorization
api_key
Variables
Key
Value
target*
targetId*
cURL
curl -X POST \
'http://localhost/api/wall/{target}/{targetId}' \
 --data '{
  "id": 1,
  "body": "Hello world!",
  "time": "2024-01-14 09:57:24",
  "pictures": [
    "/api/uploads/bcb57ea1-ed73-4fde-849b-c88b11393690"
  ],
  "author": {
    "id": 0,
    "name": "string",
    "avatar": "string",
    "isSleeping": true
  }
}'

Samples

cURL
curl -X POST http://localhost/api/wall/{target}/{targetId}
JavaScript
fetch("http://localhost/api/wall/{target}/{targetId}", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/wall/{target}/{targetId}");
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/wall/{target}/{targetId}")
print(response.json())