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

# Authentication

> How to authenticate with the Audit Logs API

All Audit Logs API requests require authentication using a workspace API key.

<Info>
  The Audit Logs API is available on **Enterprise plans** only. Workspace API keys are managed in the **[Secrets](/Enterprise/workspace-secrets)** section of your workspace settings.
</Info>

## Required role

Only workspace **owners** and **admins** can create and manage workspace API keys. Regular workspace members do not have access to the Secrets page in workspace settings.

To learn about workspace roles, see [Managing your workspace members](/Account-and-billing/Managing-your-workspaces#managing-your-workspace-members).

## Workspace API key

Include your workspace API key in the `api_key` header with all requests:

```bash theme={null}
api_key: YOUR_API_KEY
```

### Example request

```curl theme={null}
curl --request POST \
  --url https://app.base44.com/api/v1/audit-logs/{workspace_id}/list \
  --header 'api_key: <api_key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "event_types": ["auth.login"],
    "limit": 50
  }'
```

### Get your workspace API key

1. Click your workspace name at the top left and click **Settings**.
2. Click **Secrets** in the sidebar.
3. Click **+ Create API Key**.
4. Enter a name for the key and an optional description, then click **Create Key**.
5. Copy the key immediately and store it securely.

For the full guide on creating and managing workspace API keys, see [Managing workspace secrets](/Enterprise/workspace-secrets).

<Warning>
  Copy your API key immediately after creating it. You won't be able to see it again.
  Treat it like a password and do not share it or commit it to version control.
</Warning>
