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.
Body
postIdstring · uuidOptionalExample:
550e8400-e29b-41d4-a716-446655440000
imageFilestring · binaryOptional
The image file to attach
Responses
200
Image asset successfully attached
application/json
404
Not Found - The post with the specified ID does not exist
post
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-07-07T01:11:27.502Z",
"updated_at": "2025-07-07T01:11:27.502Z"
}
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.
Body
postIdstring · uuidOptionalExample:
550e8400-e29b-41d4-a716-446655440000
videoFilestring · binaryOptional
The video file to attach
Responses
200
Video asset successfully attached
application/json
404
Not Found - The post with the specified ID does not exist
post
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-07-07T01:11:27.502Z",
"updated_at": "2025-07-07T01:11:27.502Z"
}
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.
Body
assetOrderstring · uuid[]OptionalExample:
An ordered array of asset IDs
550e8400-e29b-41d4-a716-446655440000
Responses
200
Assets successfully rearranged
404
Not Found - One or more assets with the specified IDs do not exist
post
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.
Path parameters
assetIdstring · uuidRequiredExample:
550e8400-e29b-41d4-a716-446655440000
Responses
204
No Content - Asset successfully deleted
404
Not Found - The asset with the specified ID does not exist
delete
DELETE /assets/{assetId} HTTP/1.1
Host:
Accept: */*
No content
Last updated