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

# Update Destination

> Enable or disable a destination. You can also make it the default destination for its channel. Send the current ETag in `If-Match`.



## OpenAPI

````yaml https://api.openpmm.com/v1/openapi.json patch /workspaces/{workspace_id}/destinations/{destination_id}
openapi: 3.1.0
info:
  title: OpenPMM API
  version: 1.0.0
  description: >-
    Use one API to create and manage social posts. The signup operation does not
    need an API key. Other operations use an account API key. Workspace
    endpoints also use a workspace ID. Publishing requires explicit
    confirmation.
servers:
  - url: https://api.openpmm.com/v1
    description: Production API
security:
  - bearerAuth: []
tags:
  - name: Signup
    description: Create access to OpenPMM and the first workspace.
  - name: CLI Authorization
    description: Authorize the OpenPMM CLI through a browser sign-in.
  - name: Posts
    description: Create and manage posts.
  - name: Analytics
    description: Read and refresh current post analytics.
  - name: Assets
    description: Upload and manage media files.
  - name: Destinations
    description: Connect and manage social accounts.
  - name: Account
    description: Get account details and list available workspaces.
  - name: Billing
    description: Manage the account subscription and payment details.
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Feedback
    description: Send product feedback to OpenPMM.
  - name: Team
    description: Manage account members and invitations.
  - name: Slack Notifications
    description: Configure Slack notifications.
  - name: Webhooks
    description: Configure signed post status events.
