Skip to content

Authentication

All API requests require a Bearer token.

Terminal window
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"}}

For long-lived access, create an API token:

Terminal window
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.

Include the token in the Authorization header:

Terminal window
curl https://wokku.cloud/api/v1/apps \
-H "Authorization: Bearer wokku_abc123..."
Terminal window
curl https://wokku.cloud/api/v1/auth/whoami \
-H "Authorization: Bearer $TOKEN"
Terminal window
curl -X DELETE https://wokku.cloud/api/v1/auth/tokens/TOKEN_ID \
-H "Authorization: Bearer $TOKEN"