Posts
Public Posts
Each post begins as a draft. A user can only have one active draft at a time. If a draft already exists, it must be published or deleted before a new one can be created.
My First Post
This is the content of my first post.
["example","firstPost"]
blog
Created
Conflict - Draft already exists for the user
POST /posts HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 128
{
"title": "My First Post",
"description": "This is the content of my first post.",
"tags": [
"example",
"firstPost"
],
"postType": "blog"
}
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"title": "My First Post",
"description": "This is the content of my first post.",
"tags": [
"example",
"firstPost"
],
"postType": "blog",
"accessType": "PUBLIC",
"status": "DRAFT",
"created_at": "2025-09-12T17:34:56.785Z",
"updated_at": "2025-09-12T17:34:56.785Z",
"deleted_at": "2025-09-12T17:34:56.785Z"
}
Retrieves a list of public posts with optional filtering. Users can filter by tags, creation date, status (draft or published), or post type.
Filter posts by specific tags
Filter posts by status
Filter posts created after a specific date
Filter posts by a specific type from the predefined list
A list of posts
GET /posts HTTP/1.1
Host:
Accept: */*
A list of posts
[
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"title": "My First Post",
"description": "This is the content of my first post.",
"tags": [
"example",
"firstPost"
],
"postType": "blog",
"accessType": "PUBLIC",
"status": "DRAFT",
"created_at": "2025-09-12T17:34:56.785Z",
"updated_at": "2025-09-12T17:34:56.785Z",
"deleted_at": "2025-09-12T17:34:56.785Z"
}
]
Retrieves the details of a public post by its unique identifier.
Post found
Not Found - The post with the specified ID does not exist
GET /posts/{id} HTTP/1.1
Host:
Accept: */*
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"title": "My First Post",
"description": "This is the content of my first post.",
"tags": [
"example",
"firstPost"
],
"postType": "blog",
"accessType": "PUBLIC",
"status": "DRAFT",
"created_at": "2025-09-12T17:34:56.785Z",
"updated_at": "2025-09-12T17:34:56.785Z",
"deleted_at": "2025-09-12T17:34:56.785Z"
}
Updates the title, content, tags, or post type of an existing public post.
Updated Title
Updated content of the post.
["updated","post"]
news
Updated successfully
Not Found - The post with the specified ID does not exist
PUT /posts/{id} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 114
{
"title": "Updated Title",
"description": "Updated content of the post.",
"tags": [
"updated",
"post"
],
"postType": "news"
}
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"title": "My First Post",
"description": "This is the content of my first post.",
"tags": [
"example",
"firstPost"
],
"postType": "blog",
"accessType": "PUBLIC",
"status": "DRAFT",
"created_at": "2025-09-12T17:34:56.785Z",
"updated_at": "2025-09-12T17:34:56.785Z",
"deleted_at": "2025-09-12T17:34:56.785Z"
}
Deletes a public post by its ID. This action is irreversible.
No Content - Post successfully deleted
No content
Not Found - The post with the specified ID does not exist
DELETE /posts/{id} HTTP/1.1
Host:
Accept: */*
No content
Identical to creating a public post, but this post is private.
My First Private Post
This is the content of my first private post.
["example","privatePost"]
privateBlog
Created
Conflict - Draft already exists for the user
POST /private/posts HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 153
{
"title": "My First Private Post",
"description": "This is the content of my first private post.",
"tags": [
"example",
"privatePost"
],
"postType": "privateBlog"
}
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"title": "My First Post",
"description": "This is the content of my first post.",
"tags": [
"example",
"firstPost"
],
"postType": "blog",
"accessType": "PUBLIC",
"status": "DRAFT",
"created_at": "2025-09-12T17:34:56.785Z",
"updated_at": "2025-09-12T17:34:56.785Z",
"deleted_at": "2025-09-12T17:34:56.785Z"
}
Retrieves a list of private posts with optional filtering. Users can filter by tags, creation date, status (draft or published), or post type.
Filter posts by specific tags
Filter posts by status
Filter posts created after a specific date
Filter posts by a specific type from the predefined list
A list of private posts
GET /private/posts HTTP/1.1
Host:
Accept: */*
A list of private posts
[
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"title": "My First Post",
"description": "This is the content of my first post.",
"tags": [
"example",
"firstPost"
],
"postType": "blog",
"accessType": "PUBLIC",
"status": "DRAFT",
"created_at": "2025-09-12T17:34:56.785Z",
"updated_at": "2025-09-12T17:34:56.785Z",
"deleted_at": "2025-09-12T17:34:56.785Z"
}
]
Retrieves the details of a private post by its unique identifier.
Post found
Not Found - The post with the specified ID does not exist
GET /private/posts/{id} HTTP/1.1
Host:
Accept: */*
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"title": "My First Post",
"description": "This is the content of my first post.",
"tags": [
"example",
"firstPost"
],
"postType": "blog",
"accessType": "PUBLIC",
"status": "DRAFT",
"created_at": "2025-09-12T17:34:56.785Z",
"updated_at": "2025-09-12T17:34:56.785Z",
"deleted_at": "2025-09-12T17:34:56.785Z"
}
Updates the title, content, tags, or post type of an existing private post.
Updated Private Title
Updated content of the private post.
["updated","privatePost"]
privateNews
Updated successfully
Not Found - The post with the specified ID does not exist
PUT /private/posts/{id} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 144
{
"title": "Updated Private Title",
"description": "Updated content of the private post.",
"tags": [
"updated",
"privatePost"
],
"postType": "privateNews"
}
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"title": "My First Post",
"description": "This is the content of my first post.",
"tags": [
"example",
"firstPost"
],
"postType": "blog",
"accessType": "PUBLIC",
"status": "DRAFT",
"created_at": "2025-09-12T17:34:56.785Z",
"updated_at": "2025-09-12T17:34:56.785Z",
"deleted_at": "2025-09-12T17:34:56.785Z"
}
Deletes a private post by its ID. This action is irreversible.
No Content - Post successfully deleted
No content
Not Found - The post with the specified ID does not exist
DELETE /private/posts/{id} HTTP/1.1
Host:
Accept: */*
No content
Last updated