Skip to content

Endpoints

MethodPathPurpose
POST/media/uploadUpload a file
GET/mediaList items (paginated)
GET/media/:idGet one item
PATCH/media/:idUpdate metadata
DELETE/media/:idDelete one
POST/media/bulk-deleteBulk delete

POST /media/upload

multipart/form-data with a file field:

bash
curl -X POST https://api.socifyr.com/api/media/upload \
  -H "Authorization: Bearer sk_..." \
  -H "X-Workspace-Id: <workspaceId>" \
  -F "file=@./banner.jpg"

Response:

json
{
  "success": true,
  "data": {
    "id": "6a05031284584482ace13d3b",
    "name": "banner.jpg",
    "type": "image",
    "mimeType": "image/jpeg",
    "sizeBytes": 330665,
    "url": "https://rustfs.../signed-url",
    "tags": [],
    "createdAt": "2026-05-13T23:02:42.160Z"
  }
}

GET /media

bash
curl "https://api.socifyr.com/api/media?type=image&search=banner&limit=20"
Query paramDescription
typeimage / video / document
searchMatch against name
tagsComma-separated tags
page / limitPagination

Response:

json
{
  "success": true,
  "data": {
    "results": [...],
    "total": 47,
    "page": 1,
    "limit": 20
  }
}

PATCH /media/:id

bash
curl -X PATCH https://api.socifyr.com/api/media/<id> \
  -H "Authorization: Bearer sk_..." \
  -H "X-Workspace-Id: <workspaceId>" \
  -H "Content-Type: application/json" \
  -d '{
    "alt": "Updated alt text",
    "description": "Q2 campaign banner",
    "tags": ["evergreen"]
  }'

DELETE /media/:id

No body, no response data on success.

POST /media/bulk-delete

json
{
  "ids": ["6a04f715d3d7d93575e65d13", "6a04f715d3d7d93575e65d14"]
}