---
updatedAt: 2026-05-28T19:21:10.000Z
agentTools:
  projectIndex: https://docs.notagateway.com.br/llms.txt
---

# Desabilitar Empresa

Desabilita uma empresa específica pelo seu identificador único ({empresaId})

> ❗️ Atenção!
>
> Esse procedimento não exclui a empresa, somente a desabilita.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "visão-geral",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.notagateway.com.br"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/empresas/{empresaId}/desabilitar": {
      "post": {
        "summary": "Desabilitar Empresa",
        "description": "Desabilita uma empresa específica pelo seu identificador único ({empresaId})",
        "operationId": "desabilitar-empresa",
        "parameters": [
          {
            "name": "empresaId",
            "in": "path",
            "description": "Identificador único da empresa",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"Message\": \"The request is invalid.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "Message": {
                      "type": "string",
                      "example": "The request is invalid."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n    {\n        \"codigo\": \"AUT002\",\n        \"mensagem\": \"Acesso negado. APIKey invalida, por favor verifique se setou o header do request corretamente com uma APIKey válida, por exemplo: \\\"Authorization: Basic {your-APIKey-here}\\\".\"\n    }\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "codigo": {
                        "type": "string",
                        "example": "AUT002"
                      },
                      "mensagem": {
                        "type": "string",
                        "example": "Acesso negado. APIKey invalida, por favor verifique se setou o header do request corretamente com uma APIKey válida, por exemplo: \"Authorization: Basic {your-APIKey-here}\"."
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n    {\n        \"codigo\": \"AUT001\",\n        \"mensagem\": \"Acesso negado. APIKey invalida, por favor verifique se ela está correta.\"\n    }\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "codigo": {
                        "type": "string",
                        "example": "AUT001"
                      },
                      "mensagem": {
                        "type": "string",
                        "example": "Acesso negado. APIKey invalida, por favor verifique se ela está correta."
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "Erro interno do servidor"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "csharp",
              "code": "public bool DesabilitarEmpresa(Guid empresaId)\n{\n  try\n  {\n    using (var httpClient = new HttpClient())\n    {\n      httpClient.DefaultRequestHeaders.Clear();\n      httpClient.DefaultRequestHeaders.Add(\"Authorization\", \"Basic {Sua-ApiKey-Aqui}\");\n      httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\n\n      using (var request = new HttpRequestMessage(HttpMethod.Post, string.Format(\"https://api.enotasgw.com.br/v1/empresas/{0}/desabilitar\", empresaId)))\n      {\n        using (var response = httpClient.SendAsync(request).Result)\n        {\n          if (response.IsSuccessStatusCode)\n          {\n            return true;\n          }\n          else\n          {\n            throw new Exception(((int)response.StatusCode) + \" - \" + response.ReasonPhrase);\n          }\n        }\n      }\n    }\n  }\n  catch (Exception)\n  {\n    throw;\n  }\n}"
            }
          ],
          "samples-languages": [
            "csharp"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```