Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /media/upload | Upload a file |
GET | /media | List items (paginated) |
GET | /media/:id | Get one item |
PATCH | /media/:id | Update metadata |
DELETE | /media/:id | Delete one |
POST | /media/bulk-delete | Bulk 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 param | Description |
|---|---|
type | image / video / document |
search | Match against name |
tags | Comma-separated tags |
page / limit | Pagination |
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"]
}