> ## 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, status, and metadata. 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 and metadata are only accepted for blog posts and changelogs. Inside metadata, send only the fields you want to change; tags and authorIds replace the stored list, and authorIds must come from GET /v1/posts/authors. A blog post that publishes to a Notra Sites site can also credit that site's authors as site:<id>, the ref from GET /v1/sites/{siteId}/authors. Title, slug, markdown, or metadata updates also sync a post linked to GitHub: an open pull request gets a new commit, and a repository set to publish directly gets a direct commit when its live branch allows one (unprotected, file unchanged on GitHub). Otherwise, including closed or merged pull requests, GitHub is left as is and no new pull request is opened; the post is still saved. 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. Breaking changes
    ship under a new major path; deprecated operations send Deprecation and
    Sunset headers at least 90 days before removal.
servers:
  - url: https://api.usenotra.com
    description: Production
  - url: https://demo-api.usenotra.com
    description: >-
      Sandbox with sample data. Get a free sandbox key at demo.usenotra.com, no
      signup needed
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.
  - name: Sites
    description: >-
      Notra Sites are hosted blogs and changelogs built from a GitHub
      repository. Read Sites and their deployments, start builds, preview posts
      on a Site, open pull requests that publish posts to it, and manage
      blog.json authors and the author page through staged Design changes.
      Domains, settings, rollbacks and deletion stay in the dashboard.
externalDocs:
  description: Notra API versioning and deprecation policy
  url: https://www.usenotra.com/docs/api/versioning
