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

# Authentication

Experro uses two authentication models, depending on which part of the API you are calling. This page covers both, how to create an access token, and how to choose the right base URL.

## Authentication Models

### Access token

Used by the **Management APIs** and the **Content Delivery APIs**. Every request carries a token plus the identifiers for what you are targeting.

| Header | Description |
| - | - |
| `accesstoken` | Your API access token. Create one in the Admin Panel — see [Creating an Access Token](#creating-an-access-token). |
| `x-tenant-id` | Identifies your organization. |
| `x-workspace-id` | Identifies the workspace within your organization. |
| `x-environment-id` | Identifies the environment you are targeting. |

### Storefront headers

Used by the **Discovery APIs**. These endpoints are designed to be called directly from your storefront's browser code, so they identify you with headers instead of a token.

| Header | Description |
| - | - |
| `x-tenant-id` | Identifies your organization. |
| `x-workspace-id` | Identifies the workspace within your organization. |
| `x-environment-id` | Identifies the environment you are targeting. |

## Which API Uses Which

| API | Access token | Headers |
| - | - | - |
| Content Management | Required | `x-tenant-id`, `x-workspace-id`, `x-environment-id` |
| Content Delivery | Required | `x-tenant-id`, `x-workspace-id`, `x-environment-id` |
| Discovery | Not required | `x-tenant-id`, `x-workspace-id`, `x-environment-id` |
| Forms | Not required | None |

## Creating an Access Token

<Info>You need administrator privileges in the Experro Admin Panel to create and manage tokens.</Info>

1. **Log in** to the Experro Admin Panel.
2. Go to **Workspace Settings → API & CLI Tokens**.
3. The **API Tokens** tab is selected by default.

<img src="https://mintcdn.com/experro/bmMLx3AV-6ZHG9Xe/images/API/api_home.png?fit=max&auto=format&n=bmMLx3AV-6ZHG9Xe&q=85&s=38799ec436b9912ee44c7b26430ba0d3" alt="API Tokens Screen" width="1919" height="1079" data-path="images/API/api_home.png" />

Then create the token:

1. Click **Create Token**.
2. Fill in:
   * **Name (required):** Descriptive name for your app or integration.
   * **Description (optional):** Purpose of the token.
   * **Permissions (required):** *Read-Only* (GET only) or *Full Access* (GET, POST, PUT, DELETE).
   * **Expiration (optional):** Expiry date. Leave blank for no expiry.
3. Click **Save**.
4. **Copy** or **download** the token when prompted.
5. Click **Done**.

<img src="https://mintcdn.com/experro/bmMLx3AV-6ZHG9Xe/images/API/create_api_token.png?fit=max&auto=format&n=bmMLx3AV-6ZHG9Xe&q=85&s=e0e9e82fb61cffdb1920afad81c7a216" alt="Create API Token Dialog" width="1919" height="1079" data-path="images/API/create_api_token.png" />

<Warning>The token value is shown **only once**. Copy or download it immediately.</Warning>

### Viewing Existing Tokens

The **API Tokens** screen lists every token with its **Token Name**, **Created By**, **Created At**, **Permissions**, and **Expiration**. A blank expiration means the token never expires.

## Finding Your Header Values

| Value | Where to find it |
| - | - |
| `x-tenant-id` | In the token file you downloaded, as **Tenant ID**. |
| `x-workspace-id` | In the token file you downloaded, as **Workspace ID**. |
| `x-environment-id` | **Workspace Settings → Channels**, in the **ID** column for your channel. |

## Base URLs

Which base URL you use depends on the API.

### Management and Content Delivery APIs

Always use the Experro-hosted domain:

```
https://apis.experro.app/{service}/{version}/...
```

**Examples**

```
https://apis.experro.app/content/v2/content-models
https://apis.experro.app/content/v2/records
```

### Discovery APIs

Call these on your storefront domain:

```
https://{base-address}/discovery/...
```

To find the base address:

1. Go to **Workspace Settings → Channels**.
2. Open **Channel Settings**.
3. Go to the **Languages** tab.
4. Copy the URL from **Language URLs** that matches the language and environment you need.

<Info>Until you have pointed your custom domain, use the Experro-hosted domain. Once your own domain is configured both will work, but we strongly recommend your custom domain for production.</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.