---
agentTools:
  projectIndex: https://astra.readme.io/llms.txt
---

# delete a  document

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Stargate Document API reference",
    "description": "The Stargate REST API provides CRUD operations on table data managed by Stargate.",
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://{databaseId}-{region}.apps.astra.datastax.com/",
      "description": "Replace the <code>{databaseId}</code> with the UUID of your database and <code>{region}</code> with the cloud region where your database lives."
    }
  ],
  "externalDocs": {
    "description": "Reference Document",
    "url": "http://shorturl.at/hnqIQ"
  },
  "tags": [
    {
      "name": "namespaces",
      "description": "document data"
    }
  ],
  "paths": {
    "/api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}/{document-id}": {
      "delete": {
        "tags": [
          "namespaces"
        ],
        "summary": "delete a  document",
        "parameters": [
          {
            "$ref": "#/components/parameters/X-Cassandra-Request-Id"
          },
          {
            "$ref": "#/components/parameters/databaseId"
          },
          {
            "$ref": "#/components/parameters/region"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/X-Cassandra-Token"
          },
          {
            "$ref": "#/components/parameters/namespace-id"
          },
          {
            "$ref": "#/components/parameters/collection-id"
          },
          {
            "$ref": "#/components/parameters/document-id"
          }
        ],
        "responses": {
          "204": {
            "description": "resource deleted",
            "content": {
              "application/json": {
                "examples": {
                  "default": {
                    "value": {}
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "region": {
        "name": "region",
        "description": "Cloud region where your database lives. </br> For example, `us-east-1`",
        "in": "path",
        "schema": {
          "type": "string"
        },
        "required": true
      },
      "databaseId": {
        "name": "databaseId",
        "description": "UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.",
        "in": "path",
        "schema": {
          "type": "string"
        },
        "required": true
      },
      "X-Cassandra-Token": {
        "name": "X-Cassandra-Token",
        "in": "header",
        "required": true,
        "description": "The token returned from the authorization endpoint. Use this token in each request to the database.",
        "schema": {
          "type": "string"
        }
      },
      "X-Cassandra-Request-Id": {
        "name": "X-Cassandra-Request-Id",
        "in": "header",
        "required": true,
        "description": "Unique identifier (UUID) for the request. Use any valid UUID.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "pretty": {
        "name": "pretty",
        "in": "query",
        "description": "format results",
        "schema": {
          "type": "boolean"
        }
      },
      "namespace-id": {
        "name": "namespace-id",
        "in": "path",
        "description": "namespace name",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "collection-id": {
        "name": "collection-id",
        "in": "path",
        "description": "name of the document collection",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "document-id": {
        "name": "document-id",
        "in": "path",
        "description": "the id of the document",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "401": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "examples": {
              "default": {
                "value": {
                  "code": 401,
                  "description": "Unauthorized"
                }
              }
            }
          }
        }
      },
      "500": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "examples": {
              "default": {
                "value": {
                  "code": 500,
                  "description": "Internal server error"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 95,
      "1": 207,
      "2": 153,
      "3": 183,
      "4": 22,
      "5": 56,
      "6": 246,
      "7": 0,
      "8": 121,
      "9": 32,
      "10": 152,
      "11": 193
    }
  }
}
```