---
agentTools:
  projectIndex: https://mk-bank.readme.io/llms.txt
---

# Create Pix Key

Description: This endpoint allows you to create a new PIX key associated with the account. Provide the necessary details in the request to generate a new PIX key.  Response: Upon successful creation of the PIX key, the API will respond with a 201 Created status code. The response body will contain the details of the newly created PIX key, including its value, status, correlation ID, timestamps, and other relevant information. The EVP type informed in the documentation refers to the random key.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "MK Bank Account API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://core-h.mkbank.com.br/api"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/pix_keys": {
      "post": {
        "summary": "Create Pix Key",
        "description": "Description: This endpoint allows you to create a new PIX key associated with the account. Provide the necessary details in the request to generate a new PIX key.  Response: Upon successful creation of the PIX key, the API will respond with a 201 Created status code. The response body will contain the details of the newly created PIX key, including its value, status, correlation ID, timestamps, and other relevant information. The EVP type informed in the documentation refers to the random key.",
        "operationId": "create-pix-key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Only EVP type is accepted",
                    "default": "EVP"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"value\": \"73898f5a-d646-454a-89a8-b83a8e82c8b9\",\n    \"account_id\": 1060,\n    \"type\": \"EVP\",\n    \"status\": \"ACTIVE\",\n    \"correlation_id\": \"B20230516151240472082535391C4954\",\n    \"start_timestamp\": 1684260759900,\n    \"end_timestamp\": 1684260760664,\n    \"updated_at\": \"2023-05-16T18:12:40.000000Z\",\n    \"created_at\": \"2023-05-16T18:12:40.000000Z\",\n    \"id\": 42,\n    \"display_value\": \"73898f5a-d646-454a-89a8-b83a8e82c8b9\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string",
                      "example": "73898f5a-d646-454a-89a8-b83a8e82c8b9"
                    },
                    "account_id": {
                      "type": "integer",
                      "example": 1060,
                      "default": 0
                    },
                    "type": {
                      "type": "string",
                      "example": "EVP"
                    },
                    "status": {
                      "type": "string",
                      "example": "ACTIVE"
                    },
                    "correlation_id": {
                      "type": "string",
                      "example": "B20230516151240472082535391C4954"
                    },
                    "start_timestamp": {
                      "type": "integer",
                      "example": 1684260759900,
                      "default": 0
                    },
                    "end_timestamp": {
                      "type": "integer",
                      "example": 1684260760664,
                      "default": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2023-05-16T18:12:40.000000Z"
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2023-05-16T18:12:40.000000Z"
                    },
                    "id": {
                      "type": "integer",
                      "example": 42,
                      "default": 0
                    },
                    "display_value": {
                      "type": "string",
                      "example": "73898f5a-d646-454a-89a8-b83a8e82c8b9"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"message\": \"O limite máximo de chaves foi atingido\",\n    \"code\": \"MAX_PIX_KEYS_COUNT_REACHED\",\n    \"data\": []\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "O limite máximo de chaves foi atingido"
                    },
                    "code": {
                      "type": "string",
                      "example": "MAX_PIX_KEYS_COUNT_REACHED"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "6297b52a229a9b00142bff3c:62a77dca9c36f70050eb02d3"
}
```