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

# Update a post (content, status, schedule)

> Partial update of a post. Any subset of `content`, `title`,
`contentType` may be sent. Status can be changed via either
`statusCategory` (move to the workspace's default status in
that lifecycle category) or an explicit `statusId` (from
`GET /post-statuses`) — the two are mutually exclusive.

Scheduling is driven by `scheduledFor`:
  * A future ISO timestamp **schedules** (or reschedules) the
    post. Before scheduling, the project's LinkedIn connection
    is verified live (`/me` ping + token refresh for personal
    brands; non-empty admin set for company pages). If LinkedIn
    isn't connected the request fails `409 conflict` and the
    post is left unchanged.
  * `null` **unschedules** the post (reverts to a draft and
    clears its calendar slot).
  * Omitting the field leaves the schedule untouched.

Emits `post.updated`, plus `post.scheduled` / `post.unscheduled`
when the schedule changes.

Required scope: `posts:write`.




## OpenAPI

````yaml /openapi/v1.yaml patch /posts/{postId}
openapi: 3.1.0
info:
  title: Scripe Public API
  version: '2026-08-01'
  summary: Read-only access to Scripe workspaces, projects, notes, posts, and sources.
  description: |
    The Scripe public API gives integrators stable, versioned read access
    to a workspace's content surface. Phase 2 ships read endpoints only;
    write endpoints land in Phase 3.

    All endpoints (except `/v1/health`) require a Bearer API key. Pin the
    API version with the `Scripe-Api-Version` request header to opt out
    of breaking changes.
  contact:
    name: Scripe Support
    url: https://scripe.io/support
    email: support@scripe.io
  license:
    name: Proprietary
servers:
  - url: https://api.scripe.io/v1
    description: Production
security:
  - BearerApiKey: []
tags:
  - name: Health
    description: Liveness and authenticated key smoke tests.
  - name: Workspace
    description: The workspace + principal resolved from your API key.
  - name: Projects
    description: Personal-brand, company-page, and amplifier projects.
  - name: Notes
    description: Project notes with paired calendar slot.
  - name: Posts
    description: Drafts, scheduled, and published LinkedIn posts.
  - name: Analytics
    description: Your own LinkedIn analytics and viral-post inspiration search.
  - name: Sources
    description: Transcriptions (audio/video sources) with truncated body.
  - name: Uploads
    description: >-
      Pre-signed S3 PUT URLs the customer uploads bytes to before referencing
      via Sources or Knowledge.
  - name: Knowledge
    description: >-
      Knowledge-base documents indexed for RAG. Async ingest via text, file,
      URL, or YouTube.
  - name: Jobs
    description: >-
      Async-job lifecycle — submitted via post-generation, knowledge ingest,
      file source.
  - name: Webhooks
    description: |
      Outbound HTTP callbacks. Subscribe an endpoint to one or more
      event names; we POST a signed JSON payload every time a matching
      event fires in the workspace. The signing secret is shown once
      on create and once on rotate — verify the
      `Webhook-Signature: t=<ts>,v1=<hmac>` header on every delivery.
