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

> ## Agent Instructions
> Postploy's MCP server for posting is https://api.postploy.com/mcp and signs in with OAuth. The REST API base URL is https://api.postploy.com/public/v1 and takes an API key as a Bearer token. The API calls channels accounts.

# List trash

> Posts that were deleted after their time had passed. They stay here until you restore them or delete them for good.



## OpenAPI

````yaml /openapi.yaml get /trash
openapi: 3.1.0
info:
  title: Postploy API
  version: '1'
  description: Schedule and manage social media posts in your Postploy team.
  contact:
    name: Postploy support
    email: support@postploy.com
servers:
  - url: https://api.postploy.com/public/v1
security:
  - apiKey: []
tags:
  - name: Channels
  - name: Posts
  - name: Approvals
  - name: Media
  - name: Trash
  - name: Webhooks
paths:
  /trash:
    get:
      tags:
        - Trash
      summary: List trash
      description: >-
        Posts that were deleted after their time had passed. They stay here
        until you restore them or delete them for good.
      operationId: listTrash
      parameters:
        - $ref: '#/components/parameters/Page'
        - name: limit
          in: query
          description: How many posts per page.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
      responses:
        '200':
          description: One page of deleted posts. Each has `deletedAt` set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostPage'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    Page:
      name: page
      in: query
      description: Which page to return, starting at `0`.
      schema:
        type: integer
        minimum: 0
        default: 0
  schemas:
    PostPage:
      type: object
      required:
        - data
        - page
        - limit
        - total
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Post'
        page:
          type: integer
          description: This page, starting at `0`.
        limit:
          type: integer
        total:
          type: integer
          description: How many posts match, across all pages.
    Post:
      allOf:
        - $ref: '#/components/schemas/PostData'
        - type: object
          required:
            - actions
          properties:
            actions:
              $ref: '#/components/schemas/PostActions'
    Error:
      type: object
      required:
        - statusCode
        - message
        - errors
        - timestamp
        - route
      properties:
        statusCode:
          type: integer
        message:
          type: string
          description: What went wrong, in plain words. Safe to show to people.
        errors:
          type:
            - array
            - 'null'
          description: Every problem, when there's more than one place to look.
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                description: Where the problem is, such as `["posts", 0, "scheduledAt"]`.
                items:
                  type:
                    - string
                    - integer
              cause:
                type: string
              code:
                type: string
                description: >-
                  On plan limits, `PLATFORM_LIMIT_REACHED` or
                  `TOTAL_LIMIT_REACHED`.
              platform:
                type: string
        timestamp:
          type: string
          format: date-time
        route:
          type: string
    PostData:
      type: object
      required:
        - id
        - status
        - statusGroup
        - blockedReason
        - socialAccountId
        - platform
        - title
        - text
        - thread
        - scheduledAt
        - timezone
        - acceptedAt
        - publishedAt
        - deletedAt
        - link
        - failureReason
        - failureKind
        - sentBack
        - review
        - attempts
        - mediaIds
        - media
        - platformFields
        - conversationId
        - seriesId
        - createdAt
      properties:
        id:
          type: string
          format: uuid
        status:
          $ref: '#/components/schemas/Status'
        statusGroup:
          $ref: '#/components/schemas/StatusGroup'
        blockedReason:
          type:
            - string
            - 'null'
          enum:
            - account_disconnected
            - null
          description: >-
            `account_disconnected` when the post can't go out until its channel
            is reconnected.
        socialAccountId:
          type:
            - string
            - 'null'
          format: uuid
        platform:
          oneOf:
            - $ref: '#/components/schemas/Platform'
            - type: 'null'
        title:
          type:
            - string
            - 'null'
        text:
          type:
            - string
            - 'null'
        thread:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            An X post's follow-up posts, in order. `[]` when it isn't a thread,
            `null` on other platforms.
        scheduledAt:
          type: string
          format: date-time
          description: When it publishes, in UTC.
        timezone:
          type: string
          description: The time zone the app shows the post in.
        acceptedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the network took the post while publishing. Some networks, like
            TikTok, still process it for a few minutes before it shows on the
            profile.
        publishedAt:
          type:
            - string
            - 'null'
          format: date-time
        deletedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Set while the post is in the trash.
        link:
          type:
            - string
            - 'null'
          format: uri
          description: The live post, once it's published.
        failureReason:
          type:
            - string
            - 'null'
          description: Why the post failed, in plain words.
        failureKind:
          type:
            - string
            - 'null'
          enum:
            - transient
            - permanent
            - account
            - null
          description: >-
            `transient`: retrying may work. `permanent`: the platform rejected
            it, so change it first. `account`: reconnect the channel.
        sentBack:
          oneOf:
            - $ref: '#/components/schemas/SentBack'
            - type: 'null'
        review:
          oneOf:
            - $ref: '#/components/schemas/PostReview'
            - type: 'null'
        attempts:
          type: integer
          description: How many times Postploy tried to publish it.
        mediaIds:
          type: array
          items:
            type: string
            format: uuid
        media:
          type: array
          items:
            $ref: '#/components/schemas/Media'
        platformFields:
          oneOf:
            - $ref: '#/components/schemas/PlatformFields'
            - type: 'null'
        conversationId:
          type:
            - string
            - 'null'
          description: The Postploy assistant chat that made the post, if one did.
        seriesId:
          type:
            - string
            - 'null'
          description: Set when the post is one of a repeating series.
        createdAt:
          type: string
          format: date-time
    PostActions:
      type: object
      description: What you can do with the post right now.
      required:
        - edit
        - approve
        - reject
        - review
        - retry
        - delete
      properties:
        edit:
          type: boolean
        approve:
          type: boolean
        reject:
          type: boolean
        review:
          type: boolean
          description: Whether you can send it to an outside reviewer.
        retry:
          type: boolean
        delete:
          type: boolean
    Status:
      type: string
      description: Where the post is. See [Statuses](/concepts#statuses).
      enum:
        - draft
        - pending_approval
        - scheduled
        - queued
        - publishing
        - published
        - failed
        - cancelled
    StatusGroup:
      type: string
      enum:
        - draft
        - approval
        - scheduled
        - published
        - failed
    Platform:
      type: string
      description: '`twitter` is X.'
      enum:
        - linkedin
        - twitter
        - instagram
        - facebook
        - tiktok
        - youtube
    SentBack:
      type: object
      description: Why a reviewer sent the post back to drafts.
      required:
        - reason
        - note
        - by
        - at
      properties:
        reason:
          type:
            - string
            - 'null'
        note:
          type:
            - string
            - 'null'
        by:
          type: object
          required:
            - id
            - name
            - kind
          properties:
            id:
              type: string
              format: uuid
              description: >-
                The teammate's user id, or the reviewer's id when `kind` is
                `reviewer`.
            name:
              type: string
            kind:
              type: string
              enum:
                - member
                - reviewer
              description: >-
                `member`: someone on your team. `reviewer`: someone outside it,
                from their review link.
        at:
          type: string
          format: date-time
    PostReview:
      type: object
      description: The reviewer outside your team that the post is waiting on.
      required:
        - reviewer
        - sentAt
      properties:
        reviewer:
          type: object
          required:
            - id
            - name
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
        sentAt:
          type: string
          format: date-time
    Media:
      type: object
      description: An image or video in your team's media library.
      required:
        - id
        - type
        - fileName
        - url
        - thumbnailUrl
        - mimeType
        - duration
        - altText
      properties:
        id:
          type: string
          format: uuid
          description: Put this in a post's `mediaIds`.
        type:
          type: string
          enum:
            - image
            - video
        fileName:
          type: string
        url:
          type: string
          format: uri
        thumbnailUrl:
          type: string
          format: uri
        mimeType:
          type:
            - string
            - 'null'
        duration:
          type:
            - number
            - 'null'
          description: A video's length in seconds.
        altText:
          type:
            - string
            - 'null'
    PlatformFields:
      type: object
      description: >-
        Options for the post's platform, under the platform's name. See
        [Platform options](/api/platform-options).
      properties:
        linkedin:
          type: object
          additionalProperties: false
          properties:
            visibility:
              type: string
              enum:
                - PUBLIC
                - CONNECTIONS
            firstComment:
              type: string
              description: Posted as the first comment.
            link:
              type: string
              description: Added to the end of the post.
        twitter:
          type: object
          properties:
            replyRule:
              type: string
              enum:
                - everyone
                - follow
                - mention
              default: everyone
              description: >-
                Who can reply. `follow` is people you follow; `mention` is
                people you mention.
            retweetConfig:
              type: object
              description: Repost the post this long after it goes out.
              required:
                - value
                - frequency
              properties:
                value:
                  type: integer
                  minimum: 1
                frequency:
                  type: string
                  enum:
                    - hour
                    - day
        instagram:
          type: object
          additionalProperties: false
          properties:
            postType:
              type: string
              enum:
                - post
                - reel
                - story
              default: post
            reelGrid:
              type: string
              enum:
                - reel_only
                - reel_and_main
              default: reel_only
              description: '`reel_and_main` also shows a reel in your main feed.'
            firstComment:
              type: string
              description: Posted as the first comment. Not on stories.
            collaborators:
              type: array
              maxItems: 3
              description: Instagram usernames to invite as collaborators.
              items:
                type: string
        tiktok:
          type: object
          required:
            - visibility
            - discloseContent
            - allowMusic
            - promotion
            - allowUsersTo
          additionalProperties: false
          properties:
            visibility:
              type: string
              enum:
                - public
                - friends
                - followers
                - private
            discloseContent:
              type: boolean
              description: Whether the post promotes a brand, product or service.
            allowMusic:
              type: boolean
              description: Let TikTok add music to photo posts.
            promotion:
              type: array
              description: >-
                Whose promotion it is, when `discloseContent` is true (it's
                ignored otherwise): `brand` is your own, `branded_content` is a
                paid partnership. Pick at least one. Branded content can't be
                private.
              items:
                type: string
                enum:
                  - brand
                  - branded_content
            allowUsersTo:
              type: array
              description: What viewers may do.
              items:
                type: string
                enum:
                  - comment
                  - duet
                  - stitch
        youtube:
          type: object
          required:
            - visibility
            - forKids
          additionalProperties: false
          properties:
            visibility:
              type: string
              enum:
                - public
                - unlisted
                - private
            forKids:
              type: boolean
              description: Whether the video is made for kids.
  responses:
    BadRequest:
      description: >-
        The request is invalid, or a post breaks its platform's rules. `message`
        gives the first problem, and `errors` lists every one with its `path`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 400
            message: Scheduled date and time must be in the future
            errors:
              - message: Scheduled date and time must be in the future
                path:
                  - posts
                  - 0
                  - scheduledAt
                cause: custom
            timestamp: '2030-01-10T12:00:00.000Z'
            route: /public/v1/posts
    Unauthorized:
      description: The API key is missing, unknown or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            message: Invalid API key
            errors: null
            timestamp: '2030-01-10T12:00:00.000Z'
            route: /public/v1/accounts
    Forbidden:
      description: Your role in the team doesn't allow this.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: >-
        More than 120 requests a minute to this endpoint. All of a person's keys
        count together. Wait the number of seconds in `Retry-After-caller`, then
        try again.
      headers:
        Retry-After-caller:
          description: Seconds to wait before trying again.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An API key from **Settings › AI apps & API** in Postploy. Keys start
        with `ppk_`.

````

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