ADMI ENTERPRISES s.r.o. Targets API

One network's copy of a post: its figures, comments and the live post.

GitHub OpenAPI

Operations 8

POST /posts/{id}/targets/{targetId}/metrics Fetch this target's figures from the network now #
GET /posts/{id}/targets/{targetId}/metrics/history Every reading of this target's figures, oldest first #
GET /posts/{id}/targets/{targetId}/insights YouTube retention curve and traffic sources #
GET /posts/{id}/targets/{targetId}/comments Comments under this target, read live from the network #
POST /posts/{id}/targets/{targetId}/comments/{commentId} Reply to, edit, hide, like or delete a comment #
PATCH /posts/{id}/targets/{targetId}/remote Edit the live post on the network #
DELETE /posts/{id}/targets/{targetId}/remote Take the live post down from the network #
PATCH /posts/{id}/targets/{targetId}/account Point this target at another account of the same network #

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/preflight-social:preflight-social-targets-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

preflight-social-targets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Preflight Targets API
  version: 2026.10.24
  summary: Schedule, validate and publish social media posts to twelve networks.
  description: 'Preflight (preflight.social) is a social media scheduler that checks every post against each network''s real publishing rules before it leaves. This is its REST API: upload a file, create and schedule a post to YouTube, TikTok, Instagram, Facebook, Threads, LinkedIn, Pinterest, Bluesky, Mastodon, Telegram, Discord and Tumblr, read its figures, act on comments, edit or take it down. The same workspace is reachable by AI assistants over MCP at https://preflight.social/mcp. Prose documentation: https://preflight.social/documentation. API keys, webhooks and the MCP server come with every plan, Free included.'
  termsOfService: https://preflight.social/terms
  contact:
    name: Preflight
    url: https://preflight.social
    email: info@preflight.social
servers:
- url: https://preflight.social/v1
security:
- apiKey: []
tags:
- name: Targets
  description: 'One network''s copy of a post: its figures, comments and the live post.'
