Skip to content
OvertCMS Docs

Admin API (Dashboard & Team) Entries & Batch

Trash or permanently purge an entry

DELETE /admin-api/v1/sites/{siteSlug}/collections/{postType}/entries/{idOrSlug}

Moves an entry to trash by default, or permanently purges it from the database when permanent=true (Admin-only). Supports force=true to override strong incoming references and confirmUnpublish=true for published entries. Requires entry:delete 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.
  • postType string required
    Collection post type slug.
  • idOrSlug string required
    Entry UUID or slug.

Query parameters

  • permanent boolean
    When true, permanently purges the entry from the database.

    Default false

  • confirmUnpublish boolean
    Must be true when deleting a published entry.
  • force boolean
    When true, overrides strong incoming reference protection.
  • expectedVersion integer
    Optimistic locking expected version.

    min 1

Headers

  • If-Match string
    Optimistic locking ETag precondition.
  • 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

  • commitMessage string
  • confirmUnpublish boolean
    Required (true) if the entry is currently published.
  • expectedEtag string
  • expectedVersion integer

    min 1, Example 3

  • force boolean
    Admin Plane only: overrides strong incoming reference checks. Ignored (always false) on the Agent Plane.

Responses

  • 200 Entry trashed ({entry}) or permanently purged ({purged: true, id}).

    application/json

    • one of
      Show 2 options
      • Option 1 object
        Show 1 field
        • 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

      • Option 2 object
        Show 2 fields
        • id string required
        • purged boolean required

          Example true

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