Sprkly Posts API

The Posts API from Sprkly — 3 operation(s) for posts.

GitHub OpenAPI

Operations 6

GET /api/v1/posts List posts #
POST /api/v1/posts Create / schedule a post #
POST /api/v1/posts/schedule Schedule a post (alias of POST /api/v1/posts) #
GET /api/v1/posts/{id} Get a post #
PATCH /api/v1/posts/{id} Update a post #
DELETE /api/v1/posts/{id} Delete a post #

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/sprkly-app:sprkly-app-posts-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

sprkly-app-posts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: sprkly Posts API
  version: 1.0.0
  description: 'Schedule and publish social media posts (Instagram, TikTok, YouTube Shorts, Threads, Facebook, Bluesky, X, LinkedIn, Telegram) programmatically. Authenticate with a Bearer API key created in Settings. API requests a month: Free 3,000, Creator and Brand 7,500, Pro 15,000, Agency 30,000 (MCP calls do not count; MCP has no monthly limit); requests a minute: Free 20, every paid plan 60. Over either limit the API answers 429 with code rate_limited or monthly_quota_exceeded, a Retry-After header, and X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (monthly) and X-RateLimit-Burst (per minute). Every error body is { error, code }.'
  contact:
    email: support@sprkly.app
    url: https://sprkly.app/docs/api
