FoPost Validation API

Check content and media before a post exists

GitHub OpenAPI

Operations 4

POST /v1/validate/post Validate content for a set of platforms #
POST /v1/validate/length Check text length against platform limits #
POST /v1/validate/media Check a media file by URL #
GET /v1/validate/subreddit Check a subreddit #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/fopost-com:fopost-com-validation-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

fopost-com-validation-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FoPost Validation API
  version: 1.0.0
  description: 'REST API for FoPost — schedule, publish, and analyze social media content across every connected platform.


    ## Authentication


    Programmatic access uses an API key sent in the `X-API-Key` header. Keys are created in the FoPost dashboard under **Developers → API Keys** and are limited to the scopes granted at creation. Requests from the FoPost dashboard use a JWT bearer token instead (`Authorization: Bearer `), which implicitly carries all scopes. Either method works on every endpoint in this document unless noted otherwise.


    ## Scopes


    Each operation lists its required scope (also machine-readable as `x-fopost-scope`): `posts` (includes publishing, deliveries, and media), `workspaces`, `accounts`, `labels`, `webhooks`, `analytics`, `automations`.


    ## Responses


    Every key in a response body and every query parameter is snake_case; request bodies keep the field names documented on each operation. The ads endpoints (`/v1/ads/*`) are the one exception and keep camelCase keys. A single resource is returned as the object itself (`201` on create); a collection is `{ "data": [...], "meta": {...} }`. A success with nothing to return is `204` with an empty body.


    ## Errors


    Errors return `{ "error": "", "message": "" }` with a matching HTTP status, including an unknown route (`404 not_found`) and a server fault (`500 internal_error`). `error` is a stable snake_case code; `message` is for humans and may change. Some errors include additional context fields. A feature that is not set up on this deployment answers `503 not_configured`; a malformed answer from an upstream provider answers `502 upstream_error`.


    ## Request ids


    Every response carries an `X-Request-Id` header. Quote it when contacting support about a specific request.


    ## Rate limiting


    Requests are rate limited per API key, per minute, with a ceiling set by the plan behind the key. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`; exceeding the limit returns `429` with error code `too_many_requests`, a `retry_after` field and a `Retry-After` header. Mutating endpoints additionally require an active subscription and return `403` with error code `subscription_required` without one.


    ## Pagination


    Offset-paged lists accept `page` and `per_page` (1 to 100) and return `meta: { page, per_page, total, total_pages }`. Cursor-paged lists return `meta: { next_cursor, has_more }`; pass `next_cursor` back in the cursor parameter the operation documents until `has_more` is false. Lists that do not paginate return `{ "data": [...] }` with no `meta`.'
  contact:
    name: FoPost Support
    url: https://fopost.com/contact
  license:
    name: Proprietary
    url: https://fopost.com/terms
servers:
- url: https://api.fopost.com
  description: Production
security:
- ApiKeyAuth: []
- BearerAuth: []
- OAuth2: []
tags:
- name: Validation
  description: Check content and media before a post exists
paths:
  /v1/validate/post:
    post:
      operationId: validatePost
      summary: Validate content for a set of platforms
      tags:
      - Validation
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidatePostResponse'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'The same checks as preflight, for content that has not been saved as a post. Returns hard blockers (`issues`) and advisory content quality signals per platform. Nothing is stored.


        Requires the `posts` scope when using an API key.'
      x-fopost-scope: posts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidatePostRequest'
  /v1/validate/length:
    post:
      operationId: validateLength
      summary: Check text length against platform limits
      tags:
      - Validation
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateLengthResponse'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Counts the text the way each platform does (some bill every link at a flat rate, some count bytes) and compares it with the platform limit.


        Requires the `posts` scope when using an API key.'
      x-fopost-scope: posts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateLengthRequest'
  /v1/validate/media:
    post:
      operationId: validateMedia
      summary: Check a media file by URL
      tags:
      - Validation
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateMediaResponse'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          description: The link could not be fetched (`fetch_failed`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
      description: 'Fetches the file and runs the upload checks on it: allowed type, bytes that match the declared type, and the size ceiling. The file is not stored. A URL that cannot be fetched, including one that points at a private address, is a `400`.


        Requires the `posts` scope when using an API key.'
      x-fopost-scope: posts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateMediaRequest'
  /v1/validate/subreddit:
    get:
      operationId: validateSubreddit
      summary: Check a subreddit
      tags:
      - Validation
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SubredditCheck'
                required:
                - data
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: The account holds no usable token, or its grant is short of a permission this read needs (`reconnect_required`); reconnect it
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          description: Reddit did not answer (`platform_error`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
      description: 'Whether a subreddit exists and takes a post from a connected Reddit account. The check runs with that account''s token, so `account_id` is required.


        Requires the `posts` scope when using an API key.'
      x-fopost-scope: posts
      parameters:
      - name: account_id
        in: query
        required: true
        schema:
          type: string
          format: uuid
        description: The Reddit account to check as
      - name: name
        in: query
        required: true
        schema:
          type: string
        description: Subreddit name without the `r/` prefix
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Stable snake_case error code
        message:
          type: string
          description: Human-readable explanation; may change
      required:
      - error
      - message
      additionalProperties: true
      description: The one error envelope, on every endpoint including an unknown route (`not_found`) and a server fault (`internal_error`). Some errors carry additional context fields (for example `retry_after`, `upgrade_url`, `issues`). Every response also carries an `X-Request-Id` header to quote to support.
    SubredditCheck:
      type: object
      properties:
        subreddit:
          type: string
        exists:
          type: boolean
        can_post:
          type: boolean
        over_18:
          type: boolean
        flair_enabled:
          type: boolean
        ok:
          type: boolean
          description: True when the subreddit exists and takes a post from this account
    ValidateMediaResponse:
      type: object
      properties:
        ok:
          type: boolean
        issues:
          type: array
          items:
            type: string
        name:
          type: string
        size:
          type: integer
          description: Bytes fetched
        mime_type:
          type: string
          description: The verified type; absent when the file failed
        type:
          type: string
          description: image, video, audio or document; absent when the file failed
      required:
      - ok
      - issues
      - name
      - size
    ValidateLengthResponse:
      type: object
      properties:
        ok:
          type: boolean
        platforms:
          type: array
          items:
            type: object
            properties:
              platform:
                type: string
              length:
                type: integer
                description: What the platform counts, in `unit`
              limit:
                type:
                - integer
                - 'null'
                description: The platform limit; null when it has none
              unit:
                type: string
                enum:
                - chars
                - bytes
              ok:
                type: boolean
              signals:
                type: array
                items:
                  $ref: '#/components/schemas/ContentSignal'
      required:
      - ok
      - platforms
    ContentSignal:
      type: object
      properties:
        level:
          type: string
          enum:
          - info
          - warn
        code:
          type: string
        message:
          type: string
      required:
      - level
      - code
      - message
    ValidateLengthRequest:
      type: object
      properties:
        text:
          type: string
          maxLength: 50000
        platforms:
          type: array
          items:
            type: string
            enum:
            - twitter
            - instagram
            - instagram-business
            - facebook
            - linkedin
            - linkedin-page
            - tiktok
            - youtube
            - bluesky
            - threads
            - mastodon
            - lemmy
            - pinterest
            - snapchat
            - telegram
            - twitch
            - discord
            - slack
            - reddit
            - tumblr
            - dribbble
            - mewe
            - devto
            - hashnode
            - medium
            - substack
            - google-business
            - kick
            - listmonk
            - nostr
            - whop
            - skool
            - whatsapp
          minItems: 1
          description: Platforms to check the content against
      required:
      - text
      - platforms
    ValidatePostResponse:
      type: object
      properties:
        ready:
          type: boolean
        platforms:
          type: array
          items:
            type: object
            properties:
              platform:
                type: string
              ready:
                type: boolean
              issues:
                type: array
                items:
                  type: string
                description: Hard blockers that would prevent publishing
              score:
                type: number
                description: Advisory 0-100 content quality score for this platform
              signals:
                type: array
                items:
                  $ref: '#/components/schemas/ContentSignal'
                description: Advisory signals — they never block publishing
      required:
      - ready
      - platforms
    ValidateMediaRequest:
      type: object
      properties:
        url:
          type: string
          maxLength: 2048
          format: uri
          description: Public http(s) URL of the file to check
      required:
      - url
    ValidatePostRequest:
      type: object
      properties:
        content:
          type: string
          maxLength: 50000
          default: ''
          description: The post text
        media:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                maxLength: 2048
                format: uri
              mime_type:
                type: string
                minLength: 1
                maxLength: 100
                description: MIME type of the file
              size:
                type: integer
                exclusiveMinimum: 0
                description: File size in bytes
            required:
            - url
            - mime_type
          maxItems: 20
          default: []
        platforms:
          type: array
          items:
            type: string
            enum:
            - twitter
            - instagram
            - instagram-business
            - facebook
            - linkedin
            - linkedin-page
            - tiktok
            - youtube
            - bluesky
            - threads
            - mastodon
            - lemmy
            - pinterest
            - snapchat
            - telegram
            - twitch
            - discord
            - slack
            - reddit
            - tumblr
            - dribbble
            - mewe
            - devto
            - hashnode
            - medium
            - substack
            - google-business
            - kick
            - listmonk
            - nostr
            - whop
            - skool
            - whatsapp
          minItems: 1
          description: Platforms to check the content against
      required:
      - platforms
  responses:
    ValidationError:
      description: Request body or parameters failed validation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    Unauthorized:
      description: Missing or invalid credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    NotFound:
      description: Resource not found or not accessible to the authenticated user
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    RateLimited:
      description: Too many requests for this API key in the current minute. The body carries `retry_after` (seconds) and the response carries `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    Forbidden:
      description: The API key lacks the required scope, or a mutating route was called without an active subscription (`subscription_required`)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
  headers:
    XRequestId:
      description: Unique id of this request; quote it to support
      schema:
        type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key created in the FoPost dashboard. A key may be bound to a single workspace, in which case every request is confined to it: naming any other workspace returns 403, and listings return only that workspace. Keys created without a workspace keep access to every workspace on the account.'
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Session token used by the FoPost dashboard
    OAuth2:
      type: oauth2
      description: For third-party apps acting on behalf of a FoPost user. Authorization code with PKCE (S256) is required. The token is confined to the workspace the user approved and to the scopes they granted.
      flows:
        authorizationCode:
          authorizationUrl: https://api.fopost.com/oauth/authorize
          tokenUrl: https://api.fopost.com/oauth/token
          refreshUrl: https://api.fopost.com/oauth/token
          scopes:
            posts: Read and write posts, media and content
            publish: Publish, retry and cancel a post
            accounts: Connected social accounts
            workspaces: List and manage workspaces
            labels: Labels used to organise posts
            webhooks: Webhook endpoints
            analytics: Metrics and insights
            automations: Automation rules and runs
            inbox: Comments, mentions and messages
            ads: Ads, audiences and lead forms across ad networks
            ai: AI features (spends credits)
            extension: Reserved for the browser extension