---
title: "Authentication"
description: "Authenticate with an API token and tell dealerMe which organization a request is for."
canonical_url: "https://dealerme.com/docs/authentication"
---

> Index of every page on this site: [llms.txt](https://dealerme.com/llms.txt)

The dealerMe API uses API tokens. Send yours as a bearer token on every request.

## Create an API token

1. Sign in to [app.dealerme.com](https://app.dealerme.com/login).
2. Open your profile menu and select **API Tokens**.
3. Name the token and create it. Copy it right away, because it's only shown once.

Treat tokens like passwords. Keep them on your server, never in browser code or a public repository. If a token leaks, delete it on the same page and create a new one.

```text
Authorization: Bearer YOUR_API_TOKEN
```

## Choose the organization

A token can have access to more than one organization, so every request also says which one it's for.

<table>
<thead>
  <tr>
    <th>
      Header
    </th>
    
    <th>
      Value
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        X-DealerMe-Organization-Id
      </code>
    </td>
    
    <td>
      Your dealerMe organization ID.
    </td>
  </tr>
</tbody>
</table>

A request without this header is rejected, and the token's user must be a member of the organization.

<code-group>

```bash [CURL]
DEALERME_TOKEN="your API token"
DEALERME_ORG_ID="your organization id"

curl "https://api.dealerme.com/v1/consent-management/email/consent?contact_value=jane@example.com" \
  -H "Authorization: Bearer $DEALERME_TOKEN" \
  -H "X-DealerMe-Organization-Id: $DEALERME_ORG_ID" \
  -H 'Accept: application/json'
```

</code-group>

## Sitemap

See the full [sitemap](https://dealerme.com/sitemap.md) for all pages.
