Skip to main content
Every request you make to the Dohoo API must be authenticated with an API key. Dohoo uses a simple header-based scheme — include your key in the X-API-Key request header and the API will identify your account, validate your plan, and enforce your usage limits automatically.

Getting your API key

1

Log in to your Dohoo account

Go to dohoo.ai and sign in. API access requires a Business or Agency plan.
2

Navigate to API Keys

Open Settings → API Keys in the dashboard. Your key is displayed there and ready to copy.Alternatively, you can retrieve your key programmatically:
3

Copy your key

Your API key always starts with the prefix dh_live_. Copy it and store it somewhere secure — you’ll pass it as a header in every API request.

Including the key in requests

Add the X-API-Key header to every API call. The example below lists all uploaded files:
The key format is always:
If you omit the header or supply an invalid key, the API returns 401 Unauthorized.

Rotating your API key

You can rotate your API key at any time — either from the dashboard or via the API itself. Rotating generates a new key and immediately invalidates the old one. Via the API:
Via the dashboard: Go to Settings → API Keys → Rotate and confirm the action.
Rotating your API key immediately invalidates the old one. Any integration still using the previous key will start receiving 401 Unauthorized errors. Update all your integrations with the new key before or immediately after rotating.

Storing your key safely

Store your API key as an environment variable so it never appears in your source code or version control history.
Then reference it in your requests: