Skip to main content
GET
/
media
List Media
curl --request GET \
  --url https://api.example.com/media

Endpoint

GET /media

Notes

Media API currently returns image resources from:
  • Published article/item featured images (source: post)
  • Author avatars (source: author)

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number
per_pageinteger10Items per page
searchstring-Search by title/description
orderbystringdatedate, created_at, or title
orderstringdescasc or desc
_fieldsstring-Comma-separated attribute field filter

Example request

curl "https://api.skayle.ai/v1/ORG_ID/media?page=1&per_page=10&orderby=date&order=desc"

Example response

{
  "data": [
    {
      "id": "post-post_01HZX2...",
      "type": "media",
      "attributes": {
        "source": "post",
        "source_id": "post_01HZX2...",
        "url": "https://cdn.example.com/images/hero-1.jpg",
        "type": "image",
        "title": "B2B SaaS Content Strategy for 2026",
        "description": "Editorial hero composition",
        "aspect_ratio": "16:9",
        "palette": {
          "base": "#2F4F4F"
        },
        "created_at": "2026-02-01T09:20:11.000Z"
      },
      "links": {
        "self": "/v1/ORG_ID/media/post-post_01HZX2..."
      }
    },
    {
      "id": "author-author_01HZ...",
      "type": "media",
      "attributes": {
        "source": "author",
        "source_id": "author_01HZ...",
        "url": "https://cdn.example.com/images/avatar-1.jpg",
        "type": "image",
        "title": "Alex Jordan's Avatar",
        "created_at": "2025-12-20T07:30:00.000Z"
      },
      "links": {
        "self": "/v1/ORG_ID/media/author-author_01HZ..."
      }
    }
  ],
  "meta": {
    "total": 27,
    "per_page": 10,
    "page": 1
  }
}

Response field descriptions

FieldTypeDescription
data[].idstringMedia ID (post-{postId} or author-{authorId})
data[].typestringResource type (media)
data[].attributes.sourcestringSource entity type (post or author)
data[].attributes.source_idstringSource entity ID
data[].attributes.urlstringMedia URL
data[].attributes.typestringMedia type (image)
data[].attributes.titlestring | nullMedia title
data[].attributes.descriptionstring | nullMedia description
data[].attributes.aspect_ratiostring | nullAspect ratio label
data[].attributes.paletteobject | nullPalette metadata
data[].attributes.created_atstringISO datetime
meta.totalnumberTotal media items
meta.per_pagenumberPage size
meta.pagenumberCurrent page

Filtering and pagination

  • search matches media title and description.
  • orderby supports date/title-oriented sorting.
  • page and per_page control pagination.

Error responses

  • 403 if organization is not in Skayle CMS mode.
  • 500 for unexpected server errors.