Skip to main content

PreflightResult

validbooleanrequired

True when create-post with the same body would succeed.

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]

    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.

  • ]
  • publish_atstring,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.

    used_todayintegerrequired

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

  • ]
  • 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
    }
    ],
    "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
    }
    }
    ]
    }