> ## Documentation Index
> Fetch the complete documentation index at: https://developers.gyramais.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> A GYRA+ tem um servidor MCP oficial: https://mcp.gyramais.com.br/mcp. A autenticação é o login do próprio usuário na plataforma, não uma credencial separada. Instalação em https://developers.gyramais.com.br/mcp/instalacao.
> Prefira as tools do MCP a montar chamadas HTTP na mão quando o usuário já tem o conector ligado.
> Para analisar crédito de um CNPJ ou CPF, use create_report_v2 e assine um webhook em vez de fazer polling.
> Para ler um documento (contrato social, comprovante de residência, imposto de renda, balanço), use validate_document: a entrada é um arquivo só e a plataforma reconhece o tipo sozinha.
> Para pedir documentos ao cliente final, use create_collection com o slug de um modelo obtido em list_collection_templates.
> Documento (CNPJ/CPF) é dado pessoal: não o repita em log nem o envie a serviços de terceiros.

# Criar Cadastro

> No início de uma jornada, para garantir que o dossiê daquele CNPJ ou CPF existe.

### Quando usar

No início de uma jornada, para garantir que o dossiê daquele CNPJ ou CPF existe.

<Tip>
  **É idempotente por documento.** Chamar de novo com o mesmo CNPJ devolve o cadastro que já existe, em vez de duplicar. É seguro chamar sempre.
</Tip>

<Note>
  Contexto e vocabulário em [Cadastro documental](/onboarding/cadastro-documental). Autenticação, versionamento e capacidades em [Visão geral da API](/api-reference/onboarding/visao-geral).
</Note>


## OpenAPI

````yaml post /v1/registry
openapi: 3.0.0
info:
  title: GYRA+ API - MCP Server
  description: >-
    API da Gyra+ para analise de credito. Spec curada para uso com agentes AI
    via MCP.
  version: '1.0'
  contact: {}
servers:
  - url: https://gyra-core.gyramais.com.br
    description: Producao
