Skip to content
OvertCMS Docs

Agent API (AI & Automation) Schema

Update a post type

PATCH /agent/v1/schema/post-types/{postTypeSlug}

Updates a post type schema, classifies drift, preserves immutable field IDs, and snapshots the new version. Breaking changes require confirmBreakingChange: true. Requires schema:write scope.

Authentication

  • Bearer token BearerApiKey

    Scoped Agent API key (Authorization: Bearer ocms_...). Human JWTs and browser cookies are rejected on the Agent Plane.

Path parameters

  • postTypeSlug string required
    Post type slug.

Request body application/json required

  • capabilities PostTypeCapabilities
    Show 5 fields
    • delete boolean required

      Default true

    • draft boolean required

      Default true

    • localize boolean required

      Default false

    • publish boolean required

      Default true

    • schedule boolean required

      Default true

  • clearFields array of string
  • confirmBreakingChange boolean

    Default false

  • displayField string
  • fields array of FieldDefinition
    Show 21 fields
    • aiWritable boolean

      Default true

    • constraints FieldConstraints
      Typed validation and structural constraints covering all 19 canonical OvertCMS field types.
      Show 51 fields
      • allowChecklists boolean
      • allowCustom boolean
      • allowEmbeds boolean
      • allowInlineMedia boolean
      • allowRelative boolean
      • allowedBlocks array of string
      • allowedComponents array of string
      • allowedHosts array of string
      • allowedMarks array of string
      • allowedMimeTypes array of string
      • allowedSchemes array of string
      • aspectRatio string

        Example 16:9

      • componentRef string
      • disallowH1 boolean
      • disallowHtml boolean
      • fields array of FieldDefinition
      • format string

        Allowed: plainemailcolor

        Default plain

      • integer boolean
      • integrity string

        Allowed: strongweak

        Default strong

      • jsonSchema object
      • lengthUnit string

        Allowed: graphemesutf16

        Default graphemes

      • max number
      • maxBytes integer, int64

        min 1

      • maxDate string, date
      • maxDateTime string, date-time
      • maxDurationMs integer, int64

        min 1

      • maxItems integer

        min 1

      • maxLength integer

        min 1

      • maxLines integer

        min 1

      • maxTime string

        Example 17:00:00

      • maxWords integer

        min 1

      • min number
      • minDate string, date
      • minDateTime string, date-time
      • minHeight integer

        min 1

      • minItems integer

        min 0

      • minLength integer

        min 0

      • minTime string

        Example 09:00:00

      • minWidth integer

        min 1

      • minWords integer

        min 0

      • multiple boolean
      • of ListItemSpec
        Element schema of a list field.
        Show 5 fields
        • componentRef string
        • constraints FieldConstraints

          Same shape as its parent FieldConstraints.

        • fields array of FieldDefinition
        • type string

          Allowed: stringtextslugrich_htmlnumberbooleandatedatetimetimeurlselectreferenceimageaudiovideofileobjectlistjson

        • variants array of ListVariant
      • options array of SelectOption
        Show 3 fields
        • instruction string

          Example Use for technical architecture deep-dives.

        • label string required

          Example Engineering

        • value string required

          Example engineering

      • pattern string
      • precision integer

        min 0

      • requireAlt boolean
      • step number
      • strictness string

        Allowed: strictsanitize

        Default strict

      • targets array of string
      • trim boolean
      • uniqueItems boolean
    • defaultValue any
    • deprecated boolean

      Default false

    • description string

      max length 500

    • fieldId string, uuid
      Immutable UUIDv7 assigned by the server.
    • filterable boolean

      Default false

    • instruction string

      max length 2000, Example Concise, punchy headline under 80 characters.

    • key string required

      Example title

    • label string required

      Example Title

    • localized boolean

      Default false

    • readOnly boolean

      Default false

    • replacedBy string
    • required boolean

      Example true

    • requiredOn string

      Allowed: draftpublish

      Default publish

    • searchEndpoint string read only
      Populated automatically on reference fields.

      Example /agent/v1/collections/posts/fields/author/options

    • sortable boolean

      Default false

    • type string required

      Allowed: stringtextslugrich_htmlnumberbooleandatedatetimetimeurlselectreferenceimageaudiovideofileobjectlistjson

      Example string

    • ui FieldUI
      Cosmetic authoring UI hints (excluded from schema fingerprints).
      Show 4 fields
      • group string

        Example SEO

      • order integer

        Example 10

      • placeholder string

        Example Write a concise headline...

      • width string

        Example full

    • unique boolean

      Default false

    • writable boolean

      Default true

  • instruction string
  • kind string

    Allowed: collectionsingleton

  • pluralName string
  • singularName string
  • slugSourceField string
  • urlTemplate string

