# invoice.deleted

> Sent when a finalized invoice is deleted. The payload contains only the id of the deleted invoice. Each event is attempted up to 3 times: the first delivery, then retries after 10 s and 100 s; only a 2xx response counts as success. The request times out after 10 seconds.

## Webhook event: POST invoice.deleted

Sent when a finalized invoice is deleted. The payload contains only the id of the deleted invoice. Each event is attempted up to 3 times: the first delivery, then retries after 10 s and 100 s; only a 2xx response counts as success. The request times out after 10 seconds.

### Request and responses

```json
{
  "servers": [
    {
      "url": "https://app.fsaskaita.lt/api",
      "description": "Production"
    }
  ],
  "operation": {
    "tags": [
      "Invoices"
    ],
    "operationId": "webhookInvoiceDeleted",
    "summary": "invoice.deleted",
    "description": "Sent when a finalized invoice is deleted. The payload contains only the id of the deleted invoice. Each event is attempted up to 3 times: the first delivery, then retries after 10 s and 100 s; only a 2xx response counts as success. The request times out after 10 seconds.",
    "parameters": [
      {
        "$ref": "#/components/parameters/webhookSignature"
      }
    ],
    "requestBody": {
      "required": true,
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "event",
              "data"
            ],
            "properties": {
              "event": {
                "const": "invoice.deleted"
              },
              "data": {
                "$ref": "#/components/schemas/DeletedResource"
              }
            }
          }
        }
      }
    },
    "responses": {
      "2XX": {
        "description": "Return any 2xx status to acknowledge the delivery. Any other status or a timeout schedules a retry."
      }
    }
  },
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "description": "Business token created in the app under Settings, Integrations, API. The token is scoped to exactly one business, has no expiry and is shown only once. Send it as `Authorization: Bearer <token>` together with `Accept: application/json`.",
      "scheme": "bearer"
    }
  }
}
```

### Referenced components

```json
{
  "#/components/parameters/webhookSignature": {
    "name": "Signature",
    "in": "header",
    "required": true,
    "description": "Lowercase hex HMAC-SHA256 of the raw request body, keyed with the webhook's signing secret (`whsec_…`). Recompute it over the exact bytes received and compare with a constant-time function before trusting the payload. No timestamp or event-id header is sent.",
    "schema": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "example": "5f1c0d8f9a7e4b2c6d3e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c"
  },
  "#/components/schemas/DeletedResource": {
    "type": "object",
    "description": "Identifies a resource that no longer exists.",
    "required": [
      "id"
    ],
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      }
    }
  }
}
```
