Posts

Returns a paginated list of posts. Published posts include platformPostUrl with the public URL on each platform. A query parameter that is not listed here returns 400 naming it and the accepted parameters, so a misspelled filter never silently returns the unfiltered list.

get/v1/posts

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/posts
  • Auth: HTTP bearer

Query parameters

pageinteger

Page number (1-based)

limitinteger

Page size. Values above the maximum return 400 rather than being clamped.

offsetinteger

Row offset. Takes precedence over page when both are sent; the response pagination.page is derived from it.

cursorstring

Opaque cursor from a previous response's pagination.nextCursor. Returns the page that follows it in the same sortBy order, and takes precedence over page and offset. Each cursor page costs the same however deep it is, unlike page/offset, which get slower the further you go; prefer it to walk a long history. Send the same filters and sortBy as the request that issued it: a cursor from another sortBy returns 400. Not available with sortBy=status or sortBy=platform, or with source=external.

fieldsstring

Comma-separated list of post fields to return. Each post then carries _id plus only these fields, which makes large pages much cheaper: leave out platforms, content, mediaItems or metadata when you do not need them. Accepted: userId, title, content, mediaItems, platforms, scheduledFor, timezone, status, tags, hashtags, mentions, visibility, metadata, recycling, recycledFromPostId, queuedFromProfile, queueId, createdAt, updatedAt. An unknown field returns 400 naming it. fields=_id returns ids only. Omit it (or send it empty) for the full post. Not available with source=external.

source'zernio' | 'external'

Which collection to read. zernio (default) returns posts authored through Zernio. external returns posts synced from the platform (existing/historical posts that were published outside Zernio). Combine with accountId and paginate via page/limit to walk the full synced history (we keep up to the last ~12 months per account).

status'draft' | 'pending_approval' | 'scheduled' | 'publishing' | 'published' | 'partial' | 'failed' | 'cancelled'
platformstring
Example:twitter
profileIdstring

Filter posts to a specific profile (24-char hex ObjectId). Omit it, or send all or an empty value, to list posts across every profile.

createdBystring

Filter posts to those created by a specific team user (24-char hex ObjectId).

fromDatestring date

Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400. The same name the other date-window filters use (ads, analytics).

toDatestring date

Zero-padded YYYY-MM-DD, or a full ISO 8601 datetime. An empty value means no date filter; any other malformed value returns 400. The same name the other date-window filters use (ads, analytics).

dateFromstring date

Alias of fromDate, kept for existing callers

dateTostring date

Alias of toDate, kept for existing callers

includeHiddenboolean
searchstring

Search posts by text content.

tagsstring
Example:job,engineering

Comma-separated tags (at most 20). Returns only posts carrying every listed tag, matched exactly and case-sensitively against the tags set when the post was created. An empty value means no tag filter. tag is accepted as an alias.

sortBy'scheduled-desc' | 'scheduled-asc' | 'created-desc' | 'created-asc' | 'status' | 'platform'

Sort order for results.

accountIdstring

Filter posts to those published via a specific account (24-char hex ObjectId).

Response

Paginated posts

Example response

{
  "posts": [
    {
      "mediaItems": [
        {
          "subtitles": [
            {
              "url": "https://media.zernio.com/temp/walkthrough.en.srt",
              "language": "en"
            }
          ]
        }
      ],
      "platforms": [
        {
          "platform": "twitter",
          "customMedia": [
            {
              "subtitles": [
                {
                  "url": "https://media.zernio.com/temp/walkthrough.en.srt",
                  "language": "en"
                }
              ]
            }
          ],
          "status": "pending",
          "platformPostId": "1234567890123456789",
          "platformPostUrl": "https://twitter.com/acmecorp/status/1234567890123456789"
        }
      ]
    }
  ]
}

Changes

    • warning

      added the new pending_approval enum value to the // response property for the response status

    • info

      added the new enum value pending_approval to the query request parameter status

    • warning

      added the new webflow enum value to the ///////// response property for the response status