---
title: "Enable or disable audit logging for an organization"
method: PATCH
path: "/v2/organizations/settings/auditLogging"
tags: ["Organizations"]
---

# Enable or disable audit logging for an organization

`PATCH /v2/organizations/settings/auditLogging`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/organizations/settings/auditLogging`
- Auth: HTTP bearer

Enable or disable audit logging for the organization.
Enabling provisions a warehouse user and an audit log connection. Disabling [deletes an existing audit log storage integration](/reference/delete-audit-logging-storage-integration)
along with any scheduled exports attached to them, archives the connection,
and deletes the warehouse user. 
### Usage notes
- To perform this operation, you must use API credentials owned by a user assigned the Admin account type.
- To read or update this setting for a tenant organization, use [impersonation](/docs/impersonate-users) to obtain a token for that tenant, then call this endpoint with that token.

## Request body

- object
  - `enabled` boolean, required: Whether audit logging should be enabled for the organization.

## Response `202`

The audit logging status after accepting the update request.

- OrganizationsUpdateAuditLoggingSettingResponse202: The audit logging status after accepting the update request.
  - `status` 'enabled' | 'enable_in_progress' | 'disabled' | 'disable_in_progress', required: Current state of audit logging for the organization. `enable_in_progress` and `disable_in_progress` mean a background task is still running.

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
