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

# Atualizar empresa emissora

> Atualiza dados cadastrais do emissor (razão social, endereço, CRT). Para trocar só o ambiente fiscal use o endpoint dedicado `PATCH /v1/companies/{id}/ambiente`, que fica sempre auditado.



## OpenAPI

````yaml /openapi.json patch /v1/companies/{id}
openapi: 3.1.0
info:
  title: EngineAPI - Motor Fiscal SaaS
  description: >-

    ## API de Emissão Fiscal B2B2B


    EngineAPI é uma plataforma SaaS para emissão de documentos fiscais
    eletrônicos brasileiros.


    ### Documentos Suportados

    - **NF-e** (Modelo 55) - Nota Fiscal Eletrônica

    - **NFC-e** (Modelo 65) - Nota Fiscal de Consumidor Eletrônica

    - **NFS-e** - Nota Fiscal de Serviços Eletrônica


    > CTe (57) e MDFe (58): roadmap sem data, fora da superfície pública.


    ### Autenticação

    Todas as rotas protegidas requerem:

    ```

    Authorization: Bearer <seu_token>    # JWT (painel web)

    x-api-key: ek_live_<sua_key>         # API Key (server-to-server)

    ```


    ### Rate Limits

    - **Por plano** (janela de 1 segundo): Dev 5 · Starter 20 · Growth 60 ·
    Scale 200 req/s

    - Headers `X-RateLimit-Limit`/`Remaining`/`Reset` em toda resposta;
    `Retry-After` no 429


    ### Idempotency

    POSTs aceitam header `Idempotency-Key` para prevenir duplicatas:

    ```

    Idempotency-Key: <uuid-único-por-operação>

    ```


    ### Ambientes

    - **Homologação**: Para testes (SEFAZ sandbox)

    - **Produção**: Emissões reais


    ### Suporte

    - Email: suporte@engineapi.com.br

    - Docs: https://docs.engineapi.com.br
        
  version: 2.1.0
  contact:
    name: engineAPI
    url: https://engineapi.com.br
    email: suporte@engineapi.com.br
  license:
    name: Proprietário
    url: https://engineapi.com.br/legal/termos
servers:
  - url: https://api.engineapi.com.br
    description: Produção
security: []
tags:
  - name: Cérebro Fiscal
    description: >-
      Classificação fiscal assistida + tributação IBS/CBS (tier 80%, apoio à
      decisão)
  - name: Autenticação
    description: Login, registro de conta e API Keys
  - name: Empresas
    description: Gestão de empresas emitentes (Issuers)
  - name: NFe
    description: Nota Fiscal Eletrônica (Modelo 55)
  - name: NFCe
    description: Nota Fiscal de Consumidor (Modelo 65)
  - name: NFSe
    description: Nota Fiscal de Serviços Eletrônica
  - name: Consultas
    description: Consulta de CNPJ e CPF
  - name: Webhooks
    description: Configuração, entregas e reenvio de eventos assíncronos
  - name: Status
    description: Status público por serviço e canário de deploy
  - name: Saúde
    description: Liveness/readiness do processo e sanidade de autenticação
paths:
  /v1/companies/{id}:
    patch:
      tags:
        - Empresas
      summary: Atualizar empresa emissora
      description: >-
        Atualiza dados cadastrais do emissor (razão social, endereço, CRT). Para
        trocar só o ambiente fiscal use o endpoint dedicado `PATCH
        /v1/companies/{id}/ambiente`, que fica sempre auditado.
      operationId: update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCompanyDto'
      responses:
        '200':
          description: Empresa atualizada
        '404':
          description: Empresa não encontrada (ou de outro parceiro)
      security:
        - JWT-auth: []
components:
  schemas:
    UpdateCompanyDto:
      type: object
      properties:
        cnpj:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 150
            - type: 'null'
        tradeName:
          anyOf:
            - type: string
              maxLength: 150
            - type: 'null'
        ie:
          anyOf:
            - type: string
            - type: 'null'
        im:
          anyOf:
            - type: string
            - type: 'null'
        crt:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        email:
          anyOf:
            - type: string
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            - type: 'null'
        phone:
          anyOf:
            - type: string
            - type: 'null'
        cep:
          anyOf:
            - type: string
            - type: 'null'
        address:
          anyOf:
            - type: string
              maxLength: 150
            - type: 'null'
        number:
          anyOf:
            - type: string
            - type: 'null'
        complement:
          anyOf:
            - type: string
            - type: 'null'
        neighborhood:
          anyOf:
            - type: string
              maxLength: 150
            - type: 'null'
        city:
          anyOf:
            - type: string
              maxLength: 150
            - type: 'null'
        state:
          anyOf:
            - type: string
            - type: 'null'
        ibgeCode:
          anyOf:
            - type: string
            - type: 'null'
        csc:
          anyOf:
            - type: string
            - type: 'null'
        cscId:
          anyOf:
            - type: string
            - type: 'null'
        cnae:
          anyOf:
            - type: string
            - type: 'null'
        segmento:
          anyOf:
            - type: string
            - type: 'null'
        mei:
          anyOf:
            - type: boolean
            - type: 'null'
        fiscalBrainEnabled:
          anyOf:
            - type: boolean
            - type: 'null'
        cTribNacPadrao:
          anyOf:
            - type: string
              pattern: ^\d{6}$
            - type: 'null'
        servicoPadraoLc116:
          anyOf:
            - type: string
              pattern: ^\d{2}\.\d{2}$
            - type: 'null'
        pTotTribSNPadrao:
          anyOf:
            - type: number
              exclusiveMinimum: 0
              maximum: 100
            - type: 'null'
  securitySchemes:
    JWT-auth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Token JWT obtido via /v1/auth/login

````