REST API

Create Post

API token can be found in "Settings > API".

Endpoint:

POST https://api.blogmaker.app/posts

Example:

  • "title" is the only required field
  • "publish" defaults to false if omitted
curl "https://api.blogmaker.app/posts" \
  -X POST \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{
        "title": "The Dark Knight",
        "description": "A film by Christopher Nolan",
        "image": "https://images.unsplash.com/photo-1509347528160-9a9e33742cdb",
        "url": "the-dark-knight",
        "text": "Some heroes wear capes. Others just refuse to sleep.",
        "publish": true
    }'

Response:

{
  "status": 201,
  "id": "1d1aeb7e0c70ca8fc8df4e5e6b237371c042c8df"
}

Additional possible responses, when "publish": true

{
  "status": 409,
  "error": "numeric_url_not_allowed"
}

{
  "status": 409,
  "error": "url_contains_a_reserved_word"
}

{
  "status": 409,
  "error": "url_not_unique"
}

API requests are currently limited to 10 post creations per day.