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

# Get a revision



## OpenAPI

````yaml /openapi.json get /v1/records/{record_id}/revisions/{revision}
openapi: 3.1.1
info:
  title: Nohead API
  version: 1.0.0
  summary: Programmable content and data API.
  contact:
    name: Nohead
    email: hello@nohead.io
    url: https://nohead.io
  description: >
    The Nohead API manages projects, collections (your data models), their

    fields, and records (your content), with full version history.


    ## Authentication


    Send `Authorization: Bearer <token>`. Servers, CI and agents use a

    project API key (`nohead_sk_...`, or `nohead_pk_...` for a published-only

    key; created in the web app under API keys)

    with scopes such as `records:read` or `schema:write`. Organization,

    project, member and API key management need a person signed in to the

    web app and are not available to API keys.


    ## Resources and IDs


    Every object has an `object` type, and every resource with an identity of

    its own an opaque, prefixed `id` (`col_`, `fld_`, `rec_`, ...). Record
    values live under `data`, keyed by each

    field's `key`. Timestamps are ISO 8601 in UTC. Deleting a record,

    collection, field, asset or webhook is soft: it can be restored until its

    `purge_after`.


    ## Lists


    Lists return `{ "data": [...], "meta": { "next_cursor", "has_more" } }`.

    Pass `limit` (1-100) and `cursor` to page, and `sort` (prefix `-` for

    descending). Records also take `filter[<key>]=value`,

    `filter[published_at][exists]=true` and `expand=<relation, asset or

    rich text fields>`.


    ## Errors


    Errors share one envelope: `{ "error": { "type", "message",

    "request_id", "details" } }`. `details` lists field-level problems as

    `{ "field", "code", "message" }`. Include the `request_id` when asking

    for support.


    ## Safe retries and concurrent edits


    Send `Idempotency-Key` on any `POST`, `PUT`, `PATCH` or `DELETE` to make
    retrying

    it safe: the first result is stored for 24 hours and returned again for

    the same request. Record responses carry the record's revision as an

    `ETag`; send it back as `If-Match` to update only if nobody changed the

    record in the meantime (`412` otherwise).


    ## History


    Every change to a record is a revision, attributed to the person or API

    key that made it: record revisions can be listed, diffed and reverted,

    and collections keep a schema history. Send `Nohead-Change-Note` to

    record why a change was made. Changes that rewrite existing values

    (such as a field's type) are explicit, previewable field migrations.


    How long revisions are kept depends on the organization's plan. Older

    ones are removed, but every record keeps its first revision and its

    last 10; `history_pruned_through` says how far history was removed.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.nohead.io
    description: Production
security:
  - apiKey: []
tags:
  - name: records
    x-group: Records
    description: Content entries, one at a time or many at once.
  - name: publishing
    x-group: Publishing
    description: Making records live, now or at a set time, and taking them down.
  - name: revisions
    x-group: Revisions
    description: A record's history, comparing two revisions, and going back to one.
  - name: drafts
    x-group: Drafts
    description: Changes to a record that wait to be merged into it, now or at a set time.
  - name: collections
    x-group: Collections
    description: User-defined data models.
  - name: schema-changes
    x-group: Schema changes
    description: A collection's schema history, and its schema at any version.
  - name: fields
    x-group: Fields
    description: Field definitions of a collection.
  - name: migrations
    x-group: Field migrations
    description: Explicit field changes that rewrite existing record values, with previews.
  - name: assets
    x-group: Assets
    description: Files stored for a project, uploaded directly to storage.
  - name: search
    x-group: Search
    description: Full-text search in collections and across a project.
  - name: webhooks
    x-group: Webhooks
    description: Event notifications sent to your URLs, and the secrets that sign them.
  - name: deliveries
    x-group: Webhook deliveries
    description: Each event sent to a webhook, its attempts, and retrying it.
  - name: audit
    x-group: Activity log
    description: The append-only trail of who changed what, through which client.
  - name: system
    x-group: System
    description: Service status, the caller, and its feature flags.
paths:
  /v1/records/{record_id}/revisions/{revision}:
    parameters:
      - $ref: '#/components/parameters/RecordId'
      - $ref: '#/components/parameters/RevisionNumber'
    get:
      tags:
        - revisions
      summary: Get a revision
      operationId: record_revisions_get
      responses:
        '200':
          description: The revision with its snapshot and changes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordRevisionDetail'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      x-codeSamples:
        - lang: typescript
          label: TypeScript
          source: >
            import { Nohead } from "@nohead/sdk"


            const nohead = new Nohead()


            const result = await nohead.records.revisions.get("rec_01J9ZQ3F8X",
            1)
        - lang: python
          label: Python
          source: |
            from nohead import Nohead

            nohead = Nohead()

            result = nohead.records.revisions.get("rec_01J9ZQ3F8X", 1)
        - lang: ruby
          label: Ruby
          source: |
            require "nohead"

            nohead = Nohead::Client.new

            result = nohead.records.revisions.get("rec_01J9ZQ3F8X", 1)
components:
  parameters:
    RecordId:
      name: record_id
      in: path
      required: true
      schema:
        type: string
      example: rec_01J9ZQ3F8X5W2K7M4N6P0R1S2T
    RevisionNumber:
      name: revision
      in: path
      required: true
      description: Per-record revision number.
      schema:
        type: integer
        minimum: 1
  schemas:
    RecordRevisionDetail:
      allOf:
        - $ref: '#/components/schemas/RecordRevisionProperties'
        - type: object
          required:
            - published_at
            - data
            - changes
          properties:
            published_at:
              $ref: '#/components/schemas/NullableTimestamp'
            data:
              $ref: '#/components/schemas/RecordData'
            changes:
              type: array
              items:
                $ref: '#/components/schemas/Change'
      unevaluatedProperties: false
    RecordRevisionProperties:
      type: object
      required:
        - id
        - object
        - record_id
        - revision
        - operation
        - actor
        - via
        - note
        - schema_version
        - reverted_to_revision
        - changed_fields
        - redacted_fields
        - draft
        - created_at
      properties:
        id:
          type: string
          examples:
            - rev_01J9ZQ3F8X5W2K7M4N6P0R1S2T
        object:
          const: record_revision
        record_id:
          type: string
        revision:
          type: integer
        operation:
          $ref: '#/components/schemas/RecordRevisionOperation'
        actor:
          $ref: '#/components/schemas/Actor'
        via:
          $ref: '#/components/schemas/Via'
        note:
          type:
            - string
            - 'null'
        schema_version:
          type: integer
        reverted_to_revision:
          type:
            - integer
            - 'null'
        changed_fields:
          type: array
          description: Keys of changed fields, and changed attributes.
          items:
            type: string
        redacted_fields:
          type: array
          description: |
            Keys of fields whose values in this revision were redacted (owners
            and admins redact them in the web app); those values read
            `{"$redacted": true}`.
          items:
            type: string
        draft:
          description: >-
            For a `merge`, the draft it merged, with who started and edited it;
            null otherwise.
          anyOf:
            - $ref: '#/components/schemas/MergedDraft'
            - type: 'null'
        created_at:
          $ref: '#/components/schemas/Timestamp'
    NullableTimestamp:
      type:
        - string
        - 'null'
      format: date-time
    RecordData:
      type: object
      description: >
        Field values keyed by field `key`.


        A rich text value is written as Markdown (GitHub Flavored, a string)

        or as a ProseMirror JSON document (`{"type": "doc", "content": [...]}`),

        and stored and read as the document (`rich_text` reads it as HTML or

        Markdown). Markdown is converted as closely as the vocabulary allows:

        headings below h3 become h3, task list items plain items, footnotes and

        raw HTML text. A document uses the web editor's vocabulary (Tiptap's

        StarterKit and tables) and nothing else; another name is refused with

        `invalid_format`, naming ours where one fits (`strong` is `bold`):


        - blocks: `paragraph`, `heading` (`level` 1-3), `blockquote`,
          `bulletList` and `orderedList` (`start`, `type`) of `listItem`
          (starting with a paragraph), `codeBlock` (`language`),
          `horizontalRule`, and `table` of `tableRow` of `tableHeader` or
          `tableCell` (`colspan`, `rowspan`, `colwidth`, `align`); any block
          may have `dir` (`auto`, `ltr`, `rtl`);
        - inline: `text` (non-empty) and `hardBreak`;

        - marks on text: `bold`, `italic`, `strike`, `underline`, `code`
        (alone),
          and `link` (`href`, and `target`, `rel`, `class`, `title`); a link's
          `href` is an `http`, `https`, `mailto`, `tel` or relative URL.

        An image of an asset is `{"type": "image", "attrs": {"asset_id":

        "ast_...", "alt": "..."}}` (in Markdown `![alt](ast_...)`, or the

        asset's `image_url`), between the document's blocks (not inside a list,

        quote or table), at most 100 per document (`too_many_images`); a newly

        shown image must be an uploaded JPEG, PNG, GIF, WebP, AVIF or SVG of

        the project (`invalid_reference`, `type_not_accepted`). `expand` embeds

        the assets, and published-only keys can read the images of published

        records. A record holds at

        most 2,000,000 bytes of values, all fields together (`too_large` on

        `data`); one already larger can still be edited without growing.
      additionalProperties: true
      examples:
        - title: Introducing Foo
          body:
            type: doc
            content: []
    Change:
      type: object
      description: |
        One change between two states. Field changes carry `field` (current API
        key) and the stable `field_id`; attribute changes (`published_at`,
        `deleted_at`) carry `attribute`.
      additionalProperties: false
      required:
        - kind
      properties:
        field:
          type:
            - string
            - 'null'
          description: >-
            The field's key now, after any rename (its last key if it was
            deleted); null if the field no longer exists.
        field_id:
          type: string
        field_deleted:
          type: boolean
          description: Whether the field has been deleted since.
        attribute:
          type: string
          enum:
            - published_at
            - deleted_at
        kind:
          type: string
          enum:
            - added
            - changed
            - removed
        before: {}
        after: {}
    Error:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - type
            - message
            - request_id
          properties:
            type:
              $ref: '#/components/schemas/ErrorType'
            message:
              type: string
            request_id:
              $ref: '#/components/schemas/RequestId'
            details:
              type: array
              items:
                $ref: '#/components/schemas/ErrorDetail'
    RecordRevisionOperation:
      type: string
      description: What made the revision; `merge` is a draft's changes.
      enum:
        - create
        - update
        - publish
        - unpublish
        - delete
        - restore
        - revert
        - migrate
        - merge
    Actor:
      type: object
      additionalProperties: false
      required:
        - type
        - id
        - name
      properties:
        type:
          type: string
          enum:
            - user
            - api_key
            - system
        id:
          type:
            - string
            - 'null'
          description: >-
            The user (`usr_...`) or API key (`key_...`), or null for system
            changes.
        name:
          type:
            - string
            - 'null'
          description: |
            Resolved when read, never stored: a user's current name (or
            email), "Deleted user" once they deleted their account, an API
            key's name, or "System".
    Via:
      type: string
      description: The client a change came through; `scheduler` for scheduled changes.
      enum:
        - ui
        - api
        - cli
        - sdk
        - mcp
        - system
        - scheduler
    MergedDraft:
      type: object
      additionalProperties: false
      required:
        - id
        - created_at
        - created_by
        - edited_by
      description: The draft a `merge` revision merged, which is gone since.
      properties:
        id:
          type: string
        created_at:
          $ref: '#/components/schemas/Timestamp'
        created_by:
          $ref: '#/components/schemas/Actor'
        edited_by:
          type: array
          items:
            $ref: '#/components/schemas/Actor'
    Timestamp:
      type: string
      format: date-time
      description: ISO 8601 timestamp in UTC.
      examples:
        - '2026-09-27T12:00:00.000Z'
    RequestId:
      type: string
      pattern: ^req_[A-Za-z0-9]+$
      examples:
        - req_01J9ZQ3F8X5W2K7M4N6P0R1S2T
    ErrorType:
      type: string
      enum:
        - invalid_request
        - authentication_error
        - plan_limit_exceeded
        - authorization_error
        - not_found
        - conflict
        - precondition_failed
        - validation_error
        - rate_limited
        - internal_error
        - service_unavailable
    ErrorDetail:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        field:
          type: string
          description: Key of the offending field or parameter, when applicable.
        code:
          type: string
          description: Machine-readable error code, e.g. `required`.
        message:
          type: string
        usage:
          type: integer
          description: Current usage, for `plan_limit` details.
        limit:
          type: integer
          description: The plan's limit, for `plan_limit` details.
        current_revision:
          type: integer
          description: The resource's current revision, for `revision_mismatch` details.
        record_id:
          type: string
          description: The record that already has the value, for `taken` details.
        draft_id:
          type: string
          description: The record's draft, for `draft_exists` and `draft_pending` details.
  responses:
    BadRequest:
      description: >-
        The request was malformed: unparseable JSON, an invalid query parameter,
        or a body key the operation doesn't take (detail code
        `unknown_parameter`, naming the key).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication is missing or invalid.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The caller is not allowed to perform this action.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The resource does not exist or is not visible to the caller.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: >
        Too many requests for this API key or user (or, with failing

        credentials, this IP address). A published-only key is counted per

        client IP. Wait `Retry-After` seconds; retries with the same
        `Idempotency-Key`

        are safe. On the Free plan, an organization's API keys are also

        refused once its API requests reach the month's limit, with a

        `plan_limit` detail (`field` `api_requests`, `usage` and `limit`),

        until the next month (UTC) or an upgrade.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    RequestId:
      description: Unique identifier for the request, also echoed in error bodies.
      schema:
        $ref: '#/components/schemas/RequestId'
    RateLimitLimit:
      description: >-
        Requests allowed in the current window. Sent on every authenticated
        response.
      schema:
        type: integer
    RateLimitRemaining:
      description: Requests left in the current window.
      schema:
        type: integer
    RateLimitReset:
      description: Seconds until the window resets.
      schema:
        type: integer
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: |
        Project-scoped API key, e.g. `nohead_sk_k7fz0a9c3m2q_<secret>`, or
        `nohead_pk_…` for a published-only key. Used by servers, CI, the CLI
        and coding agents.

````

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