Authentication
All API requests require a Bearer token.
Get a Session Token
Section titled “Get a Session Token”curl -X POST https://wokku.cloud/api/v1/auth/login \ -H "Content-Type: application/json" \ -d '{"email": "you@example.com", "password": "your-password"}'Response:
{"token": "eyJ...", "user": {"id": 1, "email": "you@example.com"}}Create an API Token
Section titled “Create an API Token”For long-lived access, create an API token:
curl -X POST https://wokku.cloud/api/v1/auth/tokens \ -H "Authorization: Bearer SESSION_TOKEN" \ -d '{"name": "my-token"}'Response:
{"id": 1, "token": "wokku_abc123...", "name": "my-token"}Save the token value — it’s only shown once.
Using Tokens
Section titled “Using Tokens”Include the token in the Authorization header:
curl https://wokku.cloud/api/v1/apps \ -H "Authorization: Bearer wokku_abc123..."Verify Your Token
Section titled “Verify Your Token”curl https://wokku.cloud/api/v1/auth/whoami \ -H "Authorization: Bearer $TOKEN"Revoke a Token
Section titled “Revoke a Token”curl -X DELETE https://wokku.cloud/api/v1/auth/tokens/TOKEN_ID \ -H "Authorization: Bearer $TOKEN"