paths:
  /v1/posts/{postId}:
    patch:
      tags:
        - Content
      summary: Update a single post
      description: >-
        Updates any combination of title, slug, markdown, status, and metadata.
        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 and metadata are only
        accepted for blog posts and changelogs. Inside metadata, send only the
        fields you want to change; tags and authorIds replace the stored list,
        and authorIds must come from GET /v1/posts/authors. A blog post that
        publishes to a Notra Sites site can also credit that site's authors as
        site:<id>, the ref from GET /v1/sites/{siteId}/authors. Title, slug,
        markdown, or metadata updates also sync a post linked to GitHub: an open
        pull request gets a new commit, and a repository set to publish directly
        gets a direct commit when its live branch allows one (unprotected, file
        unchanged on GitHub). Otherwise, including closed or merged pull
        requests, GitHub is left as is and no new pull request is opened; the
        post is still saved. 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
                metadata:
                  type: object
                  properties:
                    coverImage:
                      type:
                        - object
                        - 'null'
                      properties:
                        url:
                          type: string
                          minLength: 1
                          maxLength: 2048
                        alt:
                          type: string
                          maxLength: 300
                          default: ''
                      required:
                        - url
                      description: >-
                        Cover image as { url, alt }. url must be an https URL
                        (or a Notra upload path returned by the dashboard). Send
                        null to remove the cover.
                      example:
                        url: https://cdn.example.com/covers/ship-notes.png
                        alt: Screenshot of the new editor
                    tags:
                      type: array
                      items:
                        type: string
                        maxLength: 40
                      maxItems: 12
                      description: >-
                        Replaces all tags. Up to 12 tags; duplicates are dropped
                        case-insensitively, keeping the first spelling. Send []
                        to clear.
                      example:
                        - editor
                        - performance
                    excerpt:
                      type:
                        - string
                        - 'null'
                      maxLength: 300
                      description: >-
                        Custom summary for post cards and meta descriptions.
                        Send null or an empty string to derive it from the first
                        paragraph again.
                      example: The editor now opens twice as fast on long posts.
                    authorIds:
                      type: array
                      items:
                        type: string
                        minLength: 1
                        maxLength: 64
                      maxItems: 5
                      description: >-
                        Replaces the credited authors, in display order. Up to 5
                        IDs from GET /v1/posts/authors. A blog post that
                        publishes to a Notra Sites site can also credit the
                        site's own authors as site:<id>, the ref from GET
                        /v1/sites/{siteId}/authors. Send [] to clear.
                      example:
                        - auth_8f2kq1
                    featured:
                      type: boolean
                      description: Pin the post to the top of the blog index.
                      example: true
                    noindex:
                      type: boolean
                      description: >-
                        Ask search engines not to index the post and leave it
                        out of the sitemap.
                      example: false
                    hidden:
                      type: boolean
                      description: >-
                        Hide the post from hosted site listings, feeds, search
                        engine indexing, sitemaps and generated AI indexes while
                        keeping its direct URL accessible. Not private.
                      example: true
                    displayDate:
                      type:
                        - string
                        - 'null'
                      format: date
                      description: >-
                        Date shown on the post as YYYY-MM-DD. Send null to fall
                        back to the publish date.
                      example: '2026-10-01'
                  description: >-
                    Site metadata for blog posts and changelogs. Send only the
                    fields you want to change. Rejected with 400 for other
                    content types.
      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: {}
                      metadata:
                        type:
                          - object
                          - 'null'
                        properties:
                          coverImage:
                            type:
                              - object
                              - 'null'
                            properties:
                              url:
                                type: string
                                description: >-
                                  Absolute https URL, or a path to an image
                                  uploaded in Notra (starting with
                                  /api/uploads/).
                                example: https://cdn.example.com/covers/ship-notes.png
                              alt:
                                type: string
                                description: Alt text. Empty string when none is set.
                                example: Screenshot of the new editor
                            required:
                              - url
                              - alt
                            description: >-
                              Cover image shown on post cards and social
                              previews.
                          tags:
                            type: array
                            items:
                              type: string
                            example:
                              - editor
                              - performance
                          excerpt:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Summary shown on post cards and in meta
                              descriptions. Null means it is derived from the
                              first paragraph.
                            example: The editor now opens twice as fast on long posts.
                          authors:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: auth_8f2kq1
                                slug:
                                  type: string
                                  description: >-
                                    Stable author handle; hosted sites list the
                                    author's posts at /author/{slug}.
                                  example: jane-doe
                                name:
                                  type: string
                                  example: Jane Doe
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Head of Product
                                avatarUrl:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://cdn.example.com/avatars/jane.png
                                url:
                                  type:
                                    - string
                                    - 'null'
                                  description: Author's website.
                                  example: https://janedoe.dev
                                x:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://x.com/janedoe
                                linkedin:
                                  type:
                                    - string
                                    - 'null'
                                github:
                                  type:
                                    - string
                                    - 'null'
                                youtube:
                                  type:
                                    - string
                                    - 'null'
                                bluesky:
                                  type:
                                    - string
                                    - 'null'
                                mastodon:
                                  type:
                                    - string
                                    - 'null'
                                threads:
                                  type:
                                    - string
                                    - 'null'
                                instagram:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - slug
                                - name
                                - title
                                - avatarUrl
                                - url
                                - x
                                - linkedin
                                - github
                                - youtube
                                - bluesky
                                - mastodon
                                - threads
                                - instagram
                            description: >-
                              Credited authors in display order. Authors deleted
                              since they were assigned are omitted. On blog
                              posts that publish to a Notra Sites site, authors
                              whose id starts with site: come from the site's
                              blog.json, unpublished Design changes included.
                          featured:
                            type: boolean
                            description: >-
                              Pinned to the top of the blog index on hosted
                              sites.
                            example: false
                          noindex:
                            type: boolean
                            description: >-
                              Asks search engines not to index the post and
                              leaves it out of the sitemap.
                            example: false
                          hidden:
                            type: boolean
                            description: >-
                              Reachable by direct link, but excluded from hosted
                              site listings, feeds, search engine indexing,
                              sitemaps and generated AI indexes. Not private.
                            example: false
                          displayDate:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Date shown on the post as YYYY-MM-DD. Null means
                              the publish date is used.
                            example: '2026-10-01'
                        required:
                          - coverImage
                          - tags
                          - excerpt
                          - authors
                          - featured
                          - noindex
                          - hidden
                          - displayDate
                        description: >-
                          Cover image, tags, excerpt, authors and other site
                          metadata. Set for blog posts and changelogs, null for
                          every other content type.
                      status:
                        type: string
                        enum:
                          - draft
                          - published
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                    required:
                      - id
                      - title
                      - slug
                      - content
                      - htmlUrl
                      - markdown
                      - rawHtml
                      - recommendations
                      - contentType
                      - metadata
                      - status
                      - createdAt
                      - updatedAt
                required:
                  - organization
                  - post
        '400':
          description: >-
            Invalid path params or request body, slug or metadata sent for an
            unsupported content type, or an unknown author ID
          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. Account
        API keys work in every workspace you belong to: send
        X-Notra-Organization-Id with the workspace id or slug to choose one.
        Workspace endpoints require it when you belong to more than one
        workspace; GET /v1/me/workspaces works without it. Organization keys
        only accept their own workspace there.

````

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