﻿<head><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4357510538660394"
     crossorigin="anonymous"></script></head>> ## Documentation Index
> Fetch the complete documentation index at: https://tryunsora.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get post

> Fetch a single post by ID, including its schedule time, target platforms, media attachments, captions, and per-platform publish status.



## OpenAPI

````yaml GET /posts/{id}
openapi: 3.1.0
info:
  title: Unsora API
  version: 1.4.0
  description: >-
    Public API for Unsora integrations. Authenticate with an Unsora API key
    (`uns_…`, created under Developers → API keys in the app) as a Bearer token
    in the Authorization header. Limit: 60 requests per minute per key; over it,
    429 with code RATE_LIMIT_EXCEEDED.
servers:
  - url: https://mvp.tryunsora.com/api/v1
    description: Production
  - url: /api/v1
    description: This server
security: []
tags:
  - name: User
  - name: Models
    description: >-
      Every video, image and motion-control model, with each model's inputs
      taken from the provider's own request schema and prices quoted live. One
      generate endpoint covers all of them.
  - name: Video
  - name: Image
  - name: Influencer
  - name: Thumbnail
  - name: Clipping
  - name: Music
  - name: Voiceover
  - name: Upscaler
  - name: Subtitle removal
  - name: Motion control
  - name: Avatar
  - name: Movie materials
  - name: Voice clones
  - name: Voice changer
  - name: Uploads
  - name: Scheduler
paths:
  /posts/{id}:
    get:
      tags:
        - Scheduler
      summary: Get one post
      description: >-
        Returns the full post record. After publish or retry, poll this until
        `status` is PUBLISHED, PARTIALLY_PUBLISHED or FAILED. Per-account
        results are in `postAccounts` (`published`, `publishedUrl`, `error`).
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Post record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostResponse'
        '404':
          description: Post not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    PostResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/Post'
      required:
        - success
        - data
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        error:
          type: string
        code:
          type: string
        message:
          type: string
      required:
        - error
    Post:
      type: object
      properties:
        id:
          type: string
        userId:
          type: string
        type:
          type: string
          enum:
            - VIDEO
            - IMAGE
            - CAROUSEL
            - TEXT
        mainCaption:
          type: string
        status:
          type: string
          enum:
            - DRAFT
            - SCHEDULED
            - PUBLISHING
            - PUBLISHED
            - PARTIALLY_PUBLISHED
            - FAILED
          description: >-
            PUBLISHED: every account published. PARTIALLY_PUBLISHED: at least
            one account published and at least one failed. FAILED: no account
            published.
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: Summary of the last publishing failure.
        scheduledFor:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        scheduledTimezone:
          anyOf:
            - type: string
            - type: 'null'
        publishedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        source:
          type: string
          enum:
            - WEB
            - API
            - MCP
          description: >-
            Where the post was created: the web app, the REST API, or the Unsora
            MCP server (requests with header X-Unsora-Client: mcp).
        apiKeyId:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            API key used to create the post. Null when it was created with a
            Clerk session or OAuth token.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        media:
          type: array
          items:
            $ref: '#/components/schemas/PostMedia'
          description: Sorted by order.
        postAccounts:
          type: array
          items:
            $ref: '#/components/schemas/PostAccount'
      required:
        - id
        - type
        - mainCaption
        - status
        - scheduledFor
        - source
        - createdAt
        - media
        - postAccounts
    PostMedia:
      type: object
      properties:
        id:
          type: string
        postId:
          type: string
        type:
          type: string
          enum:
            - VIDEO
            - IMAGE
            - THUMBNAIL
        order:
          type: integer
        assetId:
          type: string
        asset:
          $ref: '#/components/schemas/PostMediaAsset'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - postId
        - type
        - order
        - assetId
        - asset
    PostAccount:
      type: object
      description: One account a post targets, with its publish result.
      properties:
        id:
          type: string
        postId:
          type: string
        accountId:
          type: string
        customCaption:
          anyOf:
            - type: string
            - type: 'null'
        title:
          anyOf:
            - type: string
            - type: 'null'
        settings:
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Platform options stored for this account (the matching entry of
            PostPlatformSettings).
        published:
          type: boolean
        publishedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        publishedPostId:
          anyOf:
            - type: string
            - type: 'null'
          description: Post id on the platform.
        publishedUrl:
          anyOf:
            - type: string
            - type: 'null'
          description: Public URL of the post on the platform.
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: Error from the last publish attempt for this account.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        account:
          type: object
          properties:
            id:
              type: string
            provider:
              type: string
              description: >-
                google (YouTube), tiktok, instagram, facebook, threads, bluesky,
                pinterest, linkedin, x or google_business (one account per
                Business Profile location).
            accountName:
              anyOf:
                - type: string
                - type: 'null'
            accountUsername:
              anyOf:
                - type: string
                - type: 'null'
            profilePicture:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - id
            - provider
      required:
        - id
        - postId
        - accountId
        - published
        - account
    PostMediaAsset:
      type: object
      properties:
        id:
          type: string
        userId:
          type: string
        name:
          type: string
        url:
          type: string
          format: uri
        mimeType:
          type: string
        type:
          type: string
          enum:
            - IMAGE
            - VIDEO
            - AUDIO
            - DOCUMENT
        source:
          type: string
          enum:
            - UPLOAD
            - GENERATION
            - PROCESSING
            - EXPORT
            - SYSTEM
        folderId:
          anyOf:
            - type: string
            - type: 'null'
          description: Library folder the file is in, if any.
        fileSize:
          anyOf:
            - type: string
            - type: 'null'
          description: Size in bytes, serialized as a string.
        width:
          anyOf:
            - type: integer
            - type: 'null'
        height:
          anyOf:
            - type: integer
            - type: 'null'
        duration:
          anyOf:
            - type: number
            - type: 'null'
          description: Duration in seconds.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - url
        - mimeType
        - type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Unsora API key (`uns_…`). A Clerk session token also works.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.