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

# Edit a draft or scheduled post

> Partial update: only the fields you send change; everything else on
the post (including fields the API does not expose) is preserved.
Main account only in v1.

Status transitions are explicit: sending `scheduled_for` alone never
schedules a draft. Set `status` to `"scheduled"` to promote (needs a
future time, provided or already stored: at least 60 seconds ahead,
at most 18 months) or `"draft"` to pull a post back out of the queue.
Both directions ride the normal post-quota deduct/refund.

`parts` is a FULL replace, media included: a part sent without
`media` drops any media it carried. Re-include the current
`object_key`s (visible on GET responses) to keep them, add new ones
from `POST /v1/media`, or omit `parts` entirely to edit only
title/scratchpad/time/status without touching text or media.
No `Idempotency-Key` handling: PATCH is naturally idempotent.
Concurrent edits are last-write-wins.

Advanced settings (`auto_retweet`, `auto_delete`, `auto_plug`,
`super_followers_only`) use the same shapes as create but never
inherit defaults on update: provided = override, omitted = keep the
post's current setting, `null` = remove it. Auto DM has no parameter
and always round-trips untouched.




## OpenAPI

````yaml /api-reference/openapi.yaml patch /v1/scheduled-posts/{id}
openapi: 3.1.0
info:
  title: SuperX API
  version: 1.0.0
  description: >
    The SuperX public API: your Twitter/X content, analytics, audience and

    scheduling data over REST.


    All endpoints require an API key (`Authorization: Bearer sxk_...`) except

    `GET /v1/docs`. Keys are created in the SuperX app under Account > API / MCP
    / CLI

    and are server-side secrets.


    Timestamps are UTC ISO-8601 in both directions; inputs must carry an
    explicit

    `Z` or numeric offset. Every authenticated response carries

    `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`
    headers.
  contact:
    name: SuperX
    url: https://superx.so
servers:
  - url: https://api.superx.so
security:
  - apiKey: []
tags:
  - name: Identity
  - name: Content
  - name: Analytics
  - name: Inspiration
  - name: Audience
  - name: Contact Lists
  - name: Signals
  - name: Media
  - name: Scheduling
  - name: Tags
  - name: Context
  - name: Queue
  - name: Articles
  - name: Meta
