Skip to content
OvertCMS Docs

Admin API (Dashboard & Team) Singletons

Update a singleton entry

PATCH /admin-api/v1/sites/{siteSlug}/singletons/{slug}

Creates or partially updates the singleton entry for {slug}. Requires entry:edit_all capability.

Authentication

  • overtcms_access cookie SessionCookie

    HttpOnly SameSite=Lax access token cookie issued by login/setup/refresh. State-changing requests (POST, PATCH, PUT, DELETE) authenticated via cookie must also send a matching same-origin Origin header for CSRF protection.

  • Bearer token BearerJWT

    Human Admin access JWT returned by login/setup/refresh/step-up. Agent API keys (ocms_...) are rejected on the Admin Plane.

Path parameters

  • siteSlug string required
    Site slug.
  • slug string required
    Singleton post type slug.

Query parameters

  • locale string
    Locale code.

Headers

  • If-Match string
    Optimistic locking ETag precondition.
  • X-Null-Semantics string
    Pass clear to let JSON null values clear optional fields on PATCH (default treats null as unchanged).

    Allowed: ignoreclear

    Default ignore

  • Origin string
    Same-origin header required by CSRF protection on state-changing requests authenticated via overtcms_access cookie.
  • Idempotency-Key string
    Optional unique key (max 128 chars) for atomic mutation deduplication.

Request body application/json required

  • bodyPatches map of array of BodyPatch
    Map of rich_html field key to ordered surgical BodyPatch operations.
  • clearFields array of string
  • clearUnpublishAt boolean
  • commitMessage string

    Example Fix typo in heading

  • data object
  • expectedEtag string
    Alternative to expectedVersion or If-Match header.
  • expectedVersion integer

    min 1, Example 1

  • slug string
  • unpublishAt string, date-time

Responses

  • 200 Singleton updated.

    application/json

    • changed boolean required
      False if the patch was a no-op (no version bump).

      Example true

    • entry Entry required
      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

    • 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
    • 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 Unauthenticated — missing or expired session cookie / JWT (API keys 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 Forbidden — insufficient RBAC role capability, CSRF Origin mismatch, post-type restriction, or step-up MFA 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

  • 404 Singleton 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 Conflict — optimistic lock mismatch, uniqueness conflict, breaking change confirmation required, or strong references.

    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

Documentation

Start here