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

# Token Exchange

> Exchange workspace and user API keys for a Daly JWT

# POST /auth/token

Use this endpoint to obtain the Daly JWT used by protected API routes.

<Info>
  This interactive page targets the production OpenAPI server at `https://api.dalyenergy.com`.
</Info>

## When to Use It

* Use this when your integration stores Daly workspace and user API keys directly.
* If your client starts from Supabase auth instead, use the `/auth/workspaces` and `/auth/exchange-supabase` flow.

## Request Notes

* `workspace_id` is the workspace API key.
* `user_id` is the user API key.
* The current response contract returns `{ "result": "success", "token": "<jwt>" }`.
