Documentation Index
Fetch the complete documentation index at: https://docs.bayse.markets/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Log in with your Bayse account credentials to obtain a session token and device ID. These are required to manage API keys (create, list, revoke, rotate).
Use this endpoint when you want to manage API keys programmatically. If you prefer a UI, you can also manage API keys in the Bayse web app at app.bayse.markets/settings/api-keys, or in the web app, via More > Account Settings > API Keys in the Developer Tool section.
This endpoint is rate-limited to 1 request per 2 minutes per email address. See Rate limits for details.
Request body
Your Bayse account email address.
Your Bayse account password (max 128 characters).
Example request
curl -X POST https://relay.bayse.markets/v1/user/login \
-H "Content-Type: application/json" \
-d '{
"email": "you@example.com",
"password": "your-password"
}'
Response
Session token. Pass this as the x-auth-token header when managing API keys.
Device identifier. Pass this as the x-device-id header when managing API keys.
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"deviceId": "d_abc123",
"userId": "usr_456def"
}
Errors
| Status | Description |
|---|
| 400 | Invalid request body (missing or malformed email/password). |
| 401 | Invalid credentials. |
| 429 | Rate limited. Retry after the number of seconds in retryAfter. |
{
"message": "Too many login attempts. Please try again later.",
"retryAfter": 120
}
Next steps
Use the token and deviceId from the response to create an API key programmatically:
curl -X POST https://relay.bayse.markets/v1/user/me/api-keys \
-H "x-auth-token: YOUR_TOKEN" \
-H "x-device-id: YOUR_DEVICE_ID" \
-H "Content-Type: application/json" \
-d '{"name": "My API Key"}'