> For the complete documentation index, see [llms.txt](https://docs.stric.com.br/documentacao/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stric.com.br/documentacao/pix/chaves-pix/deletar-chave.md).

# Deletar chave

## Deletar/Cancelar uma chave

<mark style="color:red;">`DELETE`</mark> `https://dev.stric.com.br/pix/keys/{{id}}`

#### Path Parameters

| Name                                 | Type   | Description                 |
| ------------------------------------ | ------ | --------------------------- |
| id<mark style="color:red;">\*</mark> | String | ID da chave a ser cancelada |

#### Headers

| Name                                            | Type   | Description               |
| ----------------------------------------------- | ------ | ------------------------- |
| authorization<mark style="color:red;">\*</mark> | String | Bearer token              |
| account<mark style="color:red;">\*</mark>       | String | ID da conta a ser operada |

{% tabs %}
{% tab title="200: OK Caso de sucesso" %}

```javascript
{
    "id": "9ac4a8b7-2b84-4ef0-87de-e9c06e9cfc5b",
    "key": "email@email.com.br",
    "type": "email",
    "typeCode": 2,
    "status": "PRE-CANCELED",
    "date": "2022-06-20T16:07:59.399Z"
}
```

{% endtab %}

{% tab title="400: Bad Request Chave inexistente" %}

```javascript
{
    "statusCode": 400,
    "message": "key not found",
    "friend": "Essa chave PIX não existe"
}
```

{% endtab %}

{% tab title="400: Bad Request ID da chave inválido" %}

```javascript
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Validation failed",
    "validation": {
        "params": {
            "source": "params",
            "keys": [
                "id"
            ],
            "message": "\"id\" must be a valid GUID"
        }
    }
}
```

{% endtab %}
{% endtabs %}
