Skip to main content
Every request to the ENS Ads API must include your API key as a Bearer token in the Authorization header. There are no cookies, query-string parameters, or session-based alternatives — the header is the only accepted mechanism. You can obtain your API key from the ENS Ads dashboard.

Header format

Include the following header with every request, replacing YOUR_API_KEY with your actual key:
Never include your API key in client-side or user-facing code. Requests should always originate from your server so the key is never exposed in a browser, mobile app, or public repository.

Code examples

The examples below show how to attach the Authorization header in three common environments.
Store your API key in an environment variable (for example, ENS_ADS_API_KEY) and read it at runtime. Avoid hardcoding keys in source files or committing them to version control.

Authentication errors

If your key is missing or invalid, the API returns a 401 Unauthorized response:
Check that the Authorization header is present, the token is prefixed with Bearer , and the key itself is correct. If the problem persists, generate a new key from the dashboard.