paths:
  /v1/scheduled-posts/{id}:
    patch:
      tags:
        - Scheduling
      summary: Edit a draft or scheduled post
      description: |
        Partial update: only the fields you send change; everything else on
        the post (including fields the API does not expose) is preserved.
        Main account only in v1.

        Status transitions are explicit: sending `scheduled_for` alone never
        schedules a draft. Set `status` to `"scheduled"` to promote (needs a
        future time, provided or already stored: at least 60 seconds ahead,
        at most 18 months) or `"draft"` to pull a post back out of the queue.
        Both directions ride the normal post-quota deduct/refund.

        `parts` is a FULL replace, media included: a part sent without
        `media` drops any media it carried. Re-include the current
        `object_key`s (visible on GET responses) to keep them, add new ones
        from `POST /v1/media`, or omit `parts` entirely to edit only
        title/scratchpad/time/status without touching text or media.
        No `Idempotency-Key` handling: PATCH is naturally idempotent.
        Concurrent edits are last-write-wins.

        Advanced settings (`auto_retweet`, `auto_delete`, `auto_plug`,
        `super_followers_only`) use the same shapes as create but never
        inherit defaults on update: provided = override, omitted = keep the
        post's current setting, `null` = remove it. Auto DM has no parameter
        and always round-trips untouched.
      operationId: updateScheduledPost
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: >-
                    Replacement text (single post). Provide either `text` or
                    `parts`, not both.
                parts:
                  type: array
                  description: >-
                    Replacement parts (full replace, media included), 1 to 25
                    items, 25,000 characters total. A part without `media` drops
                    the media it carried.
                  items:
                    type: object
                    required:
                      - text
                    properties:
                      text:
                        type: string
                      media:
                        type: array
                        maxItems: 4
                        description: >-
                          Images for this part (up to 4, or exactly 1 GIF).
                          Re-list existing `object_key`s to keep them; new ones
                          come from `POST /v1/media`.
                        items:
                          type: object
                          required:
                            - object_key
                          properties:
                            object_key:
                              type: string
                            alt_text:
                              type: string
                              maxLength: 1000
                scheduled_for:
                  type: string
                  format: date-time
                  description: >-
                    New time, UTC ISO-8601 with explicit Z or offset. On its own
                    it never promotes a draft.
                status:
                  type: string
                  enum:
                    - draft
                    - scheduled
                  description: >-
                    Explicit transition. `scheduled` requires a future time (via
                    `scheduled_for` or already stored).
                title:
                  type: string
                  maxLength: 300
                  nullable: true
                  description: New title; `null` clears it.
                scratchpad:
                  type: string
                  maxLength: 30000
                  nullable: true
                  description: New notes; `null` clears them.
                tags:
                  type: array
                  maxItems: 20
                  description: >-
                    Full replacement tag id set. `[]` clears all tags. Unknown
                    ids fail with `400 unknown_tag`.
                  items:
                    type: string
                auto_retweet:
                  type: object
                  nullable: true
                  description: >-
                    Auto retweet override; `null` removes it. Omit to keep the
                    current setting.
                  required:
                    - after_hours
                  properties:
                    after_hours:
                      type: integer
                      minimum: 1
                      maximum: 12
                    remove_after_hours:
                      type: integer
                      minimum: 1
                      maximum: 12
                auto_delete:
                  type: object
                  nullable: true
                  description: >-
                    Auto delete override; `null` removes it. Omit to keep the
                    current setting.
                  required:
                    - after_hours
                  properties:
                    after_hours:
                      type: integer
                      minimum: 1
                      maximum: 12
                    threshold:
                      type: integer
                      minimum: 0
                      description: Views threshold (default 1000).
                auto_plug:
                  type: object
                  nullable: true
                  description: >-
                    Auto plug override; `null` removes it. Omit to keep the
                    current setting. Unknown template ids fail with `400
                    unknown_plug_template`.
                  required:
                    - template_id
                    - threshold
                  properties:
                    template_id:
                      type: string
                      description: Plug template id (from `GET /v1/plug-templates`).
                    threshold:
                      type: integer
                      minimum: 1
                super_followers_only:
                  type: boolean
                  description: >-
                    Post to Super Followers only. Omit to keep the current
                    setting.
                account_id:
                  type: string
                  description: Must be your main account (or omitted).
            examples:
              retitle:
                summary: Change only the title
                value:
                  title: Launch teaser v2
              remove_auto_retweet:
                summary: Remove the post's auto retweet
                value:
                  auto_retweet: null
              promote:
                summary: Promote a draft to the queue
                value:
                  scheduled_for: '2026-08-01T15:00:00Z'
                  status: scheduled
              retag:
                summary: Replace the tag set
                value:
                  tags:
                    - V1StGXR8_Z5jdHi6B-myT
      responses:
        '200':
          description: The full updated post.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ScheduledPost'
              example:
                data:
                  id: Fq2xWnA0kLpR7sVtYu3zc
                  status: draft
                  scheduled_for: null
                  parts:
                    - text: 'Rough idea: why most scheduling tools get threads wrong.'
                  title: Launch teaser v2
                  scratchpad: null
                  tags: []
                  created_at: '2026-07-05T20:11:00.000Z'
        '400':
          description: >-
            Invalid parameter, unknown tag id (`unknown_tag`), unknown plug
            template id (`unknown_plug_template`), a missing future time for
            `status:"scheduled"`, or a media problem: unknown or foreign
            `object_key` (`invalid_media`), bytes never uploaded
            (`media_not_uploaded`), not a supported image
            (`unsupported_media_type`), or over the size cap
            (`media_too_large`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                error:
                  code: invalid_media
                  message: >-
                    Unknown object_key: u123/api_..._chart.png. Upload media
                    first via POST /v1/media.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Read-only key (`insufficient_scope`), linked account
            (`writes_main_account_only`), or a lapsed subscription (legacy
            string envelope).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorEnvelope'
                  - $ref: '#/components/schemas/LegacyErrorEnvelope'
              example:
                error:
                  code: insufficient_scope
                  message: >-
                    This API key is read-only. Create a key with the write scope
                    to use this endpoint.
        '404':
          description: No scheduled post with that id belongs to this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                error:
                  code: not_found
                  message: No scheduled post with that id belongs to this account.
        '409':
          description: The post is not editable (already sent or errored).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                error:
                  code: post_not_editable
                  message: Only drafts and scheduled posts can be edited.
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          $ref: '#/components/responses/UpstreamError'
        '503':
          $ref: '#/components/responses/UpstreamUnavailable'
components:
  headers:
    X-RateLimit-Limit:
      description: The limit of the rate window closest to exhaustion.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests remaining in that window.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix timestamp (seconds) when that window resets.
      schema:
        type: integer
  schemas:
    ScheduledPost:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - draft
            - scheduled
            - sent
            - error
        scheduled_for:
          type: string
          format: date-time
          nullable: true
          description: Null for drafts.
        parts:
          type: array
          items:
            type: object
            properties:
              text:
                type: string
              media:
                type: array
                description: Present only when the part carries media.
                items:
                  type: object
                  properties:
                    object_key:
                      type: string
                      description: Re-use this on PATCH to keep the attachment.
                    url:
                      type: string
                    file_type:
                      type: string
                    size:
                      type: integer
                      nullable: true
                    alt_text:
                      type: string
                      nullable: true
        title:
          type: string
          nullable: true
          description: Draft title shown in the SuperX app. Never posted.
        scratchpad:
          type: string
          nullable: true
          description: Private working notes. Never posted.
        tags:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              color:
                type: string
        created_at:
          type: string
          format: date-time
          nullable: true
        auto_retweet:
          type: object
          nullable: true
          description: Applied auto-retweet setting; null when off.
          properties:
            after_hours:
              type: integer
              nullable: true
            remove_after_hours:
              type: integer
              nullable: true
        auto_delete:
          type: object
          nullable: true
          description: Applied auto-delete setting; null when off.
          properties:
            after_hours:
              type: integer
              nullable: true
            threshold:
              type: integer
              nullable: true
        auto_plug:
          type: object
          nullable: true
          description: Applied auto-plug setting; null when off.
          properties:
            template_id:
              type: string
              nullable: true
            threshold:
              type: integer
              nullable: true
        auto_dm:
          type: object
          nullable: true
          description: >-
            Applied Auto DM setting (inherit-only, read-only); null when off.
            The DM text stays in the SuperX app.
          properties:
            enabled:
              type: boolean
            max_dms:
              type: integer
              nullable: true
            batch_mode:
              type: boolean
            triggers:
              type: object
              properties:
                reply:
                  type: boolean
                retweet:
                  type: boolean
        super_followers_only:
          type: boolean
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code.
            message:
              type: string
            retry_after:
              type: integer
              description: Seconds to wait before retrying (rate-limit errors only).
    LegacyErrorEnvelope:
      type: object
      required:
        - error
      description: |
        Legacy shape used ONLY by the shared subscription middleware: a plain
        string `error` field. Seen on `403` when the subscription has lapsed
        (string starts with "subscription_required:") and on `500` when
        subscription verification fails (string starts with "internal_error:").
      properties:
        error:
          type: string
          example: >-
            subscription_required: The SuperX API requires an active
            subscription
  responses:
    Unauthorized:
      description: >-
        Missing/malformed Authorization header (`unauthorized`) or an
        unknown/revoked key (`invalid_api_key`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: invalid_api_key
              message: Unknown or revoked API key
    RateLimited:
      description: Rate limit exceeded (limits vary by plan). Honor Retry-After.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: rate_limited
              message: >-
                Rate limit exceeded for the Pro plan (30 requests/min). Upgrade
                for higher limits.
              retry_after: 42
    UpstreamError:
      description: A dependent SuperX service returned an unexpected response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: upstream_error
              message: Failed to fetch scheduled posts. Try again shortly.
    UpstreamUnavailable:
      description: >-
        The scheduling service is temporarily unreachable. Safe to retry; reuse
        your Idempotency-Key on POST.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: upstream_unavailable
              message: >-
                The scheduling service is temporarily unavailable. Retry with
                the same Idempotency-Key.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A SuperX API key ("sxk_..."), created in the SuperX app under Account >
        API / MCP / CLI. Keys are server-side secrets.

````