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

# endstate.settings.auth.clear

> Return to Endstate-managed identity.

```ts theme={null}
    clear(options?: RequestOptions): Promise<AuthSettingsResponse>
```

|             |                                                                                           |
| ----------- | ----------------------------------------------------------------------------------------- |
| Endpoint    | [`DELETE /v1/settings/auth`](/api-reference/settings/return-to-endstate-managed-identity) |
| Credential  | Secret key (`end_sk_...`)                                                                 |
| Retry class | `write`                                                                                   |

Never repeated. The API accepts no idempotency key here, so a second send is a second write. Only `429 rate_limit.exceeded` is retried.

## Example

```ts theme={null}
const result = await endstate.settings.auth.clear();
```

## Returns

`200` - `AuthSettingsResponse`.

<ResponseField name="auth_type" type="'endstate' | 'external'" required>
  `external` when your own token issuer is registered; `endstate` when identity is managed by Endstate.
</ResponseField>

<ResponseField name="issuer" type="string | null" required>
  The registered token issuer (`iss`), or null when unset.
</ResponseField>

<ResponseField name="jwks_url" type="string | null" required>
  The registered JWKS URL, or null when unset.
</ResponseField>

<ResponseField name="audience" type="string | null" required>
  The audience (`aud`) your identity tokens carry, or null when unset.
</ResponseField>

## Errors

Branch on `error.code`, never on the HTTP status - several codes share one.

| Code                | HTTP | Retry         |
| ------------------- | ---- | ------------- |
| `auth.unauthorized` | 401  | Do not retry  |
| `internal.error`    | 500  | Safe to retry |

See [Errors and retries](/sdks/core/errors-and-retries) for the error types and how to narrow them.
