Publishes a new blog post. The post will be publicly visible immediately.
POST
/api/blogAuthorizations
api_key
Type: API Key (header: X-CSRF-Token)
Request Body
JSON
{
"id": 0,
"regionId": 0,
"title": "string",
"teaser": "string",
"content": "string",
"picture": "string"
}
Responses
Success
JSON
{
"id": 0,
"title": "string",
"content": "string",
"publishedAt": "string",
"authorName": "string",
"picture": "string"
}
Authorization
api_key
cURL
curl -X POST \
'http://localhost/api/blog' \
--data '{
"id": 0,
"regionId": 0,
"title": "string",
"teaser": "string",
"content": "string",
"picture": "string"
}'
Samples
cURL
curl -X POST http://localhost/api/blog
JavaScript
fetch("http://localhost/api/blog", { method: "POST" })
.then(response => response.json())
.then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/blog");
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/blog")
print(response.json())