Assets
Attaches an image asset to a post. The service determines under the hood whether the asset is attached to a public or private post based on the post type.
550e8400-e29b-41d4-a716-446655440000
The image file to attach
Image asset successfully attached
Not Found - The post with the specified ID does not exist
POST /assets/attach-image HTTP/1.1
Host:
Content-Type: multipart/form-data
Accept: */*
Content-Length: 70
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"imageFile": "binary"
}
{
"assetId": "550e8400-e29b-41d4-a716-446655440000",
"postId": "550e8400-e29b-41d4-a716-446655440000",
"assetType": "IMAGE",
"url": "https://cdn.example.com/assets/image.jpg",
"orderIndex": 1,
"created_at": "2025-09-15T12:52:54.757Z",
"updated_at": "2025-09-15T12:52:54.757Z"
}
Attaches a video asset to a post. The service determines under the hood whether the asset is attached to a public or private post based on the post type.
550e8400-e29b-41d4-a716-446655440000
The video file to attach
Video asset successfully attached
Not Found - The post with the specified ID does not exist
POST /assets/attach-video HTTP/1.1
Host:
Content-Type: multipart/form-data
Accept: */*
Content-Length: 70
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"videoFile": "binary"
}
{
"assetId": "550e8400-e29b-41d4-a716-446655440000",
"postId": "550e8400-e29b-41d4-a716-446655440000",
"assetType": "IMAGE",
"url": "https://cdn.example.com/assets/image.jpg",
"orderIndex": 1,
"created_at": "2025-09-15T12:52:54.757Z",
"updated_at": "2025-09-15T12:52:54.757Z"
}
Rearranges the order of assets attached to a post by taking an ordered array of asset IDs and updating the orderIndex property of each asset accordingly.
An ordered array of asset IDs
550e8400-e29b-41d4-a716-446655440000
Assets successfully rearranged
No content
Not Found - One or more assets with the specified IDs do not exist
POST /assets/rearrange HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 55
{
"assetOrder": [
"550e8400-e29b-41d4-a716-446655440000"
]
}
No content
Deletes an asset associated with a post. The service handles the underlying logic to ensure proper deletion based on whether the asset belongs to a public or private post.
550e8400-e29b-41d4-a716-446655440000
No Content - Asset successfully deleted
No content
Not Found - The asset with the specified ID does not exist
DELETE /assets/{assetId} HTTP/1.1
Host:
Accept: */*
No content
Last updated