Responses

  • 200 Post type updated with drift classification.

    application/json

    • drift DriftReport required
      Show 3 fields
      • breaking boolean required

        Example false

      • breakingChanges array of DriftChange required
        Show 6 fields
        • breaking boolean required

          Example false

        • field string required

          Example summary

        • kind string required

          Example optional_field_added

        • message string required

          Example new optional field "summary" added

        • newValue any
        • oldValue any
      • nonBreakingChanges array of DriftChange required
        Show 6 fields
        • breaking boolean required

          Example false

        • field string required

          Example summary

        • kind string required

          Example optional_field_added

        • message string required

          Example new optional field "summary" added

        • newValue any
        • oldValue any
    • postType PostType required
      Defines a collection or singleton content schema for a site.
      Show 16 fields
      • capabilities PostTypeCapabilities required
        Show 5 fields
        • delete boolean required

          Default true

        • draft boolean required

          Default true

        • localize boolean required

          Default false

        • publish boolean required

          Default true

        • schedule boolean required

          Default true

      • createdAt string, date-time required
      • displayField string

        Example title

      • fields array of FieldDefinition required
        Show 21 fields
        • aiWritable boolean

          Default true

        • constraints FieldConstraints
          Typed validation and structural constraints covering all 19 canonical OvertCMS field types.
          Show 51 fields
          • allowChecklists boolean
          • allowCustom boolean
          • allowEmbeds boolean
          • allowInlineMedia boolean
          • allowRelative boolean
          • allowedBlocks array of string
          • allowedComponents array of string
          • allowedHosts array of string
          • allowedMarks array of string
          • allowedMimeTypes array of string
          • allowedSchemes array of string
          • aspectRatio string

            Example 16:9

          • componentRef string
          • disallowH1 boolean
          • disallowHtml boolean
          • fields array of FieldDefinition
          • format string

            Allowed: plainemailcolor

            Default plain

          • integer boolean
          • integrity string

            Allowed: strongweak

            Default strong

          • jsonSchema object
          • lengthUnit string

            Allowed: graphemesutf16

            Default graphemes

          • max number
          • maxBytes integer, int64

            min 1

          • maxDate string, date
          • maxDateTime string, date-time
          • maxDurationMs integer, int64

            min 1

          • maxItems integer

            min 1

          • maxLength integer

            min 1

          • maxLines integer

            min 1

          • maxTime string

            Example 17:00:00

          • maxWords integer

            min 1

          • min number
          • minDate string, date
          • minDateTime string, date-time
          • minHeight integer

            min 1

          • minItems integer

            min 0

          • minLength integer

            min 0

          • minTime string

            Example 09:00:00

          • minWidth integer

            min 1

          • minWords integer

            min 0

          • multiple boolean
          • of ListItemSpec
            Element schema of a list field.
            Show 5 fields
            • componentRef string
            • constraints FieldConstraints

              Same shape as its parent FieldConstraints.

            • fields array of any
            • type string

              Allowed: stringtextslugrich_htmlnumberbooleandatedatetimetimeurlselectreferenceimageaudiovideofileobjectlistjson

            • variants array of any
          • options array of SelectOption
          • pattern string
          • precision integer

            min 0

          • requireAlt boolean
          • step number
          • strictness string

            Allowed: strictsanitize

            Default strict

          • targets array of string
          • trim boolean
          • uniqueItems boolean
        • defaultValue any
        • deprecated boolean

          Default false

        • description string

          max length 500

        • fieldId string, uuid
          Immutable UUIDv7 assigned by the server.
        • filterable boolean

          Default false

        • instruction string

          max length 2000, Example Concise, punchy headline under 80 characters.

        • key string required

          Example title

        • label string required

          Example Title

        • localized boolean

          Default false

        • readOnly boolean

          Default false

        • replacedBy string
        • required boolean

          Example true

        • requiredOn string

          Allowed: draftpublish

          Default publish

        • searchEndpoint string read only
          Populated automatically on reference fields.

          Example /agent/v1/collections/posts/fields/author/options

        • sortable boolean

          Default false

        • type string required

          Allowed: stringtextslugrich_htmlnumberbooleandatedatetimetimeurlselectreferenceimageaudiovideofileobjectlistjson

          Example string

        • ui FieldUI
          Cosmetic authoring UI hints (excluded from schema fingerprints).
          Show 4 fields
          • group string

            Example SEO

          • order integer

            Example 10

          • placeholder string

            Example Write a concise headline...

          • width string

            Example full

        • unique boolean

          Default false

        • writable boolean

          Default true

      • id string, uuid required
      • instruction string

        Example Long-form technical articles for the engineering blog.

      • kind string required

        Allowed: collectionsingleton

        Example collection

      • pluralName string required

        Example Posts

      • schemaFingerprint string required

        Example sha256:3c9e14a8f10d4b7c9f44a0d5c8b6e12a

      • schemaVersion integer required

        Example 2

      • singularName string required

        Example Post

      • siteId string, uuid required
      • slug string required

        Example posts

      • slugSourceField string

        Example title

      • updatedAt string, date-time required
      • urlTemplate string

        Example /blog/{slug}

  • 401 Missing, invalid, expired, or revoked Agent API key (cookies and human JWTs are rejected).

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

  • 403 API key lacks required scope, post-type access, or IP allowlist match.

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

  • 404 Post type not found.

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

  • 409 Version conflict, schema drift detected, idempotency key conflict, or breaking change confirmation required.

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

  • 422 Validation error with field-level issues.

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

  • 429 Per-key RPM rate limit, daily write cap, or daily media byte quota exceeded.

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

  • 503 Agent writes are currently paused by site kill switch.

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

Documentation

Start here