paths:
  /posts/{id}/targets/{targetId}/metrics:
    parameters:
    - $ref: '#/components/parameters/postId'
    - $ref: '#/components/parameters/targetId'
    post:
      tags:
      - Targets
      operationId: fetchTargetMetrics
      summary: Fetch this target's figures from the network now
      responses:
        '200':
          description: The latest figures.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
  /posts/{id}/targets/{targetId}/metrics/history:
    parameters:
    - $ref: '#/components/parameters/postId'
    - $ref: '#/components/parameters/targetId'
    - name: since
      in: query
      schema:
        type: string
        format: date-time
    get:
      tags:
      - Targets
      operationId: targetMetricsHistory
      summary: Every reading of this target's figures, oldest first
      responses:
        '200':
          description: Readings, at most the latest 500.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /posts/{id}/targets/{targetId}/insights:
    parameters:
    - $ref: '#/components/parameters/postId'
    - $ref: '#/components/parameters/targetId'
    get:
      tags:
      - Targets
      operationId: targetInsights
      summary: YouTube retention curve and traffic sources
      responses:
        '200':
          description: Insights where the network reports them; supported false otherwise.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /posts/{id}/targets/{targetId}/comments:
    parameters:
    - $ref: '#/components/parameters/postId'
    - $ref: '#/components/parameters/targetId'
    get:
      tags:
      - Targets
      operationId: listComments
      summary: Comments under this target, read live from the network
      responses:
        '200':
          description: The comments and what the account may do with them.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Comment'
                  supported:
                    type: boolean
                  can:
                    type: object
                    properties:
                      reply:
                        type: boolean
                      edit:
                        type: boolean
                      hide:
                        type: boolean
                      like:
                        type: boolean
                      delete:
                        type: boolean
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /posts/{id}/targets/{targetId}/comments/{commentId}:
    parameters:
    - $ref: '#/components/parameters/postId'
    - $ref: '#/components/parameters/targetId'
    - name: commentId
      in: path
      required: true
      schema:
        type: string
    post:
      tags:
      - Targets
      operationId: actOnComment
      summary: Reply to, edit, hide, like or delete a comment
      description: As the connected account, in public. Scope posts:publish.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - action
              properties:
                action:
                  type: string
                  enum:
                  - reply
                  - edit
                  - hide
                  - unhide
                  - like
                  - unlike
                  - delete
                text:
                  type: string
                  description: For reply and edit.
      responses:
        '200':
          description: Done; for a reply, the new comment.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
  /posts/{id}/targets/{targetId}/remote:
    parameters:
    - $ref: '#/components/parameters/postId'
    - $ref: '#/components/parameters/targetId'
    patch:
      tags:
      - Targets
      operationId: editPublishedPost
      summary: Edit the live post on the network
      description: 'Where canEditRemote is true: Facebook, YouTube, Mastodon, Telegram and Discord. Scopes posts:write and posts:publish.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                title:
                  type: string
                  description: YouTube only.
      responses:
        '200':
          description: The target as it is now.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Target'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
    delete:
      tags:
      - Targets
      operationId: deletePublishedPost
      summary: Take the live post down from the network
      description: Where canDeleteRemote is true. The target is marked skipped and the record kept. Scopes posts:write and posts:publish.
      responses:
        '200':
          description: Taken down.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Target'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
  /posts/{id}/targets/{targetId}/account:
    parameters:
    - $ref: '#/components/parameters/postId'
    - $ref: '#/components/parameters/targetId'
    patch:
      tags:
      - Targets
      operationId: moveTarget
      summary: Point this target at another account of the same network
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - accountId
              properties:
                accountId:
                  type: string
                  format: uuid
      responses:
        '200':
          description: Moved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Target'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  responses:
    BadRequest:
      description: The body did not validate (invalid_request; field says which).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such post, file or account in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Not possible in the current state, or the network does not allow it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, expired or unrecognised key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The key lacks the scope for this call.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    postId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    targetId:
      name: targetId
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Comment:
      type: object
      properties:
        id:
          type: string
        author:
          type:
          - string
          - 'null'
        text:
          type: string
        createdAt:
          type:
          - string
          - 'null'
          format: date-time
        own:
          type: boolean
          description: Written by the connected account.
        hidden:
          type: boolean
        likeCount:
          type:
          - integer
          - 'null'
    ValidationIssue:
      type: object
      required:
      - severity
      - message
      properties:
        platform:
          $ref: '#/components/schemas/Platform'
          description: Absent for a problem with the post as a whole, such as a file.
        severity:
          type: string
          enum:
          - error
          - warning
        message:
          type: string
        code:
          type: string
          description: 'For a plan limit: post_limit, upload_limit or channel_limit.'
    Platform:
      type: string
      enum:
      - youtube
      - tiktok
      - instagram
      - facebook
      - threads
      - twitter
      - linkedin
      - pinterest
      - bluesky
      - mastodon
      - telegram
      - discord
      - tumblr
      description: A network's name. twitter (X) is text-only and not offered to new accounts.
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: 'Stable: invalid_request, unauthorized, forbidden, not_found, post_limit, upload_limit, file_too_large, channel_limit, api_not_on_plan, ai_limit, ai_daily_limit, ai_not_in_plan, account_not_connected, media_unusable, already_started, targets_locked, in_flight, nothing_to_retry, nothing_waiting, unsupported, not_published, in_use, video_on_youtube, payload_too_large, validation_failed, ai_declined, rate_limited, ai_unavailable.'
            message:
              type: string
              description: Meant to be read by a person.
            field:
              type: string
              description: 'For invalid_request: which field.'
            limit:
              type: integer
              description: 'For a plan refusal: the allowance.'
            upgradeTo:
              type: string
              description: 'For a plan refusal: the first plan that would allow it.'
            issues:
              type: array
              items:
                $ref: '#/components/schemas/ValidationIssue'
              description: For validation_failed.
    Target:
      type: object
      properties:
        id:
          type: string
          format: uuid
        platform:
          $ref: '#/components/schemas/Platform'
        accountId:
          type: string
          format: uuid
        status:
          type: string
          enum:
          - pending
          - publishing
          - published
          - failed
          - skipped
        remoteId:
          type:
          - string
          - 'null'
        remoteUrl:
          type:
          - string
          - 'null'
          format: uri
        publishedAt:
          type:
          - string
          - 'null'
          format: date-time
        error:
          type:
          - string
          - 'null'
        errorCode:
          type:
          - string
          - 'null'
        errorPermanent:
          type: boolean
          description: Retrying cannot succeed without changing something.
        attempts:
          type: integer
        nextAttemptAt:
          type:
          - string
          - 'null'
          format: date-time
        canEditRemote:
          type: boolean
        canDeleteRemote:
          type: boolean
        options:
          type: object
          additionalProperties: true
        boostState:
          type:
          - object
          - 'null'
          description: 'Where options.boost stands: checkedAt and likes as last read; doneAt once it ran, with replyId and reposted, or expired when the window passed first.'
        metrics:
          type:
          - object
          - 'null'
          additionalProperties: true
          description: The latest figures, with fetchedAt.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: sk_live_…
      description: 'An API key from Settings → API keys (every plan). Scopes: posts:read, posts:write (drafts), posts:publish (anything that goes live), media:read, media:write, webhooks:read, webhooks:write, or * for everything. A missing scope answers 403 forbidden and names it.'
externalDocs:
  description: Documentation
  url: https://preflight.social/documentation