- API
- Account endpoints
Account endpoints
The Qualithm API's Account endpoints: what each takes and returns.
Every path starts at your API URL. Every response is JSON, and an error has the error body.
Get the caller's account
#GET /v1/account
Needs an API token.
Response: 200 with Account in data.
Errors: 401, 404, 429, 500, 503
bash
curl "<your-api-url>/v1/account" \
-H "Authorization: Bearer <your-api-token>"Get the caller's email preferences
#GET /v1/account/communication-preferences
Needs an API token.
Response: 200 with CommunicationPreferences in data.
Errors: 401, 404, 429, 500, 503
bash
curl "<your-api-url>/v1/account/communication-preferences" \
-H "Authorization: Bearer <your-api-token>"Types
#Account
#| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | An account ID: acc_… |
email | string | Yes | |
name | string | Yes | |
termsVersion | string | Yes | The current Terms of Service version. Ask the person to accept when it differs from termsAcceptedVersion. |
termsAcceptedVersion | string or null | Yes | The terms version the person last accepted, or null |
termsAcceptedAt | string (date-time) or null | Yes | When they accepted it |
createdAt | string (date-time) | Yes | UTC time, RFC 3339 |
updatedAt | string (date-time) | Yes | UTC time, RFC 3339 |
CommunicationPreferences
#Which marketing emails the account receives. A preference never set reads as true.
| Field | Type | Required | Description |
|---|---|---|---|
blogArticles | boolean | Yes | |
educationResources | boolean | Yes | |
events | boolean | Yes | |
productNewsPromotions | boolean | Yes |