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

# Edit still-scheduled targets of an operation

> Edits the `caption`, `media`, and/or `scheduleAt` of an operation's targets that are still in the `scheduled` state. Omitted fields are left unchanged; `media: []` clears media. Targets already `processing`/`published`/`failed`/`cancelled` are left untouched - an edit never races an in-flight publish. Cannot change which platforms the operation posts to (cancel and re-create for that). Returns `409` if no target is still scheduled.



## OpenAPI

````yaml /api-reference/openapi.yaml patch /v1/posts/{id}
openapi: 3.1.0
info:
  title: Sydium Public API
  version: 1.0.0
servers:
  - url: https://api.sydium.com
security:
  - ApiKey: []
paths:
  /v1/posts/{id}:
    patch:
      summary: Edit still-scheduled targets of an operation
      description: >-
        Edits the `caption`, `media`, and/or `scheduleAt` of an operation's
        targets that are still in the `scheduled` state. Omitted fields are left
        unchanged; `media: []` clears media. Targets already
        `processing`/`published`/`failed`/`cancelled` are left untouched - an
        edit never races an in-flight publish. Cannot change which platforms the
        operation posts to (cancel and re-create for that). Returns `409` if no
        target is still scheduled.
      operationId: updatePost
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePostRequest'
      responses:
        '200':
          description: Operation after the edit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden (scope/permission)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Operation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            No target still scheduled (already publishing, published, or
            cancelled)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited / insufficient tokens
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    UpdatePostRequest:
      type: object
      description: >-
        At least one of caption/media/scheduleAt must be present. Fields not
        sent are left unchanged; media:[] clears media. The platform set cannot
        be changed here.
      properties:
        caption:
          type: string
        clientId:
          type: string
          description: >-
            Optional agency client id (see GET /v1/clients) to scope the edit to
            that client's posts.
        media:
          type: array
          items:
            type: string
        scheduleAt:
          type: string
          format: date-time
    OperationResponse:
      type: object
      required:
        - success
        - data
        - meta
      properties:
        success:
          const: true
        data:
          $ref: '#/components/schemas/Operation'
        meta:
          type: object
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          const: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - bad_request
                - unauthorized
                - forbidden
                - insufficient_permissions
                - not_found
                - unprocessable
                - payload_too_large
                - rate_limited
                - invalid_state
                - external_service_error
                - internal_error
            message:
              type: string
        meta:
          type: object
    Operation:
      type: object
      required:
        - id
        - status
        - targets
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - scheduled
            - processing
            - completed
            - partially_failed
            - partially_cancelled
            - failed
            - cancelled
        targets:
          type: array
          items:
            $ref: '#/components/schemas/OperationTarget'
    OperationTarget:
      type: object
      required:
        - platform
        - status
      properties:
        platform:
          type: string
        status:
          type: string
          enum:
            - scheduled
            - processing
            - published
            - failed
            - cancelled
        postId:
          type:
            - string
            - 'null'
        url:
          type:
            - string
            - 'null'
        error:
          type:
            - object
            - 'null'
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: Opaque API key (sk_live_... / sk_test_...)

````