> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Put an account back on its posts

> After a reconnect, put the account back on the posts it was on before it was disconnected.

> [!NOTE]
>
> Needs `posts:update` and `posts:schedule`, and a role in the workspace that can edit and publish posts. See [Permissions](/docs/essentials/authentication.md#permissions).

Disconnecting an account takes it off every post it was on. When the same profile is connected again to the same workspace within 90 days, PostSyncer offers to put it back. [Get an account](/docs/api-reference/accounts/get.md) shows the offer in `posts_to_put_back`, and the workspace owner and managers get an [`account.posts_to_put_back`](/docs/api-reference/webhooks/overview#other-events) notification. Nothing changes until someone chooses: tell the user what `posts_to_put_back` says, and ask before you call this. `dismiss: true` closes the offer and changes no post.

Putting back only adds the account. Each post is handled on its own:

| The post now | What happens | `counts` key |
| - | - | - |
| A draft the disconnect took off the schedule, unchanged since, its time more than 5 minutes ahead | Scheduled again at the time it had | `scheduled_again` |
| Scheduled, or waiting for approval, its time more than 5 minutes ahead | The account is added; the time stays | `added_to_scheduled` |
| A draft | The account is added; it stays a draft | `added_to_draft`, `added_to_draft_time_passed`, `added_to_draft_changed` |
| A draft the plan's post limit won't let be scheduled again | The account is added; it stays a draft | `added_to_draft_refused` |
| Published, failed, sending, deleted, or due within 5 minutes | Left as it is | `skipped_went_out`, `skipped_deleted`, `skipped_time_passed` |
| Already on the account | Left as it is | `skipped_already_there` |

Nothing is published right away, and no post's text, media, time or other accounts change. The account's settings for each post (Pinterest board, TikTok privacy, YouTube title) come back as they were. A post an error stopped counts in `not_done` and stays as it was; calling again tries it again, and otherwise does nothing more.

## Published posts come back on their own

Posts the account had already published don't need this call. Right after the reconnect, PostSyncer links them to the new account again with their link, numbers, day-by-day analytics and comments, as they were when the account was disconnected. `relinked` says how many. That sends nothing: no post, first comment, auto plug, comment reply or notification goes out, and the posts' status doesn't change. Comments written on the network while the account was disconnected are read in later, but comment moderation doesn't act on them. A post that still has repeats to come is left out, so the account isn't added to its next repeats.

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `posts:update` or `posts:schedule`, or its user is inactive. | No: grant it in Settings → API. |
| 403 | | Your role in the workspace can't edit or publish posts. | No. |
| 404 | | No account with that id in the workspaces the key can reach. | No. |
| 409 | | Another call is putting these posts back right now. | Yes, in a moment. |
| 422 | | `dismiss` isn't `true` or `false`. | No: fix the request. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |

## Related

* [Get an account](/docs/api-reference/accounts/get.md): the offer, in `posts_to_put_back`.
* [Delete an account](/docs/api-reference/accounts/delete.md): what disconnecting does to posts.


## OpenAPI

````yaml POST /accounts/{id}/put-back-posts
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 12 social networks from your code: posts, media, comments,
    analytics, webhooks and more.
  version: 1.0.0
servers:
  - url: https://postsyncer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: The workspaces the key can reach.
  - name: Accounts
    description: Connected social accounts, links to connect more, and disconnecting them.
  - name: Posts
    description: Drafts, scheduled and published posts, approvals and a post's history.
  - name: Post settings
    description: A post's auto-plug, comment moderation and contact collection.
  - name: Media
    description: >-
      The media library: file uploads, URL imports, and reading videos and
      social posts' files.
  - name: Folders
    description: Folders that organise the media library.
  - name: Comments
    description: >-
      Comments on your posts: reading, replying, editing, hiding, deleting and
      syncing them.
  - name: Reviews
    description: Google Business Profile reviews and your replies to them.
  - name: Analytics
    description: Workspace, account and post performance.
  - name: Brand
    description: >-
      A workspace's brand: identity, voice, look, accounts, competitors,
      learnings and rules.
  - name: Labels
    description: Labels used to tag posts.
  - name: Campaigns
    description: Campaigns used to group posts.
  - name: Snippets
    description: Saved snippets and hashtag groups to drop into posts.
  - name: Webhooks
    description: Signed webhook endpoints that get your notification events.
  - name: Billing
    description: >-
      The owner's plan, invoices and the links that pay for, change or cancel
      it.
  - name: Team
    description: A workspace's teammates and invitations, and their roles.
  - name: Notifications
    description: >-
      Your bell and notification settings, and the workspace's Slack, Discord
      and Telegram channels.
  - name: Blog-to-social
    description: Blog feeds that turn a workspace's new articles into posts.
  - name: Products
    description: Products the workspace's posts can promote.
  - name: Contacts
    description: People who commented on the workspace's posts, and the lists they are on.
  - name: Profile
    description: 'The key''s user: their name and sign-in email.'
  - name: API keys
    description: 'Your API keys: listing and deleting them.'
  - name: Agent sign-up
    description: >-
      An AI agent signs a person up with a code emailed to them, and gets their
      first key. No key needed.
paths:
  /accounts/{id}/put-back-posts:
    post:
      tags:
        - Accounts
      summary: Put an account back on its posts
      description: >-
        Needs `posts:update`. Also needs `posts:schedule`, and a workspace role
        that can edit and publish posts. After a profile was disconnected and
        connected again to the same workspace (within 90 days), puts the new
        account back on the posts the old one was on; `dismiss: true` closes the
        offer instead and changes no post. It only adds the account: a post the
        disconnect moved to drafts is scheduled again at its time when nothing
        changed it since and that time is more than 5 minutes ahead; drafts stay
        drafts; published, failed and deleted posts, and posts due within 5
        minutes, are left alone. Nothing is published right away. Calling it
        again does nothing more. On the Free plan a post the month's 20 posts
        can't cover stays a draft (`added_to_draft_refused`).
      operationId: putBackAccountPosts
      parameters:
        - name: id
          in: path
          required: true
          description: The reconnected account's id.
          schema:
            type: integer
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                dismiss:
                  type: boolean
                  default: false
                  description: '`true` closes the offer and leaves every post as it is.'
            examples:
              default:
                summary: Put the account back
                value: {}
              dismiss:
                summary: Close the offer
                value:
                  dismiss: true
      responses:
        '200':
          description: Put back, or the offer closed.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PutBackResult'
                  - type: object
                    title: Dismissed
                    required:
                      - message
                      - dismissed
                    properties:
                      message:
                        type: string
                      dismissed:
                        type: boolean
                        enum:
                          - true
              examples:
                default:
                  summary: Back on 6 posts
                  value:
                    message: The account is back on 6 posts.
                    posts: 6
                    counts:
                      scheduled_again: 3
                      added_to_scheduled: 1
                      added_to_draft: 1
                      added_to_draft_time_passed: 1
                      added_to_draft_changed: 0
                      added_to_draft_refused: 0
                      skipped_deleted: 0
                      skipped_already_there: 0
                      skipped_went_out: 2
                      skipped_time_passed: 0
                      not_done: 0
                    relinked: 14
                    disconnected_at: '2030-03-10T08:45:00+00:00'
                nothing:
                  summary: Nothing to put back
                  value:
                    message: There was nothing to put back.
                    posts: 0
                    counts:
                      scheduled_again: 0
                      added_to_scheduled: 0
                      added_to_draft: 0
                      added_to_draft_time_passed: 0
                      added_to_draft_changed: 0
                      added_to_draft_refused: 0
                      skipped_deleted: 0
                      skipped_already_there: 0
                      skipped_went_out: 0
                      skipped_time_passed: 0
                      not_done: 0
                    relinked: 0
                    disconnected_at: null
                dismissed:
                  summary: The offer closed
                  value:
                    message: The offer is closed; no post changed.
                    dismissed: true
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: >-
            The key lacks `posts:update` or `posts:schedule`, its user is
            inactive, or your role in the workspace can't edit or publish posts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_permission:
                  summary: The key lacks posts:schedule
                  value:
                    message: >-
                      This API key does not have the "posts:schedule"
                      permission. Edit the key in PostSyncer under Settings →
                      API to grant it.
                role_edit:
                  summary: The role can't edit posts
                  value:
                    message: >-
                      Your role in the workspace "Halden Coffee" does not allow
                      you to edit posts. Ask the workspace owner or a manager to
                      do it, or to change your role.
                role_publish:
                  summary: The role can't publish posts
                  value:
                    message: >-
                      Your role in the workspace "Halden Coffee" does not allow
                      you to publish posts. Ask the workspace owner or a manager
                      to do it, or to change your role.
                inactive_account:
                  summary: The key's user is inactive
                  value:
                    message: Your account is inactive.
        '404':
          $ref: '#/components/responses/NotFound404'
        '409':
          description: >-
            Another call is putting these posts back right now. Nothing changed;
            try again in a moment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                busy:
                  summary: Being put back already
                  value:
                    message: >-
                      These posts are being put back already. Try again in a
                      moment.
        '422':
          description: '`dismiss` isn''t true or false.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                dismiss:
                  summary: dismiss isn't a boolean
                  value:
                    message: The dismiss field must be true or false.
                    errors:
                      dismiss:
                        - The dismiss field must be true or false.
        '429':
          $ref: '#/components/responses/RateLimited429'
components:
  schemas:
    PutBackResult:
      type: object
      title: Put back
      required:
        - message
        - posts
        - counts
        - relinked
        - disconnected_at
      properties:
        message:
          type: string
          description: What happened, in words.
        posts:
          type: integer
          description: Posts the account was put back on.
        counts:
          $ref: '#/components/schemas/PutBackCounts'
        relinked:
          type: integer
          description: >-
            Published posts already linked to the account again, with their
            link, numbers and comments. That happens on its own at the reconnect
            and sends nothing.
        disconnected_at:
          type: string
          format: date-time
          nullable: true
          description: When the profile was disconnected; null when there was no offer.
    Error:
      type: object
      description: >-
        An error answer. Every one has `message`, in plain words; some add an
        `error` code and fields of their own.
      required:
        - message
      properties:
        message:
          type: string
          description: What went wrong and what to do about it.
        error:
          type: string
          description: >-
            A code a few errors add, such as `rate_limited`. See [Handle
            errors](/essentials/error-handling#answers-with-an-error-code).
    ValidationError:
      type: object
      description: '422: the request didn''t pass validation, and nothing changed.'
      required:
        - message
        - errors
      properties:
        message:
          type: string
          description: >-
            The first error and, when there are more, how many: `(and 1 more
            error)`, `(and 2 more errors)`.
        errors:
          type: object
          description: >-
            The messages, by field. A field inside a list is named with dots:
            `accounts.0.id`.
          additionalProperties:
            type: array
            items:
              type: string
    PutBackCounts:
      type: object
      description: >-
        Posts by what putting back does with them (all 11 are always there):
        `scheduled_again` (a draft the disconnect took off the schedule,
        unchanged since, scheduled again at its time), `added_to_scheduled`
        (scheduled or waiting for approval: the account is added, the time
        stays), `added_to_draft` (a draft stays a draft),
        `added_to_draft_time_passed` and `added_to_draft_changed` (taken off the
        schedule by the disconnect, but its time passed or it was edited since,
        so it stays a draft), `added_to_draft_refused` (kept a draft because the
        plan's post limit refused scheduling it), `skipped_deleted`,
        `skipped_already_there`, `skipped_went_out` (published, failed or
        sending), `skipped_time_passed` (due within 5 minutes), and `not_done`
        (an error stopped it; calling again tries it again).
      required:
        - scheduled_again
        - added_to_scheduled
        - added_to_draft
        - added_to_draft_time_passed
        - added_to_draft_changed
        - added_to_draft_refused
        - skipped_deleted
        - skipped_already_there
        - skipped_went_out
        - skipped_time_passed
        - not_done
      properties:
        scheduled_again:
          type: integer
        added_to_scheduled:
          type: integer
        added_to_draft:
          type: integer
        added_to_draft_time_passed:
          type: integer
        added_to_draft_changed:
          type: integer
        added_to_draft_refused:
          type: integer
        skipped_deleted:
          type: integer
        skipped_already_there:
          type: integer
        skipped_went_out:
          type: integer
        skipped_time_passed:
          type: integer
        not_done:
          type: integer
  responses:
    Unauthorized401:
      description: No API key, or not a valid one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthenticated:
              summary: No valid API key
              value:
                message: Unauthenticated.
    NotFound404:
      description: Nothing with that id in the workspaces the key can reach.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            not_found:
              summary: Not found
              value:
                message: Not found.
    RateLimited429:
      description: >-
        More than 60 requests in a minute from this key's user (the API and the
        MCP server share the count). Wait `Retry-After` seconds.
      headers:
        Retry-After:
          description: Seconds until requests are allowed again.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Requests allowed a minute.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests left this minute.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: When requests are allowed again, as a Unix timestamp.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            too_many_attempts:
              summary: Too many requests
              value:
                message: Too Many Attempts.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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