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

# Update a single post

> Updates any combination of title, slug, markdown, and status. Sending markdown re-renders the stored HTML, and when title is omitted it is taken from the first heading in the markdown, keeping the existing title when the markdown has no heading. Slugs are only accepted for blog posts and changelogs. Title, slug, or markdown updates also sync an existing linked GitHub pull request; no new pull request is created. GitHub sync errors occur after saving the post: 429 includes Retry-After, 502 indicates a sync error, and 504 indicates an unknown sync outcome. Check the PR before retrying an unconfirmed sync.



## OpenAPI

````yaml https://api.usenotra.com/openapi.json patch /v1/posts/{postId}
openapi: 3.1.1
info:
  title: Notra API
  version: 1.0.0
  description: >-
    OpenAPI schema for Notra content endpoints. Use GET /v1/status for public
    reachability. Error responses include recovery guidance.
servers:
  - url: https://api.usenotra.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Webhooks
    description: Manage outbound webhook subscriptions and delivery history.
  - name: Discovery
    description: Public API status and authenticated workspace discovery.
  - name: Content
    description: >-
      Manage posts, brand identities, and GitHub or Linear integrations, and
      queue content generation. Organization is inferred from the API key
      (identity.externalId).
  - name: Schedules
    description: >-
      Manage scheduled content generation. Organization is inferred from the API
      key (identity.externalId).
  - name: Event Triggers
    description: >-
      Manage event-based content generation triggered by GitHub webhooks.
      Organization is inferred from the API key (identity.externalId).
  - name: Chats
    description: >-
      Manage chat sessions. Organization is inferred from the API key
      (identity.externalId).
  - name: Skills
    description: >-
      Manage reusable writing skills. Organization is inferred from the API key
      (identity.externalId).
  - name: Feedback
    description: >-
      Collect and triage feedback submitted by AI agents. Agents post to the
      organization's feedback URL without credentials; reading and triage
      require an API key with feedback.read or feedback.write.
  - name: GEO
    description: >-
      Manage generative engine optimization: projects, tracking settings,
      prompts, prompt sequences, competitors, scans, visibility reads, content
      gaps and briefs, agent readiness and AI traffic. Project-scoped endpoints
      require the GEO plan entitlement in addition to their scope;
      organization-level ingest endpoints require only the traffic scope.
paths:
  /v1/posts/{postId}:
    patch:
      tags:
        - Content
      summary: Update a single post
      description: >-
        Updates any combination of title, slug, markdown, and status. Sending
        markdown re-renders the stored HTML, and when title is omitted it is
        taken from the first heading in the markdown, keeping the existing title
        when the markdown has no heading. Slugs are only accepted for blog posts
        and changelogs. Title, slug, or markdown updates also sync an existing
        linked GitHub pull request; no new pull request is created. GitHub sync
        errors occur after saving the post: 429 includes Retry-After, 502
        indicates a sync error, and 504 indicates an unknown sync outcome. Check
        the PR before retrying an unconfirmed sync.
      operationId: updatePost
      parameters:
        - schema:
            type: string
            minLength: 1
            pattern: ^[A-Za-z0-9_-]{1,100}$
            example: post_123
          required: true
          in: path
          name: postId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  minLength: 1
                  maxLength: 120
                  example: Ship notes for week 11
                slug:
                  type:
                    - string
                    - 'null'
                  minLength: 1
                  maxLength: 160
                  pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                  example: ship-notes-week-11
                markdown:
                  type: string
                  minLength: 1
                  maxLength: 100000
                  example: |-
                    # Ship notes

                    We shipped a faster editor.
                status:
                  type: string
                  enum:
                    - draft
                    - published
                  example: published
      responses:
        '200':
          description: Post updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  organization:
                    type: object
                    properties:
                      id:
                        type: string
                      slug:
                        type: string
                      name:
                        type: string
                      logo:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - slug
                      - name
                      - logo
                  post:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type: string
                      slug:
                        type:
                          - string
                          - 'null'
                      content:
                        type: string
                        description: >-
                          Rendered HTML for text posts. For image posts, this is
                          the public CDN URL of the rendered image.
                      htmlUrl:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Public CDN URL of the generated HTML artifact for
                          image posts. Null for non-image posts.
                      markdown:
                        type:
                          - string
                          - 'null'
                        description: Markdown source for text posts. Null for image posts.
                      rawHtml:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Legacy inline generated HTML for image posts. New
                          generated image HTML is stored as htmlUrl. Null for
                          non-image posts.
                      recommendations:
                        type:
                          - string
                          - 'null'
                      contentType:
                        type: string
                        enum:
                          - changelog
                          - linkedin_post
                          - twitter_post
                          - blog_post
                          - investor_update
                          - image
                      sourceMetadata: {}
                      status:
                        type: string
                        enum:
                          - draft
                          - published
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                    required:
                      - id
                      - title
                      - slug
                      - content
                      - htmlUrl
                      - markdown
                      - rawHtml
                      - recommendations
                      - contentType
                      - status
                      - createdAt
                      - updatedAt
                required:
                  - organization
                  - post
        '400':
          description: Invalid path params or request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Post not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Post slug already exists or concurrent modification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Post update or GitHub publish rate limit exceeded. The error states
            whether the post was already saved; Retry-After specifies when to
            retry.
          headers:
            RateLimit-Limit:
              description: Maximum requests allowed in the current window.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the current window resets.
              schema:
                type: integer
            Retry-After:
              description: Seconds the client should wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
        '502':
          description: Post saved, but linked GitHub pull request sync failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Authentication service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '504':
          description: Post saved; GitHub sync timed out with an unknown outcome
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        recovery:
          type: string
      required:
        - error
    RateLimitErrorResponse:
      type: object
      properties:
        error:
          type: string
        limit:
          type: integer
          minimum: 1
        remaining:
          type: integer
          minimum: 0
        reset:
          type: integer
      required:
        - error
        - limit
        - remaining
        - reset
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Send your API key in the Authorization header as Bearer API_KEY.

````

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