Skip to content
OvertCMS Docs

Agent API (AI & Automation) Entries & Batch

Execute up to 50 entry operations in a batch

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

Executes between 1 and 50 entry operations (create, update, publish, schedule, unpublish, archive, trash) sequentially through Core validation and returns per-item receipts. Charges the daily write cap for every item in the batch.

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.

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

  • items array of BatchEntryItem required

    min items 1, max items 50

    Show 16 fields
    • bodyPatches map of array of BodyPatch
    • clearFields array of string
    • clearUnpublishAt boolean
    • commitMessage string
    • confirmUnpublish boolean
    • data object
    • expectedEtag string
    • expectedVersion integer

      min 1

    • id string, uuid
    • locale string
    • nullClears boolean
    • op string required

      Allowed: createupdatepublishscheduleunpublisharchivetrash

      Example create

    • scheduledAt string, date-time
    • slug string
    • status string

      Allowed: draftpublishedscheduled

    • unpublishAt string, date-time

Responses

  • 200 Batch execution receipts.

    application/json

    • results array of BatchItemResult required
      Show 7 fields
      • changed boolean
      • error APIError
        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

      • id string, uuid
      • index integer required

        min 0, Example 0

      • op string required

        Example create

      • status string

        Allowed: draftscheduledpublishedarchivedtrashed

      • version integer
  • 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