Posts

Get a post

Fetch one post with the status, platform post ID, URL and error of each target.

GET https://social-publish-api.onrender.com/v1/posts/{id}

Returns a single post and all of its targets. Poll this endpoint to follow a post through publishing, or use webhook events to be notified instead.

Headers

HeaderRequiredDescription
x-access-keyYes*Your API key. *Or send Authorization: Bearer <key>.

Path parameters

ParameterTypeDescription
idstring (UUID)The post ID returned by Create a post.

Request

curl https://social-publish-api.onrender.com/v1/posts/a3f8c2d1-9b7e-4c6a-8f5d-2e1b0c9a8d7f \
  -H "x-access-key: $RELAYCAST_API_KEY"
const postId = "a3f8c2d1-9b7e-4c6a-8f5d-2e1b0c9a8d7f";
const res = await fetch(`https://social-publish-api.onrender.com/v1/posts/${postId}`, {
  headers: { "x-access-key": process.env.RELAYCAST_API_KEY! },
});
if (res.status === 404) throw new Error("Post not found");
const { data: post } = await res.json();
for (const t of post.targets) console.log(t.platform, t.status, t.externalUrl ?? t.errorMessage);
import os, requests

post_id = "a3f8c2d1-9b7e-4c6a-8f5d-2e1b0c9a8d7f"
res = requests.get(
    f"https://social-publish-api.onrender.com/v1/posts/{post_id}",
    headers={"x-access-key": os.environ["RELAYCAST_API_KEY"]},
)
res.raise_for_status()
post = res.json()["data"]
for t in post["targets"]:
    print(t["platform"], t["status"], t["externalUrl"] or t["errorMessage"])

Response

Response 200
{
  "data": {
    "id": "a3f8c2d1-9b7e-4c6a-8f5d-2e1b0c9a8d7f",
    "content": "Our new release is live. Faster uploads, a calendar view and more.",
    "media": [{ "url": "https://cdn.example.com/release.jpg", "type": "image", "altText": "Release banner" }],
    "status": "published",
    "scheduledFor": "2026-11-02T15:00:00.000Z",
    "request": {
      "content": "Our new release is live. Faster uploads, a calendar view and more.",
      "targets": [{ "accountId": "6f1c2a7e-4b8d-4f7a-9a51-2d3c4b5a6e7f" }],
      "media": [{ "url": "https://cdn.example.com/release.jpg", "type": "image", "altText": "Release banner" }],
      "publishNow": false,
      "scheduledFor": "2026-11-02T15:00:00Z"
    },
    "createdAt": "2026-10-05T09:30:12.441Z",
    "updatedAt": "2026-11-02T15:00:06.230Z",
    "targets": [
      {
        "id": "e1d2c3b4-a596-4877-8695-a4b3c2d1e0f9",
        "accountId": "6f1c2a7e-4b8d-4f7a-9a51-2d3c4b5a6e7f",
        "platform": "twitter",
        "status": "published",
        "content": null,
        "options": {},
        "attempts": 1,
        "externalPostId": "1852700000000000000",
        "externalUrl": "https://x.com/acme/status/1852700000000000000",
        "errorCode": null,
        "errorMessage": null,
        "publishedAt": "2026-11-02T15:00:06.218Z",
        "createdAt": "2026-10-05T09:30:12.441Z",
        "updatedAt": "2026-11-02T15:00:06.218Z"
      }
    ]
  }
}

Post fields

FieldTypeDescription
idstring (UUID)Post ID.
contentstringShared post text.
mediaobject[]Shared media items (url, type, optional altText, title).
statusstringOverall status, see below.
scheduledForstringWhen the post was (or will be) sent. For publishNow posts, the creation time.
requestobjectThe request body as accepted, with defaults filled in. Useful to re-send or debug a post.
createdAt, updatedAtstringISO 8601 timestamps.
targetsobject[]One entry per account.

Target fields

FieldTypeDescription
idstring (UUID)Target ID.
accountIdstring (UUID)The account posted to.
platformstringThe account's platform.
statusstringqueued, publishing, published or failed.
contentstring | nullPer-account text override; null means the post content was used.
optionsobjectPlatform options sent for this account.
attemptsintegerPublish attempts so far.
externalPostIdstring | nullThe platform's ID for the published post.
externalUrlstring | nullPublic URL of the published post, when the platform provides one.
errorCodestring | nullLast error: auth_revoked, rate_limited, invalid_content, media_error or platform_error.
errorMessagestring | nullHuman-readable error from the last attempt.
publishedAtstring | nullWhen the target was published.
createdAt, updatedAtstringISO 8601 timestamps.

Statuses

Post statusMeaning
scheduledWaiting for scheduledFor.
publishingAt least one target is queued or being published.
publishedEvery target was published.
partialSome targets were published and some failed.
failedEvery target failed.

A target whose last attempt hit a temporary problem goes back to queued and keeps its errorCode/errorMessage until a later attempt succeeds. A published target can have no externalUrl: for example, a TikTok post still in TikTok's moderation, or a TikTok inbox draft. See Posts for details.

Errors

StatusCodeWhen
401unauthorizedMissing or invalid API key.
404not_foundNo post with this ID in the API key's project.
429rate_limitedRate limit exceeded for this key.
Response 404
{
  "error": {
    "code": "not_found",
    "message": "Post not found"
  }
}

This page is also available as Markdown.