> ## 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.

# Migrate a field

> Changes one of the collection's fields (`field_id`) in a way that
rewrites existing record values: its `type`, `multiple`, a stricter
`configuration`, a date's `include_time`, or making it `required`
with a `backfill` for records that have no value.

Every record is checked first. With `dry_run=true` the result is a
preview: counts per outcome and sample records, nothing written. Without
it, a migration whose values do not all convert is refused (`422`)
unless `on_invalid` is `clear`; otherwise it is accepted (`202`) and
applied in the background. Poll `GET /v1/migrations/{migration_id}`.

While a migration is pending or running, schema writes to the collection
return `409`, and record writes do once it is running (a pending one may
wait for others to finish). A value written while it waits that does
not convert fails the migration, or is cleared with `on_invalid: clear`. Each record whose data changes gets a
`migrate` revision, so cleared or converted values stay recoverable.
A dry run's preview shows sample record values, so it also needs
`records:read`.




## OpenAPI

````yaml /openapi.json post /v1/collections/{collection_id}/migrations
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/collections/{collection_id}/migrations:
    parameters:
      - $ref: '#/components/parameters/CollectionRef'
    post:
      tags:
        - migrations
      summary: Migrate a field
      description: >
        Changes one of the collection's fields (`field_id`) in a way that

        rewrites existing record values: its `type`, `multiple`, a stricter

        `configuration`, a date's `include_time`, or making it `required`

        with a `backfill` for records that have no value.


        Every record is checked first. With `dry_run=true` the result is a

        preview: counts per outcome and sample records, nothing written. Without

        it, a migration whose values do not all convert is refused (`422`)

        unless `on_invalid` is `clear`; otherwise it is accepted (`202`) and

        applied in the background. Poll `GET /v1/migrations/{migration_id}`.


        While a migration is pending or running, schema writes to the collection

        return `409`, and record writes do once it is running (a pending one may

        wait for others to finish). A value written while it waits that does

        not convert fails the migration, or is cleared with `on_invalid: clear`.
        Each record whose data changes gets a

        `migrate` revision, so cleared or converted values stay recoverable.

        A dry run's preview shows sample record values, so it also needs

        `records:read`.
      operationId: migrations_create
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
        - name: dry_run
          in: query
          schema:
            type: boolean
            default: false
        - $ref: '#/components/parameters/NoheadClient'
        - $ref: '#/components/parameters/ChangeNote'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldMigrationRequest'
      responses:
        '200':
          description: A preview (dry runs only).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldMigrationPreview'
        '202':
          description: The migration was accepted and will be applied in the background.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldMigration'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '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.migrations.create("posts", {
              field_id: "fld_01J9ZQ3F8X",
              type: "long_text",
              dry_run: true,
            })
        - lang: python
          label: Python
          source: |
            from nohead import Nohead

            nohead = Nohead()

            result = nohead.migrations.create(
                "posts", field_id="fld_01J9ZQ3F8X", type="long_text", dry_run=True
            )
        - lang: ruby
          label: Ruby
          source: >
            require "nohead"


            nohead = Nohead::Client.new


            result = nohead.migrations.create("posts", field_id:
            "fld_01J9ZQ3F8X", type: "long_text", dry_run: true)
