List media
List the workspace’s media library, which every site in the workspace shares.
GET https://sitepaste.com/api/v1/public/media
Requires the media scope.
Usage
curl "https://sitepaste.com/api/v1/public/media?limit=50" \
-H "Authorization: Bearer $TOKEN"
Authorizations
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token (Authorization: Bearer sp_...). Created in the dashboard under Account > Tokens. See authentication. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | No | Narrow to files whose id or note contains this text. Max 200 bytes; longer is a 422. |
| limit | integer | No | How many to return, 1 to 1000. Defaults to 1000. |
| offset | integer | No | How many to skip. Defaults to 0. |
limit and offset page through whatever q matched. See paging.
Response
{
"media": [
{
"fileId": "a1b2c3d4.webp",
"url": "https://media.example.com/media/.../a1b2c3d4.webp",
"mimeType": "image/webp",
"sizeBytes": 84213,
"width": 1600,
"height": 1067,
"protected": false,
"thumbnailUrl": "https://media.example.com/media/.../a1b2c3d4.webp.thumb.jpg",
"folderId": "f8qjx2v7mz4r",
"note": "Cover shot",
"originalFilename": "beach.jpg",
"capturedAt": "2026-06-01T09:00:00Z",
"createdAt": "2026-06-02T12:00:00Z"
}
],
"total": 214,
"limit": 1000,
"offset": 0
}
| Field | Type | Description |
|---|---|---|
| fileId | string | The file’s ID. Use it for updating and deleting. |
| url | string | Where the file is served from. A protected file’s URL is a /media/ path that opens only for visitors who can open a page that shows it. |
| mimeType | string | Detected content type. |
| sizeBytes | integer | File size. Omitted when unknown. |
| width, height | integer | Image or video dimensions. Omitted for other types. |
| durationMs | integer | Audio or video duration. Omitted for other types. |
| protected | boolean | Whether the file needs a password or a workspace sign-in to view. |
| thumbnailUrl | string | Generated thumbnail. Omitted when there is none. |
| transcodeStatus | string | pending, processing, complete, or failed. Omitted for files that need no transcode. |
| folderId | string | The folder the file is in. Omitted when unfiled. |
| note | string | The file’s note. Omitted when unset. |
| originalFilename | string | The name the file was uploaded under. Omitted when unknown. |
| capturedAt | string | RFC 3339. When the photo or video was taken, read from the file. Omitted when unknown. |
| sortOrder | integer | Manual position within its folder. Omitted when the folder is not manually ordered. |
| createdAt | string | RFC 3339. |
total counts every file the request matched, not only the ones in this response.
Files are ordered by upload time, newest first.