~/enine-sites-help/developers/how-to-get-an-api-token
How to get an API token
Email us from your account address and name the site; we send back a token to use in the Authorization header.
You need an Enine Sites account and a site.
Steps
- Email hello@eninesites.com from the address on your account.
- Say which site the token is for.
- Keep the single string we send back somewhere safe, such as an environment variable.
- Send it in the Authorization header of every request, as shown below.
curl -H "Authorization: Token $ENINE_TOKEN" \
https://e9sites.com/api/v1/site/
You should see
A list of your sites, instead of a 401 error.
Ways to authenticate
| Method | What you send | Who uses it |
|---|---|---|
| Token | Authorization: Token | Scripts, servers, and anything headless |
| Session | The sessionid cookie | The manager in your browser, automatically |
| OAuth2 | Authorization: Bearer | MCP clients, such as an AI assistant |
Keep it safe
- Treat the token like a password. It carries your role on every site you belong to.
- Never put it in code you commit. Use an environment variable.
- Tokens do not expire on a schedule. They stay valid until we deactivate them.
- If a token leaks, email us and we will deactivate it immediately.
Next
- Next step: How to make your first API request