# Disconnect accounting integration

Disconnect an active accounting integration.

- If integration is ACTIVE: Disconnects and returns success
- If integration ID doesn't exist: Returns 404 error
- If integration is not currently active: Returns 409 error

Endpoint: POST /v3/accounting/integration/{integration_id}/disconnect
Version: 1.0.0-alpha
Security: oauth2

## Path parameters:

  - `integration_id` (string, required)

## Response 200 fields (application/json):

  - `integration_id` (string, required)
    Unique identifier for the integration
    Example: "int_abc123"

  - `vendor` (string, required)
    The accounting vendor/system. ERP partners must request Brex to create a vendor ID for them to use this field.

  - `vendor_account_id` (string, required)
    The vendor account ID this integration is tied to
    Example: "customer_account_id"

  - `status` (string, required)
    Current status of the integration
    Enum: "ACTIVE", "DISABLED"

  - `created_at` (string, required)
    Timestamp when the integration was created
    Example: "2025-08-15T10:00:00Z"

## Response 401 fields (application/json):

  - `error_code` (string, required)
    Machine-readable error code
    Enum: "ACTIVE_INTEGRATION_EXISTS", "FORBIDDEN", "INTEGRATION_NOT_ACTIVE", "INTERNAL_ERROR", "INVALID_REQUEST", "NOT_FOUND", "UNAUTHORIZED", "DUPLICATE_ACCOUNTING_RECORD_IDS", "ACCOUNTING_RECORD_NOT_READY_FOR_EXPORT", "VENDOR_ACCOUNT_ID_MISMATCH"

  - `message` (string, required)
    Human-readable error message
    Example: "The request is malformed or contains invalid data."

  - `details` (object,null)
    Additional error context

  - `details.existing_integration_id` (string)
    ID of the existing active integration
    Example: "int_abc123"

  - `details.existing_vendor` (string)
    Vendor of the existing integration
    Example: "ERP_A"

  - `details.requested_vendor` (string)
    Vendor that was requested to be created
    Example: "ERP_B"

  - `details.integration_id` (string)
    Integration ID associated with the error
    Example: "int_abc123"

  - `details.current_status` (string)
    Current status of the integration when the error occurred
    Example: "DISABLED"

  - `details.duplicate_accounting_record_ids` (array)
    Accounting record IDs that triggered the error
    Example: ["accr_abc123","accr_def456"]

  - `details.not_ready_for_export_accounting_record_ids` (array)
    Accounting record IDs that are not ready for export
    Example: ["accr_ghi789"]

  - `details.not_found_export_entry_source_ids` (array)
    Accounting record IDs that could not be found
    Example: ["accr_ghi789"]


