Stay organized with collections
Save and categorize content based on your preferences.
Deletes a document.
Every document in Cloud Firestore is uniquely identified by its location within
the database. Documents live in collections and the names of documents within a
collection are unique. Note that {document_path} refers to the fully specified
document path and includes the collection ID. For more information, see
Cloud Firestore data model
and the
Cloud Firestore connector sample.
Arguments
Parameters
name
string
Required. The resource name of the Document to delete. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.
currentDocument.exists
boolean
When set to true, the target document must exist. When set to false, the target document must not exist.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Method: googleapis.firestore.v1beta1.projects.databases.documents.delete\n\nDeletes a document.\n\nEvery document in Cloud Firestore is uniquely identified by its location within\nthe database. Documents live in collections and the names of documents within a\ncollection are unique. Note that `{document_path}` refers to the fully specified\ndocument path and includes the collection ID. For more information, see\n[Cloud Firestore data model](https://firebase.google.com/docs/firestore/data-model)\nand the\n[Cloud Firestore connector sample](/workflows/docs/reference/googleapis/firestore/Overview#firestore-sample).\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response will be empty.\n\nSubworkflow snippet\n-------------------\n\nSome fields might be optional or required.\nTo identify required fields, refer to the [API documentation](https://cloud.google.com/firestore/docs/reference/rest/v1beta1/projects.databases.documents/delete). \n\n### YAML\n\n```yaml\n- delete:\n call: googleapis.firestore.v1beta1.projects.databases.documents.delete\n args:\n name: ...\n currentDocument:\n exists: ...\n updateTime: ...\n result: deleteResult\n```\n\n### JSON\n\n```json\n[\n {\n \"delete\": {\n \"call\": \"googleapis.firestore.v1beta1.projects.databases.documents.delete\",\n \"args\": {\n \"name\": \"...\",\n \"currentDocument\": {\n \"exists\": \"...\",\n \"updateTime\": \"...\"\n }\n },\n \"result\": \"deleteResult\"\n }\n }\n]\n```"]]