---
url: https://docs.app-in.io/operations/deleteContent.md
---

# Delete content

`DELETE https://api.app-in.io/v1/index/{collection}`

Remove a single document from the specified collection by ID.

## OpenAPI operation

```json
{
  "operationId": "deleteContent",
  "summary": "Delete content",
  "description": "Remove a single document from the specified collection by ID.",
  "tags": [
    "Indexing"
  ],
  "parameters": [
    {
      "name": "collection",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "products",
          "pages",
          "docs"
        ]
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "required": [
            "id"
          ],
          "properties": {
            "id": {
              "type": "string",
              "description": "Document ID to delete"
            }
          }
        },
        "example": {
          "id": "prod_001"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Content deleted",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "example": "deleted"
              },
              "id": {
                "type": "string"
              },
              "collection": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "description": "Site is paused (beyond the number of sites the plan allows), deactivated, the account is blocked, a secret key is required, or the collection is not allowed for this site type"
    },
    "422": {
      "$ref": "#/components/responses/ValidationError"
    }
  }
}
```

## Referenced components

```json
{
  "#/components/responses/Unauthorized": {
    "description": "Missing or invalid API key",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ErrorResponse"
        },
        "example": {
          "error": "Invalid API key."
        }
      }
    }
  },
  "#/components/schemas/ErrorResponse": {
    "type": "object",
    "description": "Error body for authentication (401), authorization (403), and service (502) errors.",
    "properties": {
      "error": {
        "type": "string",
        "description": "Human-readable error message"
      }
    }
  },
  "#/components/responses/ValidationError": {
    "description": "Validation error",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ValidationErrorResponse"
        },
        "example": {
          "message": "The query field is required.",
          "errors": {
            "query": [
              "The query field is required."
            ]
          }
        }
      }
    }
  },
  "#/components/schemas/ValidationErrorResponse": {
    "type": "object",
    "description": "Validation error body (422).",
    "properties": {
      "message": {
        "type": "string"
      },
      "errors": {
        "type": "object",
        "description": "Map of field name to an array of error messages"
      }
    }
  }
}
```

Full specification: https://docs.app-in.io/openapi.json
