Agent-readable docs index: /docs/llms.txt. Full docs in one file: /docs/llms-full.txt. Download /docs/docs.zip to grep all markdown files locally.

API authentication

Authenticate with the login endpoint, then pass the returned JWT in the Authorization header.

Login

curl -X POST https://raildock.example.com/api/login \ -H 'Content-Type: application/json' \ -d '{"email":"[email protected]","password":"..."}'
A successful response includes token and user.

Bearer requests

curl https://raildock.example.com/api/me \ -H "Authorization: Bearer $RAILDOCK_TOKEN"
The backend verifies bearer JWTs using HS256 and resolves the current user before protected actions.

Token handling

Treat the token as a credential with control-plane privileges. Do not place it in query strings, commit it to scripts, or write it into logs. For non-interactive automation, prefer the purpose-built key/deployment mechanisms available to your RailDock workflow rather than recycling a human session indefinitely.