> ## Documentation Index
> Fetch the complete documentation index at: https://developer.noodle.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Validar Conta Bancária

> Use este endpoint para validar uma conta bancária através de transferência PIX de 1 centavo + taxa de validação.



## OpenAPI

````yaml api-reference/openapi.json post /validate/account
openapi: 3.1.0
info:
  title: Noodle API
  contact:
    name: Time de Engenharia da Noodle
    url: https://www.noodle.cx/contato
    email: dev@noodle.cx
  version: 1.0.0
servers:
  - url: https://production.api.noodle.cx/external
    description: Servidor de Produção
  - url: https://homolog.api.noodle.cx/external
    description: Servidor de Homologação (Staging)
security: []
paths:
  /validate/account:
    post:
      tags:
        - Validacao
      summary: Validar Conta Bancária
      description: >-
        Use este endpoint para validar uma conta bancária através de
        transferência PIX de 1 centavo + taxa de validação.
      operationId: validate_bank_account_validate_account_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateBankAccountRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountValidationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ValidateBankAccountRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        bankCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Bankcode
        pspId:
          anyOf:
            - type: string
            - type: 'null'
          title: Pspid
        agency:
          anyOf:
            - type: string
            - type: 'null'
          title: Agency
        account:
          anyOf:
            - type: string
            - type: 'null'
          title: Account
        accountType:
          anyOf:
            - type: string
            - type: 'null'
          title: Accounttype
        pixKeyType:
          anyOf:
            - type: string
            - type: 'null'
          title: Pixkeytype
        pixDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Pixdescription
        pixKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Pixkey
        taxId:
          anyOf:
            - type: string
            - type: 'null'
          title: Taxid
        validateOwnership:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Validateownership
          default: true
      type: object
      title: ValidateBankAccountRequest
      description: >-
        Representa os dados para validar uma conta bancária ou chave Pix para
        pagamentos.

        **Atributos**:

        - **tax_id** (*str, opcional*): CPF ou CNPJ do titular da conta,
        necessário para validar a propriedade da conta.

        - **validate_ownership** (*bool, opcional*): Indica se a propriedade da
        conta deve ser validada, padrão é True.

        - **name** (*str, opcional*): Nome do titular da conta.

        - **bank_code** (*str, opcional*): Código do banco.

        - **psp_id** (*str, opcional*): Identificador do provedor de serviços de
        pagamento (PSP).

        - **agency** (*str, opcional*): Número da agência bancária.

        - **account** (*str, opcional*): Número da conta bancária.

        - **account_type** (*str, opcional*): Tipo da conta bancária, deve ser
        um dos valores: "saving_account", "payment_account", "checking_account"
        ou "salary_account".

        - **pix_key_type** (*str, opcional*): Tipo da chave Pix, deve ser um dos
        valores
            "random_key", "cnpj", "cpf", "phone_number" ou "email".
        - **pix_description** (*str, opcional*): Descrição da chave Pix.

        - **pix_key** (*str, opcional*): Chave Pix associada à conta.

        **Validações**:

        - Pelo menos um dos campos `pix_key` ou `account` deve ser informado.

        - Se `pix_key` for informado, o campo `pix_key_type` é obrigatório.

        - Para contas bancárias, os campos `agency`, `psp_id`, `account_type`,
        `name` e `bank_code` são obrigatórios.

        - Se `validate_ownership` for True, o campo `tax_id` é obrigatório.
    AccountValidationResponse:
      properties:
        valid:
          type: boolean
          title: Valid
          description: Indica se a conta é válida.
        message:
          type: string
          title: Message
          description: Mensagem descritiva do resultado da validação.
      type: object
      required:
        - valid
        - message
      title: AccountValidationResponse
      description: |-
        Resposta da validação de conta bancária.

        **Atributos**:
        - **valid** (*bool*): Indica se a conta é válida.
        - **message** (*str*): Mensagem descritiva do resultado da validação.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.