Media
Get Media
Retrieve a single media resource by media ID.
GET
/
media
/
:id
Get Media
curl --request GET \
--url https://api.example.com/media/:idimport requests
url = "https://api.example.com/media/:id"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/media/:id', 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/:id",
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/:id"
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/:id")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/media/:id")
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/:id
ID format
Supported IDs:post-{postId}author-{authorId}
post-post_01HZX2...author-author_01HZ...
Query parameters
| Parameter | Type | Description |
|---|---|---|
_fields | string | Comma-separated attribute field filter |
Example request
curl "https://api.skayle.ai/v1/ORG_ID/media/post-post_01HZX2..."
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",
"created_at": "2026-02-01T09:20:11.000Z"
},
"links": {
"self": "/v1/ORG_ID/media/post-post_01HZX2..."
}
}
}
Error responses
Invalid media ID format
{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "Invalid media ID format"
}
]
}
Media not found
{
"errors": [
{
"status": "404",
"title": "Not Found",
"detail": "Media with id \"post-missing\" not found"
}
]
}
Response field descriptions
| Field | Type | Description |
|---|---|---|
data.id | string | Media ID |
data.type | string | Resource type (media) |
data.attributes.source | string | post or author |
data.attributes.source_id | string | Related post/author ID |
data.attributes.url | string | Media URL |
data.attributes.type | string | Media type (image) |
data.attributes.title | string | null | Title |
data.attributes.description | string | null | Description |
data.attributes.aspect_ratio | string | null | Aspect ratio |
data.attributes.palette | object | null | Palette metadata |
data.attributes.created_at | string | ISO datetime |
Notes
- Media IDs are not slug-based.
- Single media fetch expects exact media ID format.
⌘I
Get Media
curl --request GET \
--url https://api.example.com/media/:idimport requests
url = "https://api.example.com/media/:id"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/media/:id', 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/:id",
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/:id"
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/:id")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/media/:id")
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