paths:
  /posts/{postId}:
    patch:
      tags:
        - Posts
      summary: Update a post (content, status, schedule)
      description: |
        Partial update of a post. Any subset of `content`, `title`,
        `contentType` may be sent. Status can be changed via either
        `statusCategory` (move to the workspace's default status in
        that lifecycle category) or an explicit `statusId` (from
        `GET /post-statuses`) — the two are mutually exclusive.

        Scheduling is driven by `scheduledFor`:
          * A future ISO timestamp **schedules** (or reschedules) the
            post. Before scheduling, the project's LinkedIn connection
            is verified live (`/me` ping + token refresh for personal
            brands; non-empty admin set for company pages). If LinkedIn
            isn't connected the request fails `409 conflict` and the
            post is left unchanged.
          * `null` **unschedules** the post (reverts to a draft and
            clears its calendar slot).
          * Omitting the field leaves the schedule untouched.

        Emits `post.updated`, plus `post.scheduled` / `post.unscheduled`
        when the schedule changes.

        Required scope: `posts:write`.
      operationId: updatePost
      parameters:
        - $ref: '#/components/parameters/ScripeApiVersion'
        - $ref: '#/components/parameters/IdempotencyKey'
        - name: postId
          in: path
          required: true
          schema:
            type: string
            example: post_a1b2c3d4e5f6g7h8
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostUpdate'
      responses:
        '200':
          description: Post updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostSingle'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: |
            Either an `Idempotency-Key` conflict, or LinkedIn is not
            connected for the post's project (cannot schedule).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    ScripeApiVersion:
      name: Scripe-Api-Version
      in: header
      required: false
      description: |
        Pin the API version. Format `YYYY-MM-DD`. Omit to receive the
        currently rolling default. Unknown versions return `400
        version_unsupported`.
      schema:
        type: string
        example: '2026-08-01'
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: |
        Opaque string (1–64 chars, `[A-Za-z0-9_-]`) used to dedup
        retried writes. Within 24h of the first request, the same key
        + same body returns the original response (`Idempotent-Replayed:
        true`). Same key + different body returns `409
        idempotency_key_conflict`.

        Strongly recommended for every write — see
        `/docs/api/v1/idempotency`.
      schema:
        type: string
        pattern: ^[A-Za-z0-9_-]{1,64}$
  schemas:
    PostUpdate:
      type: object
      description: |
        Partial update. All fields optional. `statusCategory` and
        `statusId` are mutually exclusive. `scheduledFor` accepts a
        future timestamp (schedule/reschedule), `null` (unschedule), or
        may be omitted (leave schedule unchanged).
      properties:
        content:
          type: string
          maxLength: 100000
        title:
          type: string
          maxLength: 500
        contentType:
          type: string
          enum:
            - PERSONAL
            - BUSINESS_INTERNAL
            - BUSINESS_EXTERNAL
            - EDUCATIONAL
            - UNKNOWN
        statusCategory:
          type: string
          enum:
            - suggested
            - draft
            - inProgress
            - review
            - scheduled
            - published
          description: |
            Move the post to the workspace's default status in this
            lifecycle category. Mutually exclusive with `statusId`.
        statusId:
          type: string
          description: |
            Move the post to a specific custom status by id (from
            `GET /post-statuses`). Mutually exclusive with
            `statusCategory`.
        scheduledFor:
          type: string
          format: date-time
          nullable: true
          description: |
            Future ISO timestamp to schedule/reschedule the post (LinkedIn
            connection verified first). `null` unschedules. Omit to leave
            unchanged.
        autoLike:
          type: boolean
          description: Enable auto-like engagement when the post goes live.
        autoComment:
          type: boolean
          description: Enable auto-comment engagement when the post goes live.
    PostSingle:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Post'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
            - docs_url
          properties:
            code:
              type: string
              description: Stable, machine-readable error identifier.
              example: not_found
            message:
              type: string
            request_id:
              type: string
              example: req_a1b2c3d4e5f6
            docs_url:
              type: string
              format: uri
            details:
              description: Optional structured payload — shape varies per code.
    Post:
      type: object
      required:
        - id
        - status
        - platform
        - contentType
        - title
        - content
        - createdAt
      properties:
        id:
          type: string
          example: post_a1b2c3d4e5f6g7h8
        projectId:
          type: string
          nullable: true
        status:
          type: string
        platform:
          type: string
        contentType:
          type: string
        title:
          type: string
        content:
          type: string
        scheduledAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
          nullable: true
  responses:
    BadRequest:
      description: Malformed request (bad cursor, bad limit, etc.).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, malformed, expired, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Plan not eligible, scope missing, or workspace mismatch.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unprocessable:
      description: Body shape was JSON but failed validation (`unprocessable`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Sliding-window rate limit exceeded.
      headers:
        Retry-After:
          schema:
            type: integer
        X-RateLimit-Limit:
          schema:
            type: integer
        X-RateLimit-Remaining:
          schema:
            type: integer
        X-RateLimit-Reset:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerApiKey:
      type: http
      scheme: bearer
      bearerFormat: scripe_sk_live_*
      description: |
        Pass `Authorization: Bearer scripe_sk_live_<...>` (or
        `scripe_sk_test_<...>` for test keys) on every request. Keys
        are scoped to a single workspace and can be revoked from the
        Scripe dashboard.

````