> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Update request logging settings

PUT https://demo.docusign.net/restapi/v2.1/diagnostics/settings
Content-Type: application/json

Enables or disables API request logging for troubleshooting.

When enabled (`apiRequestLogging` is **true**),
REST API requests and responses for the user are added to a log.
A log can have up to 50 requests/responses
and the current number of log entries can be determined
by getting the settings.
Logging is automatically disabled when the log limit of 50 is reached.

You can call
[Diagnostics: getRequestLog](/docs/esign-rest-api/reference/diagnostics/requestlogs/get/)
or
[Diagnostics: listRequestLogs](/docs/esign-rest-api/reference/diagnostics/requestlogs/list/)
to download the log files (individually or as a zip file).
Call [Diagnostics: deleteRequestLogs](/docs/esign-rest-api/reference/diagnostics/requestlogs/delete/)
to clear the log by deleting current entries.

Private information, such as passwords and integration key information,
which is normally located in the call header is omitted from the request/response log.

API request logging only captures requests from the authenticated user.
Any call that does not authenticate the user and resolve a userId is not logged.

Reference: https://developers.docusign.com/docs/esign-rest-api/reference/diagnostics/requestlogs/updatesettings

## Authentication

- `Authorization` header (required) (prefixed with ` Bearer  `) — OAuth 2.0 access token (JWT or auth-code grant). Sent as `Authorization: Bearer <token>` on every request except `GET /v2.1` and `GET /service_information`, which are public discovery endpoints.

## Servers

- `https://demo.docusign.net/restapi` (Demo, default)
- `https://www.docusign.net/restapi` (Production)

## Request

### Body (application/json)

This endpoint expects a diagnosticsSettingsInformation.

- `apiRequestLogging` (string, optional) — When **true,** enables API request logging for the user.
- `apiRequestLogMaxEntries` (string, optional) — Specifies the maximum number of API requests to log.
- `apiRequestLogRemainingEntries` (string, optional) — Indicates the remaining number of API requests that can be logged.

## Response

### 200

Successful response.

- `apiRequestLogging` (string, optional) — When **true,** enables API request logging for the user.
- `apiRequestLogMaxEntries` (string, optional) — Specifies the maximum number of API requests to log.
- `apiRequestLogRemainingEntries` (string, optional) — Indicates the remaining number of API requests that can be logged.

## Errors

### 400 Bad Request Error

Error encountered.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Examples

**Request**

```json
{
  "apiRequestLogging": "sample string 1",
  "apiRequestLogMaxEntries": "sample string 2",
  "apiRequestLogRemainingEntries": "sample string 3"
}
```

**Response**

```json
{
  "apiRequestLogging": "sample string 1",
  "apiRequestLogMaxEntries": "sample string 2",
  "apiRequestLogRemainingEntries": "sample string 3"
}
```