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

# Update a Mastodon media attachment

> Update a Mastodon media attachment via Posttu's Mastodon REST API (POST /api/v1/mastodon/media/update) and MCP server.



## OpenAPI

````yaml openapi.json POST /api/v1/mastodon/media/update
openapi: 3.1.0
info:
  title: Posttu API
  version: 1.0.0
  description: >-
    Posttu V1 REST API — Workflow automation, social-media post management,
    inbox, tags, and calendar.
servers:
  - url: https://posttu.com
    description: Production
security: []
paths:
  /api/v1/mastodon/media/update:
    post:
      tags:
        - Mastodon
      summary: Update a Mastodon media attachment
      description: |-
        Update a Mastodon media attachment
        Requires API key scope: `mastodon:write`.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                channelId:
                  type: string
                  description: Mastodon channel ID
                  example: ch_md123
                mediaId:
                  type: string
                  description: Mastodon media ID
                description:
                  type: string
                focus:
                  anyOf:
                    - type: string
                    - type: object
                      properties:
                        x:
                          type: number
                        'y':
                          type: number
              required:
                - channelId
                - mediaId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MastodonMediaUpdateResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    MastodonMediaUpdateResponse:
      type: object
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/MastodonMediaAttachment'
            - type:
                - object
                - 'null'
        success:
          type: boolean
        error:
          type: string
      required:
        - data
        - success
    MastodonMediaAttachment:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - image
            - video
            - gifv
            - audio
            - unknown
        url:
          type:
            - string
            - 'null'
        preview_url:
          type: string
        remote_url:
          type:
            - string
            - 'null'
        text_url:
          type:
            - string
            - 'null'
        meta:
          type:
            - object
            - 'null'
          properties:
            original:
              type: object
              properties:
                width:
                  type: number
                height:
                  type: number
                size:
                  type: string
                aspect:
                  type: number
                duration:
                  type: number
                bitrate:
                  type: number
            small:
              type: object
              properties:
                width:
                  type: number
                height:
                  type: number
                size:
                  type: string
                aspect:
                  type: number
            focus:
              type: object
              properties:
                x:
                  type: number
                'y':
                  type: number
              required:
                - x
                - 'y'
          additionalProperties: {}
        description:
          type:
            - string
            - 'null'
        blurhash:
          type:
            - string
            - 'null'
      required:
        - id
        - type
        - url
        - preview_url
        - remote_url
        - text_url
        - description
        - blurhash
      additionalProperties: {}
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Pass your API key via the Authorization header: `Bearer <api-key>`'

````

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