> ## 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.

# Retry post

> Retry a failed post. Re-attempts publishing to every account that errored; returns 202 straight away while it runs.

Retry a post whose status is `FAILED` or `PARTIALLY_PUBLISHED`.

Only the accounts that failed to publish are re-attempted. Accounts that
already published are left untouched, so retrying never double-posts.

The response is `202` with `status: "PUBLISHING"` as soon as the retry starts. When it finishes, [Get post](https://tryunsora.com/docs/api-reference/posts/get_post.md) shows the per-account outcome:

| Outcome | Status |
| - | - |
| Every account published | `PUBLISHED` |
| Some accounts published, some failed | `PARTIALLY_PUBLISHED` |
| No account published | `FAILED` |

> [!NOTE]
>
> Transient platform errors (for example Instagram's "media is not ready for
> publishing", code 9007) are retried automatically with backoff during
> publishing, so most posts never need a manual retry. Use this endpoint for
> errors that needed intervention first — such as reconnecting an expired
> account.


## OpenAPI

````yaml POST /posts/{id}/retry
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}/retry:
    post:
      tags:
        - Scheduler
      summary: Retry the failed accounts of a post
      description: >-
        Publishes again to the accounts that have not published on a FAILED or
        PARTIALLY_PUBLISHED post. Accounts that already published are not posted
        again. Runs the same checks as POST /posts/{id}/publish and returns 202
        with status PUBLISHING; poll GET /posts/{id} for the outcome. Requires
        an active paid plan.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '202':
          description: Retry started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishPostResponse'
        '400':
          description: >-
            The post can't be retried. `code` is NOT_RETRYABLE (the post is
            DRAFT or SCHEDULED), POST_PUBLISHED, ACCOUNT_REQUIRED,
            MEDIA_REQUIRED, MEDIA_NOT_ALLOWED, MIXED_MEDIA, CAPTION_REQUIRED,
            UNSUPPORTED_FORMAT, PLATFORM_RULES (a platform limit is broken; see
            `issues`) or PLATFORM_UNAVAILABLE (a platform on the post is
            switched off).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostRuleErrorResponse'
        '403':
          description: 'PLAN_REQUIRED: no active paid plan.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Post not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: 'POST_PUBLISHING: the post is already publishing.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    PublishPostResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
          description: '"Publishing started" or "Retry started".'
        data:
          type: object
          properties:
            postId:
              type: string
            status:
              type: string
              enum:
                - PUBLISHING
            results:
              type: array
              items:
                type: object
                additionalProperties: true
              description: >-
                Always empty. Per-account results are on the post (GET
                /posts/{id}).
          required:
            - postId
            - status
            - results
      required:
        - success
        - message
        - data
    PostRuleErrorResponse:
      type: object
      description: A post that can't be published as sent.
      properties:
        success:
          type: boolean
        error:
          type: string
          description: What to fix, in plain words.
        code:
          type: string
          description: >-
            Why the post was rejected, e.g. MEDIA_REQUIRED, MEDIA_NOT_ALLOWED,
            MIXED_MEDIA, CAPTION_REQUIRED, UNSUPPORTED_FORMAT, PLATFORM_RULES,
            PLATFORM_UNAVAILABLE, ACCOUNT_REQUIRED, POST_PUBLISHED,
            NOT_RETRYABLE, INVALID_DATE or SCHEDULE_IN_PAST.
        issues:
          type: array
          description: 'PLATFORM_RULES only: one entry per problem.'
          items:
            type: object
            properties:
              provider:
                type: string
                description: Platform the problem is on, e.g. instagram.
              level:
                type: string
                enum:
                  - error
              code:
                type: string
              message:
                type: string
      required:
        - success
        - error
        - code
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        error:
          type: string
        code:
          type: string
        message:
          type: string
      required:
        - error
  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.