paths:
  /workspaces/{workspace_id}/destinations/{destination_id}:
    patch:
      tags:
        - Destinations
      summary: Update Destination
      description: >-
        Enable or disable a destination. You can also make it the default
        destination for its channel. Send the current ETag in `If-Match`.
      operationId: patchDestination
      parameters:
        - name: workspace_id
          in: path
          required: true
          description: Unique workspace ID.
          schema:
            type: string
            example: ws_01JABCDEF
        - name: destination_id
          in: path
          required: true
          description: Unique destination ID.
          schema:
            type: string
            example: dest_01JABCDEF
        - $ref: '#/components/parameters/OpenPMMRequestId'
        - $ref: '#/components/parameters/IfMatch'
      requestBody:
        $ref: '#/components/requestBodies/PatchDestination'
      responses:
        '200':
          description: The updated destination.
          headers:
            OpenPMM-Request-Id:
              $ref: '#/components/headers/OpenPMMRequestId'
            ETag:
              $ref: '#/components/headers/ETag'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Destination'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '428':
          $ref: '#/components/responses/PreconditionRequired'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    OpenPMMRequestId:
      name: OpenPMM-Request-Id
      in: header
      required: false
      description: >-
        Optional request ID. OpenPMM returns this value when it is valid.
        Otherwise, OpenPMM creates a request ID.
      schema:
        type: string
        maxLength: 128
      example: req_01JABCDEF
    IfMatch:
      name: If-Match
      in: header
      required: true
      description: >-
        The current ETag for the resource. This value prevents an update to an
        old version.
      schema:
        type: string
  requestBodies:
    PatchDestination:
      required: true
      description: Destination settings to update.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PatchDestinationRequest'
          example:
            enabled: true
            is_default: true
  headers:
    OpenPMMRequestId:
      description: Stable identifier for this request.
      schema:
        type: string
    ETag:
      description: The current resource version for conditional updates.
      schema:
        type: string
    WWWAuthenticate:
      description: Bearer authentication challenge.
      schema:
        type: string
      example: Bearer realm="openpmm"
    RetryAfter:
      description: Number of seconds to wait before you retry the request.
      schema:
        type: integer
        minimum: 1
  schemas:
    Destination:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          example: dest_01JABCDEF
          description: Unique destination ID.
        object:
          type: string
          const: destination
          description: Object type.
        channel:
          type: string
          enum:
            - bluesky
            - facebook
            - instagram
            - threads
            - mastodon
            - x
            - linkedin
            - tiktok
            - youtube
          example: x
          description: Channel that receives posts for this destination.
        display_name:
          anyOf:
            - type: string
              example: '@openpmm'
            - type: 'null'
          description: Provider account or page name.
        status:
          type: string
          enum:
            - ready
            - disabled
            - reauthorization-required
            - unavailable
          description: Current publishing status. Only `ready` destinations accept posts.
        unavailable_reason:
          anyOf:
            - type: string
              enum:
                - reauthorization_required
                - provider_identity_missing
                - provider_error
            - type: 'null'
          description: >-
            Reason the destination cannot accept posts. This value is null when
            the status is `ready` or `disabled`.
        is_default:
          type: boolean
          description: Whether new posts for this channel use this destination by default.
        provider_origin:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
          description: Provider origin. Mastodon destinations use the instance origin.
        external_id:
          anyOf:
            - type: string
              example: '1844029112345678901'
            - type: 'null'
          description: Provider account or page ID.
        connected_at:
          anyOf:
            - type: string
              format: date-time
              example: '2026-08-09T12:00:00.000Z'
            - type: 'null'
          description: Time when the provider connection was created.
        expires_at:
          anyOf:
            - type: string
              format: date-time
              example: '2026-08-09T12:00:00.000Z'
            - type: 'null'
          description: Time when the current provider access expires.
        capabilities:
          type: object
          additionalProperties: false
          properties:
            max_body_items:
              type: integer
              minimum: 1
              maximum: 25
              description: >-
                Maximum number of consecutive body items that this destination
                accepts.
            body_text_limit:
              type: object
              additionalProperties: false
              properties:
                maximum:
                  type: integer
                  minimum: 1
                  description: Maximum length of each body item.
                unit:
                  type: string
                  enum:
                    - characters
                    - graphemes
                    - weighted_characters
                    - bytes
                  description: Unit that OpenPMM uses to measure body length.
              required:
                - maximum
                - unit
              description: >-
                Maximum length of each body item and the unit used to measure
                it.
              example:
                maximum: 25000
                unit: weighted_characters
            allowed_privacy_statuses:
              type: array
              items:
                type: string
                enum:
                  - public
                  - private
                  - unlisted
              minItems: 1
              uniqueItems: true
              description: >-
                YouTube privacy values that this deployment accepts. This field
                is present only for YouTube destinations.
            minimum_upload_lead_minutes:
              type: integer
              minimum: 0
              maximum: 1440
              description: >-
                Minimum YouTube upload lead time. This field is present only for
                YouTube destinations.
          required:
            - max_body_items
          description: Publishing limits for this destination.
        version:
          type: integer
          minimum: 0
          description: Version used to update the destination with an ETag.
        queue_policy:
          type: object
          additionalProperties: false
          properties:
            enabled_weekdays:
              type: array
              items:
                type: string
                enum:
                  - monday
                  - tuesday
                  - wednesday
                  - thursday
                  - friday
                  - saturday
                  - sunday
                description: Weekday in the Workspace time zone.
              maxItems: 7
              description: Weekdays when the destination queue can select a slot.
            windows:
              type: array
              items:
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: string
                    pattern: ^qwin_[A-Za-z0-9_-]{1,100}$
                    description: Stable queue window ID.
                  weekdays:
                    type: array
                    items:
                      type: string
                      enum:
                        - monday
                        - tuesday
                        - wednesday
                        - thursday
                        - friday
                        - saturday
                        - sunday
                      description: Weekday in the Workspace time zone.
                    maxItems: 7
                    description: Weekdays that use this window.
                  start_time:
                    type: string
                    pattern: ^([01]\d|2[0-3]):[0-5]\d$
                    example: '08:00'
                    description: Window start time in 24-hour local time.
                  end_time:
                    type: string
                    pattern: ^([01]\d|2[0-3]):[0-5]\d$
                    example: '11:00'
                    description: Window end time in 24-hour local time.
                required:
                  - id
                  - weekdays
                  - start_time
                  - end_time
              maxItems: 10
              description: Local-time posting windows.
          required:
            - enabled_weekdays
            - windows
          description: Weekly queue windows for this destination.
      required:
        - id
        - object
        - channel
        - display_name
        - status
        - unavailable_reason
        - is_default
        - provider_origin
        - external_id
        - connected_at
        - expires_at
        - capabilities
        - version
        - queue_policy
    PatchDestinationRequest:
      type: object
      additionalProperties: false
      properties:
        enabled:
          type: boolean
        is_default:
          type: boolean
        queue_policy:
          type: object
          additionalProperties: false
          properties:
            enabled_weekdays:
              type: array
              items:
                type: string
                enum:
                  - monday
                  - tuesday
                  - wednesday
                  - thursday
                  - friday
                  - saturday
                  - sunday
                description: Weekday in the Workspace time zone.
              maxItems: 7
              description: Weekdays when the destination queue can select a slot.
            windows:
              type: array
              items:
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: string
                    pattern: ^qwin_[A-Za-z0-9_-]{1,100}$
                    description: Stable queue window ID.
                  weekdays:
                    type: array
                    items:
                      type: string
                      enum:
                        - monday
                        - tuesday
                        - wednesday
                        - thursday
                        - friday
                        - saturday
                        - sunday
                      description: Weekday in the Workspace time zone.
                    maxItems: 7
                    description: Weekdays that use this window.
                  start_time:
                    type: string
                    pattern: ^([01]\d|2[0-3]):[0-5]\d$
                    example: '08:00'
                    description: Window start time in 24-hour local time.
                  end_time:
                    type: string
                    pattern: ^([01]\d|2[0-3]):[0-5]\d$
                    example: '11:00'
                    description: Window end time in 24-hour local time.
                required:
                  - weekdays
                  - start_time
                  - end_time
              maxItems: 10
              description: Local-time posting windows.
          required:
            - enabled_weekdays
            - windows
      required: []
      minProperties: 1
    Problem:
      type: object
      additionalProperties: false
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
          example: Request failed
        status:
          type: integer
          minimum: 400
          maximum: 599
        detail:
          type: string
        instance:
          type: string
          format: uri
        code:
          type: string
          example: public_invalid_request
        category:
          type: string
          enum:
            - authentication
            - authorization
            - billing
            - conflict
            - internal
            - not_found
            - provider
            - rate_limit
            - validation
        request_id:
          type: string
          example: req_01JABCDEF
        retryable:
          type: boolean
        retry:
          type: object
          additionalProperties: false
          properties:
            safety:
              type: string
              enum:
                - safe
                - not_retryable
            after:
              anyOf:
                - type: integer
                  minimum: 0
                - type: 'null'
          required:
            - safety
            - after
        user_action:
          type: string
          enum:
            - check_request
            - contact_support
            - inspect_resource
            - reauthorize
            - retry
            - wait
        reason:
          type: string
          enum:
            - velocity
            - backlog
            - account-paused
        retry_at:
          anyOf:
            - type: string
              format: date-time
              example: '2026-08-09T12:00:00.000Z'
            - type: 'null'
        provider_requests_started:
          type: boolean
          const: false
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ProblemError'
      required:
        - type
        - title
        - status
        - detail
        - instance
        - code
        - category
        - request_id
        - retryable
        - retry
        - user_action
        - errors
      description: RFC 9457 problem details with stable OpenPMM fields.
      example:
        type: https://www.openpmm.com/docs/reference/errors#public_invalid_request
        title: Invalid request
        status: 400
        detail: The request body does not match the public contract.
        instance: urn:openpmm:request:req_01JABCDEF
        code: public_invalid_request
        category: validation
        request_id: req_01JABCDEF
        retryable: false
        retry:
          safety: not_retryable
          after: null
        user_action: check_request
        errors:
          - pointer: /posts/0/destination_id
            code: custom
            detail: Publishing an entry requires a destination.
    ProblemError:
      type: object
      additionalProperties: false
      properties:
        pointer:
          type: string
          example: /posts/0/destination_id
          description: JSON Pointer to the invalid request member.
        post_id:
          type: string
          example: send_01JABCDEF
          description: Unique Post ID.
        code:
          type: string
          example: custom
        detail:
          type: string
          example: Publishing requires a destination.
        channel:
          type: string
          enum:
            - bluesky
            - facebook
            - instagram
            - threads
            - mastodon
            - x
            - linkedin
            - tiktok
            - youtube
          example: x
        destination_id:
          anyOf:
            - type: string
              example: dest_01JABCDEF
              description: Unique destination ID.
            - type: 'null'
        destination_label:
          type: string
        asset_id:
          anyOf:
            - type: string
              example: ast_01JABCDEF
              description: Unique asset ID.
            - type: 'null'
        property:
          type: string
        media_kind:
          type: string
          enum:
            - image
            - video
        actual:
          anyOf:
            - $ref: '#/components/schemas/MediaMeasure'
            - type: 'null'
        required:
          $ref: '#/components/schemas/MediaRequirementSummary'
        allowed_actions:
          type: array
          items:
            type: string
            enum:
              - replace_asset
              - remove_destination
              - retry
        retryable:
          type: boolean
      required:
        - code
        - detail
    MediaMeasure:
      oneOf:
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: number
            value:
              type: number
            unit:
              type: string
          required:
            - kind
            - value
            - unit
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: text
            value:
              type: string
          required:
            - kind
            - value
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: boolean
            value:
              type: boolean
          required:
            - kind
            - value
    MediaRequirementSummary:
      oneOf:
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: range
            min:
              anyOf:
                - type: number
                - type: 'null'
            max:
              anyOf:
                - type: number
                - type: 'null'
            unit:
              type: string
            owner:
              type: string
              enum:
                - openpmm
                - provider
                - destination
          required:
            - kind
            - min
            - max
            - unit
            - owner
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: allowed
            allowed:
              type: array
              items:
                type: string
            owner:
              type: string
              enum:
                - openpmm
                - provider
                - destination
          required:
            - kind
            - allowed
            - owner
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              const: expected
            expected:
              type: string
            owner:
              type: string
              enum:
                - openpmm
                - provider
                - destination
          required:
            - kind
            - expected
            - owner
  responses:
    BadRequest:
      description: The request has invalid syntax, content, a cursor, or a header.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unauthenticated:
      description: Bearer authentication is missing or invalid.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
        WWW-Authenticate:
          $ref: '#/components/headers/WWWAuthenticate'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Forbidden:
      description: The credential lacks the operation’s required scope.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: >-
        The resource does not exist, or the API credential cannot use its
        workspace.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Conflict:
      description: >-
        The request conflicts with the current state. This error also occurs
        when different input uses an existing idempotency key or when OpenPMM
        cannot determine the result of an earlier request.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            idempotency_outcome_unknown:
              summary: The result of an earlier request is unknown
              value:
                type: >-
                  https://www.openpmm.com/docs/reference/errors#public_idempotency_outcome_unknown
                title: Mutation outcome unknown
                status: 409
                detail: >-
                  The earlier request outcome is unknown. Inspect the affected
                  resource before you create new work.
                instance: urn:openpmm:request:req_01JABCDEF
                code: public_idempotency_outcome_unknown
                category: conflict
                request_id: req_01JABCDEF
                retryable: false
                retry:
                  safety: not_retryable
                  after: null
                user_action: inspect_resource
                errors: []
            post_group_channel_conflict:
              summary: The group already contains the requested channel
              value:
                type: >-
                  https://www.openpmm.com/docs/reference/errors#public_post_group_channel_conflict
                title: Request conflict
                status: 409
                detail: >-
                  This group already contains a draft Post for one or more
                  requested channels. Update or publish the existing draft
                  before you create another one.
                instance: urn:openpmm:request:req_01JABCDEF
                code: public_post_group_channel_conflict
                category: conflict
                request_id: req_01JABCDEF
                retryable: false
                retry:
                  safety: not_retryable
                  after: null
                user_action: check_request
                errors: []
    PreconditionFailed:
      description: The resource changed after OpenPMM created the supplied ETag.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    PayloadTooLarge:
      description: The request body exceeds the 1 MiB edge limit.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: >-
              https://www.openpmm.com/docs/reference/errors#public_payload_too_large
            title: Payload too large
            status: 413
            detail: The request body exceeds the 1 MiB limit.
            instance: urn:openpmm:request:req_01JABCDEF
            code: public_payload_too_large
            request_id: req_01JABCDEF
            retryable: false
            errors: []
    PreconditionRequired:
      description: This operation requires an `If-Match` header.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    RateLimited:
      description: The request exceeded the rate limit.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
        text/html:
          schema:
            type: string
    InternalError:
      description: OpenPMM could not complete the request because of an internal error.
      headers:
        OpenPMM-Request-Id:
          $ref: '#/components/headers/OpenPMMRequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: OpenPMM API key
      description: 'Send an account API key in the `Authorization: Bearer <key>` header.'

````