List Media

Get a paginated list of your media objects.


GET
/media

Authorization

AuthorizationRequiredBearer <token>

See API Security for more details.

In: header

Query Parameters

pageinteger
Default: 1Minimum: 1
limitinteger
Default: 20Minimum: 1Maximum: 100

Response Body

Success

TypeScript Definitions

Use the response body type in TypeScript.

metaobject
dataarray<object>
errorobject | null | null
linksobject
fetch("https://api.ittybit.com/media?page=1&limit=20", {
  headers: {
    "Authorization": "Bearer <token>"
  }
})
{
  "meta": {
    "request_id": "req_abcdefghij1234567890",
    "org_id": "org_abcdefgh1234",
    "project_id": "prj_abcdefgh1234",
    "version": "2025-01-01",
    "type": "list",
    "limit": 20,
    "total": 100,
    "page": 1,
    "pages": 5
  },
  "data": [
    {
      "id": "med_abcdefgh1234",
      "object": "media",
      "kind": "video",
      "title": "My Video Example",
      "alt": "An example video used to demonstrate the ittybit API",
      "width": 1920,
      "height": 1080,
      "duration": 123.45,
      "files": [
        {
          "id": "file_abcdefgh1234",
          "object": "source",
          "kind": "video",
          "format": "mp4",
          "type": "video/mp4",
          "width": 1920,
          "height": 1080,
          "duration": 123.45,
          "filesize": 12345678,
          "folder": "example",
          "filename": "video.mp4",
          "url": "https://you.ittybit.net/example/video.mp4",
          "ref": "original",
          "created": "2025-01-01T01:23:45Z",
          "updated": "2025-01-01T01:23:45Z"
        },
        {
          "id": "file_abcdefgh5678",
          "object": "source",
          "kind": "image",
          "format": "png",
          "type": "image/png",
          "width": 640,
          "height": 360,
          "filesize": 123456,
          "folder": "example",
          "filename": "image.png",
          "url": "https://you.ittybit.net/example/image.png",
          "ref": "thumbnail",
          "created": "2025-01-01T01:23:46Z",
          "updated": "2025-01-01T01:23:46Z"
        }
      ],
      "urls": {
        "original": "https://you.ittybit.net/example/video.mp4",
        "thumbnail": "https://you.ittybit.net/example/image.png"
      },
      "background": "#2OBO75",
      "metadata": {
        "customKey": "your custom value"
      },
      "created": "2025-01-01T01:23:45Z",
      "updated": "2025-01-01T01:23:46Z"
    },
    "… 19 more media objects"
  ],
  "error": null,
  "links": {
    "self": "https://api.ittybit.com/media?page=1",
    "first": "https://api.ittybit.com/media?page=1",
    "prev": null,
    "next": "https://api.ittybit.com/media?page=2",
    "last": "https://api.ittybit.com/media?page=5"
  }
}