Media
List Media
List media resources built from published article/item images and author avatars.
GET
/
media
List Media
curl --request GET \
--url https://api.example.com/mediaimport requests
url = "https://api.example.com/media"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/media', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/media",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/media"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/media")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/media")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyEndpoint
GET /media
Notes
Media API currently returns image resources from:- Published article/item featured images (
source: post) - Author avatars (
source: author)
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
per_page | integer | 10 | Items per page |
search | string | - | Search by title/description |
orderby | string | date | date, created_at, or title |
order | string | desc | asc or desc |
_fields | string | - | 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
| Field | Type | Description |
|---|---|---|
data[].id | string | Media ID (post-{postId} or author-{authorId}) |
data[].type | string | Resource type (media) |
data[].attributes.source | string | Source entity type (post or author) |
data[].attributes.source_id | string | Source entity ID |
data[].attributes.url | string | Media URL |
data[].attributes.type | string | Media type (image) |
data[].attributes.title | string | null | Media title |
data[].attributes.description | string | null | Media description |
data[].attributes.aspect_ratio | string | null | Aspect ratio label |
data[].attributes.palette | object | null | Palette metadata |
data[].attributes.created_at | string | ISO datetime |
meta.total | number | Total media items |
meta.per_page | number | Page size |
meta.page | number | Current page |
Filtering and pagination
searchmatches media title and description.orderbysupports date/title-oriented sorting.pageandper_pagecontrol pagination.
Error responses
403if organization is not in Skayle CMS mode.500for unexpected server errors.
⌘I
List Media
curl --request GET \
--url https://api.example.com/mediaimport requests
url = "https://api.example.com/media"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/media', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/media",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/media"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/media")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/media")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body