API Reference
Auto-generated
Account
API reference for account endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.GET /api/v1/account/limits
GET
/api/v1/account/limitsGet Account Limits
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| X-Organization-Id | string | Optional | X-Organization-Id |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/account/limits \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"user_id": "example",
"limits": "example",
"has_limits": true
}PUT /api/v1/account/limits
PUT
/api/v1/account/limitsSet Account Limits
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| X-Organization-Id | string | Optional | X-Organization-Id |
| budget_limit_microcents | integer | Optional | budget_limit_microcents |
| request_limit | integer | Optional | request_limit |
| reset_period | "daily" | "weekly" | "monthly" | Optional | How often the counters reset.Default: monthly |
| enabled | boolean | Optional | Whether this limit is active.Default: True |
Request Example
Bash
curl -X PUT https://api.alterlab.io/api/v1/account/limits \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reset_period": "...",
"enabled": false
}'Response Example
JSON
{
"user_id": "example",
"limits": "example",
"has_limits": true
}DELETE /api/v1/account/limits
DELETE
/api/v1/account/limitsDelete Account Limits
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| X-Organization-Id | string | Optional | X-Organization-Id |
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/account/limits \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}GET /api/v1/account/passkeys
GET
/api/v1/account/passkeysList my passkeys
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/account/passkeys \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"passkeys": []
}POST /api/v1/account/passkeys/email-code
POST
/api/v1/account/passkeys/email-codeEnrolment step-up code
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/account/passkeys/email-code \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"sent": true,
"expires_in": 0
}POST /api/v1/account/passkeys/register/options
POST
/api/v1/account/passkeys/register/optionsWebAuthn creation options
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| device_label | string | Optional | device_label |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/account/passkeys/register/options \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}POST /api/v1/account/passkeys/register/verify
POST
/api/v1/account/passkeys/register/verifyStore a verified passkey
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| attestation | object | Required | Attestation |
| device_label | string | Optional | device_label |
| email_code | string | Optional | email_code |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/account/passkeys/register/verify \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"attestation": "..."
}'Response Example
JSON
{
"status": "ok"
}PATCH /api/v1/account/passkeys/{passkey_id}
PATCH
/api/v1/account/passkeys/{passkey_id}Rename a passkey
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| passkey_id | string | Required | passkey_id |
| device_label | string | Required | Device Label |
Request Example
Bash
curl -X PATCH https://api.alterlab.io/api/v1/account/passkeys/<passkey_id> \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"device_label": "example_device_label"
}'Response Example
JSON
{
"id": "example",
"device_label": "example",
"transports": [],
"backup_eligible": true,
"backed_up": true,
"created_at": "example"
}DELETE /api/v1/account/passkeys/{passkey_id}
DELETE
/api/v1/account/passkeys/{passkey_id}Revoke a passkey
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| passkey_id | string | Required | passkey_id |
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/account/passkeys/<passkey_id> \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}