curl --request GET \
--url https://api.nylon.dev/v1/posts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nylon.dev/v1/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nylon.dev/v1/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nylon.dev/v1/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.nylon.dev/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "cly7q9v2m0001x8b3a1c4d0dd",
"status": "published",
"text": "<string>",
"media": [
{
"url": "<string>",
"type": "image",
"mime_type": "image/jpeg",
"size_bytes": 123,
"alt": "<string>",
"thumbnail_url": "<string>"
}
],
"post_type": "post",
"auto_thread": true,
"source": "api",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"targets": [
{
"id": "cly7q9v2m0002x8b3b5e6f0ee",
"profile_id": "cly7p2q4k0001x8b3f2n9d0aa",
"network": "instagram",
"profile_name": "Nylon Studio",
"status": "published",
"post_ids": [
"17924418112233445"
],
"attempts": 1,
"url": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"error": {
"code": "rejected_by_network",
"message": "The caption contains a link this account is not allowed to post."
}
}
],
"link": {
"url": "<string>",
"title": "<string>",
"description": "<string>",
"image_url": "<string>"
},
"title": "<string>",
"thread": [
"<string>"
],
"networks": {},
"scheduled_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"idempotency_key": "<string>"
}
],
"meta": {
"pagination": {
"limit": 25,
"offset": 0,
"total": 132,
"has_more": true
}
}
}{
"error": {
"code": "invalid_request",
"message": "The request body is not valid.",
"details": [
{
"field": "profile_ids",
"message": "Address the post to at least one profile."
}
]
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required."
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after the window resets."
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required.",
"details": [
{
"message": "Instagram requires at least 1 media item — text-only posts are not supported.",
"field": "profile_ids",
"network": "instagram",
"code": "invalid_request"
}
]
}
}List posts
Page through posts with optional status, network, profile and date filters.
curl --request GET \
--url https://api.nylon.dev/v1/posts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nylon.dev/v1/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nylon.dev/v1/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nylon.dev/v1/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.nylon.dev/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "cly7q9v2m0001x8b3a1c4d0dd",
"status": "published",
"text": "<string>",
"media": [
{
"url": "<string>",
"type": "image",
"mime_type": "image/jpeg",
"size_bytes": 123,
"alt": "<string>",
"thumbnail_url": "<string>"
}
],
"post_type": "post",
"auto_thread": true,
"source": "api",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"targets": [
{
"id": "cly7q9v2m0002x8b3b5e6f0ee",
"profile_id": "cly7p2q4k0001x8b3f2n9d0aa",
"network": "instagram",
"profile_name": "Nylon Studio",
"status": "published",
"post_ids": [
"17924418112233445"
],
"attempts": 1,
"url": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"error": {
"code": "rejected_by_network",
"message": "The caption contains a link this account is not allowed to post."
}
}
],
"link": {
"url": "<string>",
"title": "<string>",
"description": "<string>",
"image_url": "<string>"
},
"title": "<string>",
"thread": [
"<string>"
],
"networks": {},
"scheduled_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"idempotency_key": "<string>"
}
],
"meta": {
"pagination": {
"limit": 25,
"offset": 0,
"total": 132,
"has_more": true
}
}
}{
"error": {
"code": "invalid_request",
"message": "The request body is not valid.",
"details": [
{
"field": "profile_ids",
"message": "Address the post to at least one profile."
}
]
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required."
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after the window resets."
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required.",
"details": [
{
"message": "Instagram requires at least 1 media item — text-only posts are not supported.",
"field": "profile_ids",
"network": "instagram",
"code": "invalid_request"
}
]
}
}Authorizations
An API key beginning with nylon_live_.
Query Parameters
Page size, 1–100.
1 <= x <= 100Rows to skip.
x >= 0Comma-separated post statuses to include.
"scheduled,failed"
Comma-separated networks. A post matches if any of its targets is on one of them.
"instagram,x"
Only posts addressed to this profile.
"cly7p2q4k0001x8b3f2n9d0aa"
Only posts created at or after this time.
Only posts created at or before this time.
Response
A page of posts.
Hide child attributes
Hide child attributes
"cly7q9v2m0001x8b3a1c4d0dd"
Derived from the targets. partially_published means some
networks took it and some did not — retry the rest.
draft, scheduled, publishing, published, partially_published, failed, cancelled "published"
Hide child attributes
Hide child attributes
Resolved from the file, not from the extension.
image, video, gif "image/jpeg"
Null when the host refuses HEAD and sends no length.
post, reel, story Where the post came from.
"api"
Hide child attributes
Hide child attributes
"cly7q9v2m0002x8b3b5e6f0ee"
"cly7p2q4k0001x8b3f2n9d0aa"
A network Nylon publishes to.
facebook, instagram, x, linkedin, pinterest, bluesky, threads, tiktok, youtube, google_business, mastodon, discord "instagram"
The profile's name as it was when the post was created.
"Nylon Studio"
pending, publishing, published, failed, skipped "published"
The network's own ids for what was published. More than one when the post was threaded.
["17924418112233445"]
How many times publishing this target has been attempted.
1
Permalink to the published post, where the network returns one.
The per-network overrides this post was created with.