servers:
- url: https://sprkly.app
security:
- apiKey: []
tags:
- name: Posts
paths:
  /api/v1/posts:
    get:
      summary: List posts
      description: 'Newest first (by createdAt). With updatedAfter, oldest change first (by updatedAt). Deleted posts are left out (scope: post:read). A key limited to some accounts sees only posts on them.'
      parameters:
      - name: status
        in: query
        schema:
          type: string
          enum:
          - draft
          - pending_approval
          - scheduled
          - posted
          - failed
      - name: updatedAfter
        in: query
        schema:
          type: string
          format: date-time
        description: Only posts changed at or after this time, oldest change first. Send the updatedAt of the last post on the page. If count equals limit, call again. Skip a post only when you already have the same id and the same updatedAt.
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 500
          default: 100
      responses:
        '200':
          description: Posts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostList'
        '400':
          description: updatedAfter is not an ISO 8601 time (invalid_updated_after)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Posts
      operationId: getApiV1Posts
      x-operation-id-source: derived
    post:
      summary: Create / schedule a post
      description: 'Creates a scheduled post; sprkly publishes it at scheduledTime (scope: post:write).'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePostRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePostResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Scope, plan or account limit refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: duplicate_external_id or duplicate content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit or monthly quota reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Posts
      operationId: postApiV1Posts
      x-operation-id-source: derived
  /api/v1/posts/schedule:
    post:
      summary: Schedule a post (alias of POST /api/v1/posts)
      description: 'Same body and answers as POST /api/v1/posts (scope: post:write).'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePostRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePostResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Scope, plan or account limit refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: duplicate_external_id or duplicate content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit or monthly quota reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Posts
      operationId: postApiV1PostsSchedule
      x-operation-id-source: derived
  /api/v1/posts/{id}:
    get:
      summary: Get a post
      description: 'Returns the post with status, failedReason, publishedAt and permalink (scope: post:read). A deleted post still answers, with deleted: true.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Post
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Post'
        '404':
          description: Not found, or outside the key’s accounts (post_not_found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Posts
      operationId: getApiV1PostsById
      x-operation-id-source: derived
    patch:
      summary: Update a post
      description: 'Changes a post that has not gone out (scope: post:write). The same rules as the app: caption limits, a future time, approval locks. A failed post is never sent again, so it cannot be changed.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePostRequest'
      responses:
        '200':
          description: The updated post
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatePostResponse'
        '400':
          description: Invalid change, for example no_fields, media_not_found, caption_too_long or scheduled_time_in_past
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found, deleted, or outside the key’s accounts (post_not_found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: post_failed, already_published, not_editable (also when sprkly already tried to send it), duplicate_content, approval_pending, publishing_now, post_changed, stuck_publishing or schedule_horizon_exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: X post cap reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Posts
      operationId: patchApiV1PostsById
      x-operation-id-source: derived
    delete:
      summary: Delete a post
      description: 'Moves the post to the Bin (scope: post:write). The owner can restore it in the app for 30 days. A post that went out cannot be deleted here. A later GET of the post shows deleted: true.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Moved to the Bin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletePostResponse'
        '404':
          description: Not found, already deleted, or outside the key’s accounts (post_not_found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: already_published, publishing_now, post_changed or stuck_publishing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Posts
      operationId: deleteApiV1PostsById
      x-operation-id-source: derived
components:
  schemas:
    PostList:
      type: object
      properties:
        posts:
          type: array
          items:
            $ref: '#/components/schemas/Post'
        count:
          type: integer
    CreatePostResponse:
      type: object
      properties:
        postIds:
          type: array
          items:
            type: string
          description: One post per account.
        status:
          type: string
          enum:
          - scheduled
          - pending_approval
        approvalIds:
          type: array
          items:
            type: string
          description: Only when requiresApproval was true.
        scheduledTime:
          type: string
          format: date-time
        media:
          type: object
          additionalProperties: true
          description: willPublishAs, plus sizes and advisories when there are any.
    CreatePostRequest:
      type: object
      description: 'Send platforms, profileIds, or both. profileIds alone is enough: the accounts name the platforms.'
      properties:
        platforms:
          type: array
          items:
            type: string
            enum:
            - instagram
            - tiktok
            - youtube
            - threads
            - facebook
            - bluesky
            - x
            - linkedin
            - telegram
        profileIds:
          type: array
          items:
            type: string
          description: Connected account IDs from GET /api/v1/connections.
        caption:
          type: string
        title:
          type: string
          description: Required for YouTube and TikTok.
        mediaUrls:
          type: array
          items:
            type: string
            format: uri
          description: 'Publicly reachable URLs, in slide order. Usable for every platform: Instagram and Threads fetch them directly, and for TikTok, YouTube and Facebook sprkly downloads the file into its own storage during this request, so a bad link is a 422 here rather than a publish-time failure later. Google Drive and Dropbox share links are converted automatically. 50 MB per file. Use mediaIds instead when the file is already in sprkly or is going on several posts.'
        mediaId:
          type: string
          description: A single id returned from POST /api/v1/media. Shorthand for a one-item mediaIds.
        mediaIds:
          type: array
          items:
            type: string
          description: Ids from POST /api/v1/media, in slide order. This is the carousel and photo-set path. Array order is the published order. Instagram takes at most 20 slides; TikTok photo sets take up to 35 and every image must be the same pixel size (mismatches are padded automatically).
        scheduledTime:
          type: string
          format: date-time
          description: ISO-8601. Omit to publish as soon as possible.
        externalId:
          type: string
          description: Caller-supplied idempotency key. A repeat answers 409 duplicate_external_id instead of a second post.
        requiresApproval:
          type: boolean
          description: Hold the post as pending_approval until the owner approves it. A plan without approvals is refused with upgrade_required.
        postType:
          type: string
          description: What the post is for. Optional label.
        platformMeta:
          type: object
          additionalProperties: true
    Error:
      type: object
      required:
      - error
      - code
      properties:
        error:
          type: string
          description: A sentence for a human.
        code:
          type: string
          description: A stable machine code, for example invalid_api_key, post_not_found, post_failed.
        details:
          type: object
          additionalProperties: true
          description: Optional context, such as sizes or a slide index.
    DeletePostResponse:
      type: object
      properties:
        id:
          type: string
        deleted:
          type: boolean
          const: true
        previousStatus:
          type: string
        recoverable:
          type: boolean
          const: true
          description: The owner can restore it from the Bin in the app for 30 days.
    UpdatePostResponse:
      allOf:
      - $ref: '#/components/schemas/Post'
      - type: object
        properties:
          additionalPostIds:
            type: array
            items:
              type: string
            description: New posts made when the edit added accounts.
          approvalId:
            type: string
            description: 'Set when the owner had approved the post: the edit sent it back for approval.'
    UpdatePostRequest:
      type: object
      description: Send at least one field (none is 400 no_fields). Only posts with status scheduled, pending_approval or draft that sprkly has not tried to send can change. An approved post that you change goes back for approval (approvalId).
      properties:
        caption:
          type: string
        scheduledTime:
          type: string
          format: date-time
          description: Must be in the future.
        profileIds:
          type: array
          items:
            type: string
          description: Replacement accounts. Each extra account becomes its own new post (additionalPostIds).
        mediaId:
          type: string
          description: Shorthand for a one-item mediaIds.
        mediaIds:
          type: array
          items:
            type: string
          description: Replaces the whole media set, in slide order. Clears alt text unless altText is sent too.
        altText:
          type: array
          items:
            type: string
          description: One entry per media item, in order. Use "" for none.
        postType:
          type: string
          description: Send "" to clear it.
    Post:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
          - draft
          - pending_approval
          - scheduled
          - posted
          - failed
          description: A post that is going out right now still reads scheduled. Some older posts read published, which means posted.
        caption:
          type:
          - string
          - 'null'
        platforms:
          type: array
          items:
            type: string
        profileIds:
          type: array
          items:
            type: string
        mediaUrls:
          type: array
          items:
            type: string
        scheduledTime:
          type:
          - string
          - 'null'
          format: date-time
        publishedAt:
          type:
          - string
          - 'null'
          format: date-time
        failedReason:
          type:
          - string
          - 'null'
        externalId:
          type:
          - string
          - 'null'
        permalink:
          type:
          - string
          - 'null'
        platformMeta:
          type:
          - object
          - 'null'
          additionalProperties: true
        createdAt:
          type:
          - string
          - 'null'
          format: date-time
        updatedAt:
          type:
          - string
          - 'null'
          format: date-time
        deleted:
          type: boolean
          description: True when the post is in the Bin. It will not go out. status keeps the value it had.
        deletedAt:
          type:
          - string
          - 'null'
          format: date-time
          description: When the post moved to the Bin. Null when it is not deleted.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'sprkly API key created in Settings, sent as `Authorization: Bearer <key>`. Scopes: post:write, post:read, media:write, account:read, automation:read, automation:write. inbox:read and inbox:write are for the MCP inbox tools and are only on keys made with inbox access ticked.'