security: []
paths:
  /v1/registry:
    post:
      tags:
        - registry
      summary: Criar (ou recuperar) o cadastro de um CNPJ/CPF
      description: >
        Cria o dossie documental de um CNPJ ou CPF na organizacao autenticada.


        IDEMPOTENTE POR DOCUMENTO: chamar de novo com o mesmo CNPJ devolve o
        cadastro que ja existe,

        em vez de duplicar. E seguro chamar no inicio de qualquer jornada.
        Cadastro removido antes

        volta a ficar ativo, com o historico que ja tinha.


        A resposta traz o mesmo corpo do detalhe do cadastro, inclusive
        `completenessSlots` e

        `signingAuthority`.
      operationId: RegistryController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRegistryDto'
            example:
              document: 11.444.777/0001-61
              name: AURORA COMPONENTES INDUSTRIAIS LTDA
      responses:
        '201':
          description: >-
            Cadastro com id, document, entityType (COMPANY/PERSON), name,
            kycStatus e completeness.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
              example:
                id: 6612a7f30000000000000001
                document: '11444777000161'
                entityType: COMPANY
                name: AURORA COMPONENTES INDUSTRIAIS LTDA
                tradeName: AURORA
                legalNature: Sociedade Empresária Limitada
                kycStatus: PENDING
                kycRenewalDue: null
                completeness: 0
                documentsCount: 0
                pendingCount: 0
                reportId: null
                basicDataSyncedAt: '2026-09-05T12:58:10.000Z'
                crossDocument: null
                createdAt: '2026-09-05T12:58:10.000Z'
                updatedAt: '2026-09-05T12:58:10.000Z'
                completenessSlots:
                  - key: CONTRATO_SOCIAL
                    types:
                      - CONTRATO_SOCIAL
                      - ALTERACAO_CONTRATUAL
                      - ESTATUTO_SOCIAL
                      - REQUERIMENTO_EMPRESARIO
                    filled: false
                    documentId: null
                  - key: IRPJ_ECF
                    types:
                      - IRPJ_ECF
                    filled: false
                    documentId: null
                  - key: CERTIDAO_JUNTA
                    types:
                      - CERTIDAO_JUNTA
                    filled: false
                    documentId: null
                signingAuthority: null
        '400':
          description: Corpo invalido. A mensagem concatena todas as falhas por virgula.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                code: 400
                message: Você precisa inserir um CNPJ ou CPF válido.
        '401':
          description: >-
            Token ausente, expirado ou invalido. Gere outro em POST
            /auth/authenticate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                code: 401
                message: Token de acesso inválido.
        '403':
          description: O usuario autenticado nao tem a permissao exigida pela rota.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                code: 403
                message: Você não tem permissão para acessar este recurso.
        '404':
          description: >-
            O modulo Onboarding nao esta liberado para a organizacao: para ela,
            a rota nao existe.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                code: 404
                message: Recurso não encontrado.
        '500':
          description: >-
            Falha nossa. Tente de novo; se persistir, acione o suporte com o
            horario da chamada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                code: 500
                message: Internal server error
        '502':
          description: O servico de cadastro nao respondeu. Tente de novo.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                code: 502
                message: Não foi possível criar o cadastro.
      security:
        - authorization: []
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >
            curl --request POST 'https://gyra-core.gyramais.com.br/v1/registry'
            \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{"document":"11.444.777/0001-61","name":"AURORA COMPONENTES INDUSTRIAIS LTDA"}'
        - lang: JavaScript
          label: Node
          source: >
            const resposta = await
            fetch("https://gyra-core.gyramais.com.br/v1/registry", {
              method: "POST",
              headers: {
                Authorization: `Bearer ${token}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "document": "11.444.777/0001-61",
                "name": "AURORA COMPONENTES INDUSTRIAIS LTDA"
              }),
            });


            const dados = await resposta.json();
        - lang: Python
          label: Python
          source: |
            import requests

            resposta = requests.post(
                "https://gyra-core.gyramais.com.br/v1/registry",
                headers={"Authorization": f"Bearer {token}"},
                json={
                    "document": "11.444.777/0001-61",
                    "name": "AURORA COMPONENTES INDUSTRIAIS LTDA"
                },
            )

            dados = resposta.json()
components:
  schemas:
    CreateRegistryDto:
      type: object
      properties:
        document:
          type: string
          description: CNPJ ou CPF valido, com ou sem mascara.
        name:
          type: string
          description: >-
            Razao social ou nome. Opcional: os dados basicos oficiais sao
            buscados na criacao.
      required:
        - document
    Registry:
      type: object
      description: O dossie documental de um CNPJ ou CPF.
      properties:
        id:
          type: string
        document:
          type: string
          description: CNPJ (14) ou CPF (11), so digitos.
        entityType:
          type: string
          enum:
            - COMPANY
            - PERSON
        name:
          type: string
          nullable: true
          description: Razao social ou nome.
        tradeName:
          type: string
          nullable: true
        legalNature:
          type: string
          nullable: true
        kycStatus:
          type: string
          enum:
            - PENDING
            - PROCESSING
            - UP_TO_DATE
            - ATTENTION
            - EXPIRED
            - RENEWING
        kycRenewalDue:
          type: string
          nullable: true
          format: date-time
          description: Quando a renovacao vence.
        completeness:
          type: number
          description: 0 a 1.
        completenessSlots:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
                description: Primeiro tipo do grupo, usado como rotulo da exigencia.
              types:
                type: array
                items:
                  type: string
                  enum:
                    - CONTRATO_SOCIAL
                    - ALTERACAO_CONTRATUAL
                    - ESTATUTO_SOCIAL
                    - REQUERIMENTO_EMPRESARIO
                    - ATA_ASSEMBLEIA
                    - PROCURACAO_PJ
                    - CERTIDAO_JUNTA
                    - CERTIDAO_QSA
                    - IRPJ_ECF
                    - DECLARACAO_FATURAMENTO
                    - CERTIFICADO_SIMPLES_NACIONAL
                    - DEMONSTRACOES_FINANCEIRAS
                    - EXTRATO_BANCARIO
                    - CERTIDAO_PGFN_PJ
                    - CERTIDAO_FGTS
                    - CADIN_FEDERAL
                    - CADIN_ESTADUAL
                    - ESOCIAL_PJ
                    - DOC_IDENTIDADE
                    - COMPROVANTE_RESIDENCIA
                    - DIRPF
                    - COMPROVANTE_RENDA
                    - CERTIDAO_PF
                    - PROCURACAO_PF
                    - COMPROVACAO_ESTADO_CIVIL
                    - FORA_DE_ESCOPO
                    - NAO_IDENTIFICADO
                description: Tipos equivalentes que preenchem a mesma exigencia.
              filled:
                type: boolean
              documentId:
                type: string
                nullable: true
                description: Qual documento cobre a exigencia.
          description: 'A cesta de completude aberta. So no detalhe: na listagem seria N+1.'
        signingAuthority:
          type: object
          nullable: true
          description: >-
            Quem pode assinar pela empresa, ja achatado (sem a tripla
            value/confidence/page). null quando o cadastro nao tem documento
            societario validado com clausula de administracao legivel. So vem no
            DETALHE do cadastro.
          properties:
            regime:
              type: string
              nullable: true
              enum:
                - ISOLADA
                - CONJUNTA
                - MISTA
                - INDETERMINADO
                - null
            signersRequired:
              type: integer
              nullable: true
              description: Quantas assinaturas a regra geral exige.
            anySignerAlone:
              type: boolean
              description: true quando ao menos um administrador assina sozinho.
            signers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    nullable: true
                  document:
                    type: string
                    nullable: true
                    description: >-
                      CPF em digitos. null quando o documento societario nao o
                      repete, o que e comum.
                  role:
                    type: string
                    nullable: true
                  signsAlone:
                    type: boolean
                    nullable: true
                  jointSignatureThreshold:
                    type: number
                    nullable: true
                  mandateEndDate:
                    type: string
                    nullable: true
                    description: YYYY-MM-DD.
                  restrictions:
                    type: string
                    nullable: true
            thresholds:
              type: array
              items:
                type: object
                additionalProperties: true
                description: Faixa de alcada lida do documento.
            prohibitions:
              type: array
              items:
                type: object
                additionalProperties: true
                description: Vedacao expressa lida do documento.
            mandate:
              type: object
              nullable: true
              additionalProperties: true
            source:
              type: object
              description: De qual documento a leitura saiu.
              properties:
                documentId:
                  type: string
                documentType:
                  type: string
                  enum:
                    - CONTRATO_SOCIAL
                    - ALTERACAO_CONTRATUAL
                    - ESTATUTO_SOCIAL
                    - REQUERIMENTO_EMPRESARIO
                    - ATA_ASSEMBLEIA
                    - PROCURACAO_PJ
                    - CERTIDAO_JUNTA
                    - CERTIDAO_QSA
                    - IRPJ_ECF
                    - DECLARACAO_FATURAMENTO
                    - CERTIFICADO_SIMPLES_NACIONAL
                    - DEMONSTRACOES_FINANCEIRAS
                    - EXTRATO_BANCARIO
                    - CERTIDAO_PGFN_PJ
                    - CERTIDAO_FGTS
                    - CADIN_FEDERAL
                    - CADIN_ESTADUAL
                    - ESOCIAL_PJ
                    - DOC_IDENTIDADE
                    - COMPROVANTE_RESIDENCIA
                    - DIRPF
                    - COMPROVANTE_RENDA
                    - CERTIDAO_PF
                    - PROCURACAO_PF
                    - COMPROVACAO_ESTADO_CIVIL
                    - FORA_DE_ESCOPO
                    - NAO_IDENTIFICADO
                fileName:
                  type: string
                  nullable: true
                version:
                  type: integer
                  nullable: true
                validatedAt:
                  type: string
                  nullable: true
                  format: date-time
                clauseNumber:
                  type: string
                  nullable: true
                clauseExcerpt:
                  type: string
                  nullable: true
                confidence:
                  type: number
                  nullable: true
        documentsCount:
          type: integer
        pendingCount:
          type: integer
        reportId:
          type: string
          nullable: true
          description: >-
            Reservado para o relatorio mais recente do mesmo documento. Hoje vem
            null.
        crossDocument:
          type: object
          nullable: true
          description: >-
            Ultima conferencia cruzada entre os documentos do cadastro. null
            quando nunca houve o que cruzar, o que e diferente de conferido e
            consistente.
          properties:
            status:
              type: string
              enum:
                - CONSISTENTE
                - DIVERGENTE
                - NAO_CONFERIDO
            checks:
              type: array
              items:
                type: object
                additionalProperties: true
            documentIds:
              type: array
              items:
                type: string
            triggeredByDocumentId:
              type: string
              nullable: true
            ruleSetVersion:
              type: string
            evaluatedAt:
              type: string
              format: date-time
        basicDataSyncedAt:
          type: string
          nullable: true
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ApiError:
      type: object
      description: >-
        Formato unico de erro da API. Nao faca match exato da mensagem: use o
        code.
      properties:
        code:
          type: integer
          description: Codigo HTTP.
        message:
          type: string
          description: >-
            Mensagem em portugues. Em erro de validacao, traz TODAS as falhas
            concatenadas por virgula.
  securitySchemes:
    authorization:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter JWT token

````

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