# Delete a saved verification result

DELETE /api/v1/citations/{id} permanently deletes one saved verification result with its source captures and judgments. Free.

Documentation index: https://webcite.co/llms.txt
Canonical page: https://webcite.co/api-docs/delete-citation
API origin: https://api.webcite.co
Authentication: x-api-key header. Keep keys on your server.

## What it deletes

Use the id of a saved verification record, as [list saved verification records](/api-docs/citations) and [get a saved verification](/api-docs/citation) return it. The call deletes the result, its web source captures, its judgments and its links to files.

Billing records of the credits it used are kept without its content: the record keeps its id and timestamps, and its claim, prompt, search results and metadata are cleared. To delete up to 100 results in one call, use [bulk delete](/api-docs/delete-citations).

## Response example

Built from the response schema in the [OpenAPI file](/api-docs/openapi.json); identifiers are placeholders.

```json
{
  "id": "00000000-0000-4000-8000-000000000031",
  "deleted": true
}
```

## Request

DELETE /api/v1/citations/{id}

Free. Deleting a verification result costs 0 credits.

### curl

```curl
curl --fail-with-body -X DELETE 'https://api.webcite.co/api/v1/citations/YOUR_ID' \
  -H "x-api-key: $WEBCITE_API_KEY"
```

### Node.js

```javascript
const response = await fetch("https://api.webcite.co/api/v1/citations/YOUR_ID", {
  method: "DELETE",
  headers: {
    "x-api-key": process.env.WEBCITE_API_KEY,
  },
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
```

### python

```python
import os
import requests

response = requests.delete(
    "https://api.webcite.co/api/v1/citations/YOUR_ID",
    headers={"x-api-key": os.environ["WEBCITE_API_KEY"]},
    timeout=(10, 300),
)
response.raise_for_status()
print(response.json())
```

## Response

HTTP 200 returns `id`, the id you sent, and `deleted: true`.

## Errors

400: `id` is not a UUID (`Invalid citation id`). 401: missing or invalid key. 403: app keys cannot use this endpoint. 404: no verification result with this id in your account (`Citation not found`).

## OpenAPI operation

```json
{
  "path": "/api/v1/citations/{id}",
  "method": "DELETE",
  "operation": {
    "description": "Permanently deletes a verification result (citation), its source captures and judgments. Free. Billing records of the credits it used are kept without its content.",
    "operationId": "DataDeletionController_deleteCitation",
    "parameters": [
      {
        "description": "Citation id",
        "in": "path",
        "name": "id",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    ],
    "responses": {
      "200": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CitationDeletedDto"
            }
          }
        },
        "description": ""
      },
      "404": {
        "description": "No verification result with this id in your account"
      }
    },
    "security": [
      {
        "x-api-key": []
      },
      {
        "bearer": []
      }
    ],
    "summary": "Delete a verification result",
    "tags": [
      "Saved citations"
    ]
  },
  "schemas": {
    "CitationDeletedDto": {
      "properties": {
        "deleted": {
          "example": true,
          "type": "boolean"
        },
        "id": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "deleted"
      ],
      "type": "object"
    }
  }
}
```
