Assets

Attach an image asset to a post

post

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
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"
}

Attach a video asset to a post

post

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
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"
}

Rearrange the order of assets

post

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[]Optional

An ordered array of asset IDs

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
200
Assets successfully rearranged
post
POST /assets/rearrange HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "assetOrder": [
    "550e8400-e29b-41d4-a716-446655440000"
  ]
}

No content

Delete an asset by ID

delete

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
delete
DELETE /assets/{assetId} HTTP/1.1
Host: 
Accept: */*

No content

Last updated