Skip to content
OvertCMS Docs

Agent API (AI & Automation) Entries & Batch

Create an entry (or run a dry-run validation)

POST /agent/v1/collections/{postType}/entries

Creates a new entry in draft (default, requires entries:write) or directly in published/scheduled (additionally requires entries:publish). Pass dryRun=true (query or body) to validate and inspect normalized data and warnings without persisting.

Authentication

  • Bearer token BearerApiKey

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

Path parameters

  • postType string required
    Collection post type slug.

Query parameters

  • dryRun boolean
    When true, validates without persisting and returns HTTP 200.

    Default false

Headers

  • If-Schema-Fingerprint string
    Optional precondition header with the caller's cached schema fingerprint. Exact match proceeds silently; non-breaking capability gain proceeds with X-Schema-Warning; breaking drift returns 409 schema_drift_detected.
  • Idempotency-Key string
    Unique client-generated key (max 128 chars) for atomic mutation deduplication and safe retries (24h receipt retention, scoped per actor).

Request body application/json required

  • commitMessage string

    Example Initial draft

  • data object required
  • dryRun boolean
    When true, validates and returns normalizedData/warnings without persisting.

    Default false

  • locale string

    Example en

  • scheduledAt string, date-time
    Required when status is scheduled (must be >30s in the future).
  • slug string

    Example introducing-overtcms

  • status string

    Allowed: draftpublishedscheduled

    Default draft

  • translationGroupId string
  • unpublishAt string, date-time

Responses

  • 200 Dry-run validation succeeded (no data persisted).

    application/json

    • dryRun boolean
    • entry Entry
      Content entry with dual draft/published snapshots and optimistic locking metadata.
      Show 25 fields
      • createdAt string, date-time required
      • createdBy Actor required
        Identifies the human user, API key, MCP client, or system process that initiated an action.
        Show 3 fields
        • id string required

          Example 0195c0a1-7e20-7000-8000-000000000042

        • kind string required

          Allowed: userapi_keymcpsystem

          Example api_key

        • name string required

          Example Content Automation Bot

      • displayLabel string required

        Example Introducing OvertCMS

      • draftData object required
      • etag string required

        Example sha256:9f86d081884c7d659a2feaa0c55ad015

      • id string, uuid required

        Example 0195c0a1-7e20-7000-8000-000000000099

      • labelKey string required

        Example introducing overtcms

      • locale string required

        Example en

      • postTypeId string, uuid required
      • postTypeSlug string required

        Example posts

      • publicUrl string required

        Example https://example.com/blog/introducing-overtcms

      • publishedAt string, date-time nullable
      • publishedData object
      • scheduledAt string, date-time nullable
      • schemaVersionAtWrite integer required

        Example 2

      • searchKey string required

        Example introducing overtcms

      • siteId string, uuid required
      • slug string required

        Example introducing-overtcms

      • status string required

        Allowed: draftscheduledpublishedarchivedtrashed

        Example draft

      • translationGroupId string
      • trashedAt string, date-time nullable
      • unpublishAt string, date-time nullable
      • updatedAt string, date-time required
      • updatedBy Actor required
        Identifies the human user, API key, MCP client, or system process that initiated an action.
        Show 3 fields
        • id string required

          Example 0195c0a1-7e20-7000-8000-000000000042

        • kind string required

          Allowed: userapi_keymcpsystem

          Example api_key

        • name string required

          Example Content Automation Bot

      • version integer required

        min 1, Example 3

    • normalizedData object
    • publicUrl string
    • schemaWarnings array of SchemaWarning
      Show 5 fields
      • changes array of DriftChange
        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
      • code string required

        Example schema_capability_gain

      • currentFingerprint string required
      • expectedFingerprint string required
      • message string required
    • valid boolean
    • warnings array of HTMLWarning
      Show 4 fields
      • attr string

        Example style

      • code string required

        Example stripped_disallowed_attr

      • message string required

        Example removed disallowed attribute style on <p>

      • tag string

        Example p

  • 201 Entry created.

    application/json

    • dryRun boolean
    • entry Entry
      Content entry with dual draft/published snapshots and optimistic locking metadata.
      Show 25 fields
      • createdAt string, date-time required
      • createdBy Actor required
        Identifies the human user, API key, MCP client, or system process that initiated an action.
        Show 3 fields
        • id string required

          Example 0195c0a1-7e20-7000-8000-000000000042

        • kind string required

          Allowed: userapi_keymcpsystem

          Example api_key

        • name string required

          Example Content Automation Bot

      • displayLabel string required

        Example Introducing OvertCMS

      • draftData object required
      • etag string required

        Example sha256:9f86d081884c7d659a2feaa0c55ad015

      • id string, uuid required

        Example 0195c0a1-7e20-7000-8000-000000000099

      • labelKey string required

        Example introducing overtcms

      • locale string required

        Example en

      • postTypeId string, uuid required
      • postTypeSlug string required

        Example posts

      • publicUrl string required

        Example https://example.com/blog/introducing-overtcms

      • publishedAt string, date-time nullable
      • publishedData object
      • scheduledAt string, date-time nullable
      • schemaVersionAtWrite integer required

        Example 2

      • searchKey string required

        Example introducing overtcms

      • siteId string, uuid required
      • slug string required

        Example introducing-overtcms

      • status string required

        Allowed: draftscheduledpublishedarchivedtrashed

        Example draft

      • translationGroupId string
      • trashedAt string, date-time nullable
      • unpublishAt string, date-time nullable
      • updatedAt string, date-time required
      • updatedBy Actor required
        Identifies the human user, API key, MCP client, or system process that initiated an action.
        Show 3 fields
        • id string required

          Example 0195c0a1-7e20-7000-8000-000000000042

        • kind string required

          Allowed: userapi_keymcpsystem

          Example api_key

        • name string required

          Example Content Automation Bot

      • version integer required

        min 1, Example 3

    • normalizedData object
    • publicUrl string
    • schemaWarnings array of SchemaWarning
      Show 5 fields
      • changes array of DriftChange
        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
      • code string required

        Example schema_capability_gain

      • currentFingerprint string required
      • expectedFingerprint string required
      • message string required
    • valid boolean
    • warnings array of HTMLWarning
      Show 4 fields
      • attr string

        Example style

      • code string required

        Example stripped_disallowed_attr

      • message string required

        Example removed disallowed attribute style on <p>

      • tag string

        Example p

  • 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