Posts
Posts related to Blog
Some of these are authenticated endpoints. You can visit authentication to register an account.
An API key is not required to access the authenticated endpoints, but you will still need to provide a valid access token.
These endpoints allow you to create, read, update and delete posts. Posts are the main content of a blog and can be created by any profile.
These endpoints support pagination and sorting. Read more about these features here.
The Post model
Prop | Type | Default |
---|---|---|
id | string | - |
title | string | - |
body | string | - |
tags | Array<string> | - |
media | object | - |
created | string | - |
updated | string | - |
author | Profile | - |
Filtering
You can filter based on an entry in the tags array by using the _tag
query flag. You may only filter by one tag at a time.
Prop | Type | Default |
---|---|---|
_tag | string | - |
An example query filtering for posts with the tag my_tag
:
All posts
Retrieve all posts.
Single post
Retrieve a single post by its id.
Create post
Create a new post. Only the title
property is required, but we recommend at least including the body
and media
properties as well.
Please note that the media.url
property must be a fully formed URL that links to a live and publicly accessible image. The API will check the provided URL and if it cannot be accessed publicly you will receive a 400 Bad Request
error response.
Update post
Update a post based on its id. This endpoint returns the updated post.
Please note that the media.url
property must be a fully formed URL that links to a live and publicly accessible image. The API will check the provided URL and if it cannot be accessed publicly you will receive a 400 Bad Request
error response.
Delete post
Delete a post based on its id.
Returns an empty 204 No Content
response on success.