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

# Search Pix key

To search for the Pix key, it is necessary that it has been created in a testing environment, known as a homologation environment. The Search Pix Key endpoint allows you to search for a Pix key by providing the key value and optional document number. This endpoint helps you retrieve relevant information associated with the Pix key, such as the account details or additional metadata.

# 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/search_key": {
      "post": {
        "summary": "Search Pix key",
        "description": "To search for the Pix key, it is necessary that it has been created in a testing environment, known as a homologation environment. The Search Pix Key endpoint allows you to search for a Pix key by providing the key value and optional document number. This endpoint helps you retrieve relevant information associated with the Pix key, such as the account details or additional metadata.",
        "operationId": "search-pix-key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "key"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "For PHONE keys use: 55[phone_number]."
                  },
                  "document_number": {
                    "type": "string",
                    "description": "(Optional) Document number to be validated. If the document number associated with the key is different from the document number provided, an error will be returned"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"validation_code\": \"DfGyNaKPdKwhP2tmnU4VIHBT5lXO6TL2TicLdPXN3jHxrzVcpOZbDERkkQzQ\",\n    \"key\": \"73898f5a-d646-454a-89a8-b83a8e82c8b9\",\n    \"key_type\": \"EVP\",\n    \"document_number\": \"**.*0001/0001-**\",\n    \"name\": \"João teste\",\n    \"participant\": \"MK DIGITAL \",\n    \"participant_ispb\": \"35624319\",\n    \"document_number_match\": \"UNCHECKED\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "validation_code": {
                      "type": "string",
                      "example": "DfGyNaKPdKwhP2tmnU4VIHBT5lXO6TL2TicLdPXN3jHxrzVcpOZbDERkkQzQ"
                    },
                    "key": {
                      "type": "string",
                      "example": "73898f5a-d646-454a-89a8-b83a8e82c8b9"
                    },
                    "key_type": {
                      "type": "string",
                      "example": "EVP"
                    },
                    "document_number": {
                      "type": "string",
                      "example": "**.*0001/0001-**"
                    },
                    "name": {
                      "type": "string",
                      "example": "João teste"
                    },
                    "participant": {
                      "type": "string",
                      "example": "MK DIGITAL "
                    },
                    "participant_ispb": {
                      "type": "string",
                      "example": "35624319"
                    },
                    "document_number_match": {
                      "type": "string",
                      "example": "UNCHECKED"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"message\": \"Chave pix inválida\",\n    \"code\": \"INVALID_PIX_KEY\",\n    \"data\": []\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Chave pix inválida"
                    },
                    "code": {
                      "type": "string",
                      "example": "INVALID_PIX_KEY"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"message\": \"Sua sessão expirou\",\n    \"code\": \"UNAUTHENTICATED\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Sua sessão expirou"
                    },
                    "code": {
                      "type": "string",
                      "example": "UNAUTHENTICATED"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "6297b52a229a9b00142bff3c:62a77fa092aa9d028c4ebfba"
}
```