Skip to main content

PreflightResult

validbooleanrequired

True when create-post with the same body would succeed. Warnings do not change it.

errors objectrequired

Validation and network-requirement errors keyed by field, as create-post would report them in a 422.

property name* string[]
  • Array [
  • string
  • ]
  • issues object[]required

    Guardrail problems, in the order create-post would report the first of them.

  • Array [
  • messagestringrequired
    codestring

    Possible values: [duplicate_post, account_daily_cap_reached, account_unauthorized, account_token_missing, x_monthly_cap_reached]

    account_idinteger

    The account the problem is about.

    existing_post_uuidstring<uuid>

    duplicate_post only: the earlier post with the same content.

    limitinteger

    account_daily_cap_reached only: the account's daily cap.

    usedinteger

    account_daily_cap_reached only: posts already counted on that UTC day.

  • ]
  • warnings object[]required

    The warnings create-post would return for the same body (same codes and messages); empty when there are none.

  • Array [
  • codestringrequired

    One of the codes above. The list grows over time (x-extensible-enum), so accept unknown values.

    account_idinteger | nullnullablerequired

    The account the warning is about; null when it is about the whole post.

    messagestringrequired
  • ]
  • publish_at(string | null)<date-time>nullablerequired

    UTC time the post would publish at; null for a draft.

    accounts object[]required
  • Array [
  • idintegerrequired
    uuidstring<uuid>required
    namestringrequired
    providerstringrequired
    authorizedbooleanrequired

    False when the account must be reconnected.

    has_tokenbooleanrequired

    Whether an access token is stored for the account.

    healthybooleanrequired

    authorized and has_token: the account can publish.

    daily_cap objectrequired
    limitintegerrequired

    Posts allowed per UTC day for this network; Free workspaces get half (rounded down, at least 1).

    used_todayintegerrequired

    Scheduled, awaiting-approval and published posts counted for today (UTC).

    connection objectrequired

    Connection health of an account (todo 27). Never contains token values.

    statusstringrequired

    expired: must be reconnected now. expiring: the connection hits its hard expiry within 7 days. failing: the latest publish attempt failed. healthy: none of these.

    Possible values: [healthy, failing, expiring, expired]

    expiry_kindstringrequired

    What limits the connection: access (the access token), refresh (the refresh token), expired, unknown (refreshed automatically, no known hard limit) or none (the network's connections do not expire on a schedule).

    Possible values: [access, refresh, expired, unknown, none]

    expires_at(string | null)<date-time>nullablerequired

    When the connection stops working unless reconnected; null without a hard expiry.

    days_leftinteger | nullnullablerequired

    Whole days until expires_at (0 = less than a day).

    refreshablebooleanrequired

    PostBoost refreshes the token automatically until the hard expiry.

    notestringrequired

    Plain-language explanation of the prediction.

    reconnect_reason object | nullrequired

    Why the daily token check found the account's token dead, for an account that needs a reconnect; null otherwise. Codes: meta_190_<subcode> (Facebook, Instagram), refresh_expired (TikTok, Pinterest), linkedin_revoked, linkedin_expired, google_revoked (YouTube).

    codestringrequired
    Example: linkedin_revoked
    messagestringrequired

    The reason in plain language.

    found_atstring<date-time>required

    When the check first found the token dead.

    last_success_at(string | null)<date-time>nullablerequired

    When the account last published successfully.

    last_errorstring | nullnullablerequired

    The error of the account's latest failed publish, shortened to 300 characters.

    reconnect_urlstring<uri>required

    Where a workspace member reconnects the account.

  • ]
  • PreflightResult
    {
    "valid": true,
    "errors": {},
    "issues": [
    {
    "message": "string",
    "code": "duplicate_post",
    "account_id": 0,
    "existing_post_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "limit": 0,
    "used": 0
    }
    ],
    "warnings": [
    {
    "code": "string",
    "account_id": 0,
    "message": "string"
    }
    ],
    "publish_at": "2024-07-29T15:51:28.071Z",
    "accounts": [
    {
    "id": 0,
    "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "string",
    "provider": "string",
    "authorized": true,
    "has_token": true,
    "healthy": true,
    "daily_cap": {
    "limit": 0,
    "used_today": 0
    },
    "connection": {
    "status": "healthy",
    "expiry_kind": "access",
    "expires_at": "2024-07-29T15:51:28.071Z",
    "days_left": 0,
    "refreshable": true,
    "note": "string",
    "reconnect_reason": "Unknown Type: object,null",
    "last_success_at": "2024-07-29T15:51:28.071Z",
    "last_error": "string",
    "reconnect_url": "string"
    }
    }
    ]
    }