# Set default key (/en/docs/conta-digital/endpoints/pix-keys/put_pix_key_default)

## PUT /transactions/pix-keys/{pixKeyId}/default

`PUT https://api.hub.payzu.com.br/api/v1/transactions/pix-keys/{pixKeyId}/default`

Scope: `PIX_KEY_WRITE`. Replaces the account default key with the given key. The default key is the one that receives charges and the one that identifies your account in the transfers you send. To receive a transfer, any `ACTIVE` key works. Only an `ACTIVE` key can become the default.

### Path params

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `pixKeyId` | string | yes | Key identifier (`id`), not its value. |

### Responses

**200** The key, now default.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `id` | string | yes | Key identifier. It goes in the delete and set-default routes. |
| `key` | string | yes | Key value, in full. |
| `type` | string | yes | Key type. — `EVP`, `CNPJ`, `CPF`, `EMAIL`, `PHONE` |
| `status` | string | yes | Key status. — `PENDING`, `ACTIVE`, `REMOVED` |
| `isDefault` | boolean | yes | Whether it is the account default key. |
| `createdAt` | string | yes | Date and time in ISO 8601, UTC. — format: date-time |
| `updatedAt` | string | yes | Date and time in ISO 8601, UTC. — format: date-time |

**401** Missing, invalid or expired credential.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**403** Not allowed: scope, IP or disabled operation.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**404** Not found, or from another account.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**412** A step is missing before this operation.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**422** Business rule refusal.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**502** The bank did not respond or refused.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |