# Delete a contact

Source: https://kirora.io/docs/api/reference/deleteContact

`DELETE /v1/contacts/{id}`

Requires an API key with the `contacts:delete` scope. [About keys and scopes](https://kirora.io/docs/api/reference/authentication)

Works with integration and partner keys, not agent keys.

Safe to retry: a repeat sets the same values again. [About idempotency](https://kirora.io/docs/api/reference/idempotency)

Deletes one contact and its data, for a right-to-erasure request: its events, list memberships, consent changes and journey enrollments go with it. Journey messages go with the enrollments; campaign and transactional messages are kept for campaign totals but anonymised: the address, content and provider ids are removed and nothing links them to the person. Address suppressions are kept, so a deleted address that is imported again is still not mailed. While a message to the contact is being handed to the provider, which takes seconds, it answers 409 `CONTACT_SEND_IN_PROGRESS`; retry shortly. A message waiting to be retried is skipped (`contact_deleted`) instead; a push that already reached one of the contact's devices is marked `sent`, and one a push service refused is marked `failed`, as it would have ended anyway. It cannot be undone. Requires `contacts:delete`; agent keys are refused.

## Path parameters

- `id` (string, required, 1–255 characters) — Kirora's id for the contact, your own with `idType=externalId`, or its email address with `idType=email`, URL-encoded (`@` as `%40`).

## Query parameters

- `idType` (string, optional, one of `id`, `externalId`, `email`, default `"id"`) — What `{id}` is: Kirora's id for the contact (`id`, the default), your own (`externalId`, as set with identify) or its email address (`email`, matched trimmed and without case).

## Header parameters

- `Kirora-Workspace` (string, optional, pattern `^[A-Za-z0-9._:-]{1,128}$`) — Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

## Returns

Returns `204 No Content` with an empty body. It can also return `409 Conflict`; see the statuses below. Otherwise returns an error; [Errors](https://kirora.io/docs/api/reference/errors) lists every code and which to retry.

Statuses:

- `204 No Content`: The contact was deleted.
- `409 Conflict`: The request conflicts with current state — a duplicate unique value, or a resource whose status does not allow this operation.

## Example

```bash
curl -X DELETE https://api.kirora.io/v1/contacts/018f2a4e-6b1c-7d3e-9f40-37386ae05a6b \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```
