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

# Update Post Attachments

> Replaces the attachments (media) of the post with the given list. The list replaces all the existing attachments, so pass the full list the post should have; an empty list removes them all. Only the attachments of the main post change: the attachments of its comments, the content, the settings and the publish date are untouched, so a running publishing workflow is not restarted. The post is re-validated with the new attachments. Works only on not-yet-published posts (scheduled or draft).



## OpenAPI

````yaml PUT /posts/{id}/attachments
openapi: 3.1.0
info:
  title: Postiz Public API
  description: >-
    API for managing social media posts, integrations, and media uploads in
    Postiz.


    ## Authentication


    All endpoints require an API key passed in the `Authorization` header:


    ```

    Authorization: your-api-key

    ```


    Get your API key from Postiz Settings.


    ## Rate Limits


    There is a limit of **30 requests per hour**.


    ## Terminology


    The UI uses `channel`, but the API uses `integration`. They refer to the
    same thing.


    ## Supported Platforms (27)


    **Social Platforms:** X (Twitter), LinkedIn, LinkedIn Page, Facebook,
    Instagram, Instagram Standalone, Threads, Bluesky, Mastodon, Warpcast
    (Farcaster), Nostr, VK


    **Video Platforms:** YouTube, TikTok


    **Community Platforms:** Reddit, Lemmy, Discord, Slack, Telegram


    **Design Platforms:** Pinterest, Dribbble


    **Blogging Platforms:** Medium, Dev.to, Hashnode, WordPress


    **Business:** Google My Business (GMB), Listmonk (newsletters)
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.postiz.com/public/v1
    description: Postiz Cloud
  - url: https://{your-domain}/api/public/v1
    description: Self-hosted
    variables:
      your-domain:
        default: localhost:5000
        description: Your Postiz instance domain
security:
  - ApiKeyAuth: []
tags:
  - name: Integrations
    description: Manage connected social media channels
  - name: Posts
    description: Create, list, and delete posts
  - name: Uploads
    description: Upload media files
  - name: Notifications
    description: View organization notifications
  - name: Analytics
    description: View analytics for integrations and posts
  - name: Video Generation
    description: Generate videos with AI
  - name: Clipping
    description: Turn long YouTube videos into short vertical clips
paths:
  /posts/{id}/attachments:
    put:
      tags:
        - Posts
      summary: Update post attachments
      description: >-
        Replaces the attachments (media) of the post with the given list. The
        list replaces all the existing attachments, so pass the full list the
        post should have; an empty list removes them all. Only the attachments
        of the main post change: the attachments of its comments, the content,
        the settings and the publish date are untouched, so a running publishing
        workflow is not restarted. The post is re-validated with the new
        attachments. Works only on not-yet-published posts (scheduled or draft).
      operationId: updatePostAttachments
      parameters:
        - name: id
          in: path
          required: true
          description: Post ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - attachments
              properties:
                attachments:
                  type: array
                  description: >-
                    The full new list of attachments of the post. An empty array
                    removes all the attachments.
                  items:
                    $ref: '#/components/schemas/Media'
            example:
              attachments:
                - id: img-1
                  path: https://uploads.postiz.com/photo.jpg
      responses:
        '200':
          description: Post attachments updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  postId:
                    type: string
                  publishDate:
                    type: string
              example:
                postId: post-123
                publishDate: '2026-08-01T10:00:00'
        '400':
          description: >-
            The id belongs to a comment (pass the root post id), the post is
            already published or its publish time passed, an attachment is
            invalid, or the post failed validation with the new attachments (for
            example a platform that requires at least one media)
        '404':
          description: Post not found
components:
  schemas:
    Media:
      type: object
      required:
        - id
        - path
      properties:
        id:
          type: string
        path:
          type: string
        thumbnailTimestamp:
          type: number
          description: >-
            Milliseconds into the video to use as the cover/thumbnail frame.
            Supported by Instagram, Instagram Standalone, TikTok Business, and
            TikTok (Direct Post only, not the UPLOAD/inbox flow); other
            providers ignore it. For TikTok, in our testing the cover was
            applied only to public posts (privacy_level PUBLIC_TO_EVERYONE).
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Your Postiz API key

````

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