# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stric.com.br/documentacao/pix/chaves-pix/deletar-chave.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