components:
  parameters:
    CollectionRef:
      name: collection_id
      in: path
      required: true
      description: >-
        Collection ID, or the collection slug when authenticating with an API
        key.
      schema:
        type: string
      example: col_01J9ZQ3F8X5W2K7M4N6P0R1S2T
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: |
        A unique value (1-255 printable ASCII characters) that makes retrying
        this request safe. The first response (below 500) is stored for 24
        hours per user or API key; retries with the same key and the same
        request get it again with an `Idempotent-Replayed: true` header. The
        same key with a different request is refused with `400`; a retry while
        the first request is still running gets `409`.
      schema:
        type: string
        minLength: 1
        maxLength: 255
      example: 8f14e45f-ceea-467a-9575-0f1a3f2c1d2e
    NoheadClient:
      name: Nohead-Client
      in: header
      description: >-
        First-party client identifier recorded in history (e.g. `cli/0.3.1`).
        Informational only.
      schema:
        type: string
    ChangeNote:
      name: Nohead-Change-Note
      in: header
      description: |
        Optional reason for the change, kept with the record revision, schema
        change or field migration it makes (at most 500 characters once
        decoded). Percent-encoded UTF-8, as
        `encodeURIComponent` encodes it, so any language fits in a header:
        `Rettet%20stavefejl%20p%C3%A5%20forsiden`. Plain ASCII may be sent
        as is. Other bytes are `400`.
      schema:
        type: string
  schemas:
    FieldMigrationRequest:
      type: object
      additionalProperties: false
      required:
        - field_id
      description: >-
        The field, and the parts of its definition to change; omitted parts stay
        as they are.
      properties:
        field_id:
          type: string
          description: One of the collection's fields (`422` otherwise).
          examples:
            - fld_01J9ZQ3F8X5W2K7M4N6P0R1S2T
        type:
          $ref: '#/components/schemas/FieldType'
        configuration:
          $ref: '#/components/schemas/FieldConfiguration'
          description: >-
            The complete new configuration. When the type changes and this is
            omitted, only `description`, `searchable`, `filterable` and
            `sortable` carry over.
        multiple:
          type: boolean
          description: >-
            A list of distinct values (a repeated value is refused with
            `duplicate_value`, an empty string with `blank_value`). Not
            available for boolean, long_text, rich_text and json fields.
        required:
          type: boolean
        backfill:
          description: >-
            Value for active records that have no value, validated like a record
            value of the new definition; an empty string is refused with
            `blank_value`.
        on_invalid:
          type: string
          enum:
            - fail
            - clear
          default: fail
          description: >-
            `clear` removes values that cannot be converted (or backfills them);
            `fail` refuses the migration.
        time_zone:
          type: string
          description: |
            When a date field's `include_time` is turned off: the IANA time zone
            (e.g. `Europe/Copenhagen`) whose day each moment falls on. Default:
            the field's `time_zone`, else UTC. Refused for any other change.
          examples:
            - Europe/Copenhagen
    FieldMigrationPreview:
      type: object
      additionalProperties: false
      required:
        - object
        - field_id
        - from
        - to
        - conversion
        - records
        - samples
      properties:
        object:
          const: field_migration_preview
        field_id:
          type: string
        from:
          $ref: '#/components/schemas/FieldDefinition'
        to:
          $ref: '#/components/schemas/FieldDefinition'
        conversion:
          type: string
          enum:
            - safe
            - convertible
            - conditional
          description: >-
            `safe`: every value converts unchanged in meaning. `convertible`:
            every value converts, the representation changes. `conditional`:
            some values may not convert.
        records:
          $ref: '#/components/schemas/FieldMigrationCounts'
        samples:
          type: array
          description: Up to 10 affected records, invalid ones first.
          items:
            type: object
            additionalProperties: false
            required:
              - record_id
              - deleted_at
              - outcome
              - before
              - after
              - error
            properties:
              record_id:
                type: string
              deleted_at:
                $ref: '#/components/schemas/NullableTimestamp'
              outcome:
                type: string
                enum:
                  - converted
                  - backfilled
                  - cleared
                  - invalid
              before:
                description: The stored value before the migration, or null.
              after:
                description: >-
                  The value after the migration, or null when cleared or
                  invalid.
              error:
                oneOf:
                  - type: 'null'
                  - type: object
                    additionalProperties: false
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                      message:
                        type: string
    FieldMigration:
      type: object
      additionalProperties: false
      required:
        - id
        - object
        - collection_id
        - field_id
        - status
        - from
        - to
        - backfill
        - on_invalid
        - time_zone
        - records
        - failure
        - schema_change_id
        - cancel_requested_at
        - actor
        - via
        - note
        - request_id
        - created_at
        - started_at
        - completed_at
      properties:
        id:
          type: string
          examples:
            - mig_01J9ZQ3F8X5W2K7M4N6P0R1S2T
        object:
          const: field_migration
        collection_id:
          type: string
        field_id:
          type: string
        status:
          type: string
          enum:
            - pending
            - running
            - complete
            - failed
            - cancelled
        from:
          $ref: '#/components/schemas/FieldDefinition'
        to:
          $ref: '#/components/schemas/FieldDefinition'
        backfill:
          description: '`{"value": ...}` when missing values are filled in, otherwise null.'
          oneOf:
            - type: 'null'
            - type: object
              required:
                - value
              properties:
                value: {}
        on_invalid:
          type: string
          enum:
            - fail
            - clear
        time_zone:
          type:
            - string
            - 'null'
          description: >-
            The time zone dates were read in when `include_time` was turned off,
            if one was given.
        records:
          $ref: '#/components/schemas/FieldMigrationCounts'
        failure:
          description: >-
            Why the migration failed; null otherwise. A failed migration changed
            nothing.
          oneOf:
            - type: 'null'
            - type: object
              required:
                - message
              properties:
                message:
                  type: string
        schema_change_id:
          type:
            - string
            - 'null'
          description: The `migrate_field` schema change, once complete.
        cancel_requested_at:
          $ref: '#/components/schemas/NullableTimestamp'
          description: When cancelling was asked for, while a running migration rolls back.
        actor:
          $ref: '#/components/schemas/Actor'
        via:
          $ref: '#/components/schemas/Via'
        note:
          type:
            - string
            - 'null'
        request_id:
          type:
            - string
            - 'null'
        created_at:
          $ref: '#/components/schemas/Timestamp'
        started_at:
          $ref: '#/components/schemas/NullableTimestamp'
        completed_at:
          $ref: '#/components/schemas/NullableTimestamp'
    FieldType:
      type: string
      enum:
        - text
        - long_text
        - rich_text
        - integer
        - decimal
        - date
        - boolean
        - enum
        - asset
        - relation
        - json
    FieldConfiguration:
      description: >
        Type-specific options, e.g. `max_length`, `options`,
        `target_collection_id`,

        `accepted_types` (asset fields: MIME types or `type/*` wildcards that
        newly

        written values must have; any file when absent), `include_time` and

        `time_zone` (date fields, below), `format` (text fields, below),

        `unique` (text and integer fields, below), plus

        the options for searches with API keys: `searchable` (the search words
        match the

        field; default true for text, long_text, rich_text and enum),
        `filterable` and

        `sortable` (default false).


        Date fields hold a calendar date, `YYYY-MM-DD`, with no time and no

        time zone: returned exactly as written, so it never shows as the day

        before or after. With `include_time: true` they hold a moment: ISO

        8601 with an offset, stored in UTC and returned in UTC, or with the

        offset of `time_zone` (an IANA name such as `Europe/Copenhagen`,

        daylight saving included) when the field has one. Input may use any

        offset. Changing `time_zone` never rewrites values; turning

        `include_time` on or off does, through a field migration.


        Text fields (not long text) can have a `format`: `slug`

        (lowercase letters, digits and single hyphens, at most 200

        characters; one value per record, never a list, and always

        unique: a slug field has `unique: true`), `url` (an absolute

        `http` or `https` address) or `email`. A value that doesn't match is

        refused with `invalid_format`. A format sets its own length limits

        (254 characters for emails, 2,048 for URLs), so `min_length` and

        `max_length` are for plain text. Text and integer

        fields with one value can be `unique`: no two active records of the

        collection share a value (emails compare ignoring capitals; records

        without a value don't count). A taken value is refused with

        `taken` and the `record_id` that has it. Turning `unique` on is

        refused with `duplicate_values` while records share a value (and

        so is restoring a deleted unique field, `409`). A field migration

        to a unique field is refused with `duplicate_values` when its

        converted values or backfill would be shared, and fails if values

        written while it waits would be.
      anyOf:
        - $ref: '#/components/schemas/TextFieldConfiguration'
        - $ref: '#/components/schemas/LongTextFieldConfiguration'
        - $ref: '#/components/schemas/RichTextFieldConfiguration'
        - $ref: '#/components/schemas/IntegerFieldConfiguration'
        - $ref: '#/components/schemas/DecimalFieldConfiguration'
        - $ref: '#/components/schemas/DateFieldConfiguration'
        - $ref: '#/components/schemas/BooleanFieldConfiguration'
        - $ref: '#/components/schemas/EnumFieldConfiguration'
        - $ref: '#/components/schemas/AssetFieldConfiguration'
        - $ref: '#/components/schemas/RelationFieldConfiguration'
        - $ref: '#/components/schemas/JsonFieldConfiguration'
    FieldDefinition:
      type: object
      additionalProperties: false
      required:
        - type
        - configuration
        - multiple
        - required
      properties:
        type:
          $ref: '#/components/schemas/FieldType'
        configuration:
          $ref: '#/components/schemas/FieldConfiguration'
        multiple:
          type: boolean
          description: >-
            A list of distinct values (a repeated value is refused with
            `duplicate_value`, an empty string with `blank_value`). Not
            available for boolean, long_text, rich_text and json fields.
        required:
          type: boolean
    FieldMigrationCounts:
      type: object
      additionalProperties: false
      required:
        - total
        - unchanged
        - converted
        - backfilled
        - cleared
        - invalid
      description: >-
        Records by outcome, including soft-deleted records (which are converted
        but never backfilled).
      properties:
        total:
          type: integer
        unchanged:
          type: integer
        converted:
          type: integer
        backfilled:
          type: integer
        cleared:
          type: integer
        invalid:
          type: integer
    NullableTimestamp:
      type:
        - string
        - 'null'
      format: date-time
    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
    Timestamp:
      type: string
      format: date-time
      description: ISO 8601 timestamp in UTC.
      examples:
        - '2026-09-27T12:00:00.000Z'
    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'
    TextFieldConfiguration:
      type: object
      additionalProperties: false
      description: Plain text up to 10,000 characters, or a `format`.
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
        min_length:
          type: integer
          minimum: 0
        max_length:
          type: integer
          minimum: 0
        format:
          type: string
          enum:
            - slug
            - url
            - email
          description: >-
            `slug` (always unique, one value), `url` (absolute http or https) or
            `email`; each sets its own length limits.
        unique:
          type: boolean
          description: >-
            No two active records of the collection share a value (one value
            only; a slug is always unique).
    LongTextFieldConfiguration:
      type: object
      additionalProperties: false
      description: Text up to 100,000 characters.
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
        min_length:
          type: integer
          minimum: 0
        max_length:
          type: integer
          minimum: 0
    RichTextFieldConfiguration:
      type: object
      additionalProperties: false
      description: >-
        A rich text document up to 1,000,000 bytes (`too_large`), written as
        Markdown or a document (see `RecordData`).
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
    IntegerFieldConfiguration:
      type: object
      additionalProperties: false
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
        min:
          type: integer
        max:
          type: integer
        unique:
          type: boolean
          description: >-
            No two active records of the collection share a value (one value
            only).
    DecimalFieldConfiguration:
      type: object
      additionalProperties: false
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
        min:
          type: number
        max:
          type: number
    DateFieldConfiguration:
      type: object
      additionalProperties: false
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
        include_time:
          type: boolean
          description: >-
            Holds a moment (ISO 8601 with an offset) instead of a calendar date;
            changing it is a field migration.
        time_zone:
          type: string
          description: >-
            An IANA time zone (`Europe/Copenhagen`) moments are returned in;
            changing it never rewrites values.
    BooleanFieldConfiguration:
      type: object
      additionalProperties: false
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
    EnumFieldConfiguration:
      type: object
      additionalProperties: false
      required:
        - options
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
        options:
          type: array
          minItems: 1
          maxItems: 500
          uniqueItems: true
          items:
            type: string
            minLength: 1
            maxLength: 100
    AssetFieldConfiguration:
      type: object
      additionalProperties: false
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
        accepted_types:
          type: array
          maxItems: 50
          description: >-
            MIME types or `type/*` wildcards newly written values must have
            (`["image/*", "application/pdf"]`); any file when absent.
          items:
            type: string
    RelationFieldConfiguration:
      type: object
      additionalProperties: false
      required:
        - target_collection_id
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
        target_collection_id:
          type: string
          description: The collection (same project) whose records it points at.
    JsonFieldConfiguration:
      type: object
      additionalProperties: false
      description: >-
        Any JSON value up to 100,000 bytes (`too_large`), nested at most 32
        levels deep (`too_deep`): for data with a shape of its own, such as
        settings or another service's payload. Content belongs in typed fields,
        and large data in an asset.
      properties:
        description:
          type: string
          maxLength: 500
          description: Help text for editors.
        searchable:
          type: boolean
          description: >-
            Search words match the field, in every search (API keys, search
            tokens, members). Default true for text, long_text, rich_text and
            enum.
        filterable:
          type: boolean
          description: API searches can filter on it. Default false.
        sortable:
          type: boolean
          description: API searches can sort on it (one value only). Default false.
    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'
    Conflict:
      description: The request conflicts with current state.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationFailed:
      description: The request failed validation.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: validation_error
              message: Record validation failed
              request_id: req_01J9ZQ3F8X5W2K7M4N6P0R1S2T
              details:
                - field: title
                  code: required
                  message: is required
    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.