curl --request PATCH \
--url https://api.nylon.dev/v1/posts/{postId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"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>"
}
}{
"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": "not_found",
"message": "Post could not be found."
}
}{
"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"
}
]
}
}{
"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"
}
]
}
}Update a scheduled post
Replace the content, targets or schedule of a post that has not published.
curl --request PATCH \
--url https://api.nylon.dev/v1/posts/{postId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"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>"
}
}{
"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": "not_found",
"message": "Post could not be found."
}
}{
"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"
}
]
}
}{
"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_.
Path Parameters
The Nylon id of the post.
"cly7q9v2m0001x8b3a1c4d0dd"
Body
Every field of CreatePostRequest, all optional. Content fields are
replaced rather than merged.
12000035A URL, or an object when you want alt text or a video cover.
"https://cdn.example.com/launch.jpg"
A URL, or an object to control the preview card.
post, reel, story 30050Hide child attributes
Hide child attributes
Per-network overrides. The content keys below replace the base values
for that network only; every other key is passed through to the
publisher, because the option set differs per network. GET /v1/networks lists the options each one reads.
Hide child attributes
Hide child attributes
A URL, or an object when you want alt text or a video cover.
"https://cdn.example.com/launch.jpg"
post, reel, story, null { "board_id": "881573081235", "title": "Launch day" }
Response
The updated post.
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.