API reference
Notification preferences
Which kinds of notification the caller has turned off.
- GET
/v1/notification_preferencesGet where each kind of notification goes - PATCH
/v1/notification_preferencesChoose where kinds of notification go
Guides: Settings and your team
Get where each kind of notification goes
GET/v1/notification_preferences
client.notificationPreferences.get()
Where each kind of notification reaches the caller in these books: in the app, by email, in Slack, on WhatsApp, or nowhere.
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/notification_preferences" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Choose where kinds of notification go
PATCH/v1/notification_preferences· Idempotent
client.notificationPreferences.update()
Choose where kinds of notification reach the caller, in these books only: a whole category off or back on, or one kind's channels. A kind turned off everywhere is not written at all, so nothing arrives when it is turned back on. Safe to repeat.
Request body
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X PATCH "https://api.ledgerit.ai/v1/notification_preferences" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'Objects
The objects these operations take and return.
NotificationPreferencesOut
| Name | Type | Description |
|---|---|---|
categoriesRequired | array of CategoryPreference | Every category, in display order. |
channels_availableRequired | array of string | The channels a notice can reach the caller on in these books, in display order: the app and email always, in_app, email, slack, whatsapp |
kindsRequired | array of KindPreferenceOut | Every kind the caller may choose channels for, in display order. A kind that cannot be changed, such as the books being scheduled for deletion, is not listed. |
NotificationPreferencesIn
| Name | Type | Description |
|---|---|---|
categories | array of CategoryPreference | The categories to turn off or back on. Those left out stay as they are. |
kinds | array of KindPreferenceIn | The kinds to send to new channels, applied after |
CategoryPreference
| Name | Type | Description |
|---|---|---|
keyRequired | string | A group of kinds of notification, as Settings groups them. connections, review, receipts, close, team, discussion, digest |
mutedRequired | boolean | True when every kind in it reaches the caller nowhere in these books. Setting it false puts each of its kinds back on its default channels. |
KindPreferenceOut
| Name | Type | Description |
|---|---|---|
categoryRequired | string | The category Settings shows it under. connections, review, receipts, close, team, discussion, digest |
channelsRequired | array of string | Where it reaches the caller in these books. Empty when it is turned off. in_app, email, slack, whatsapp |
channels_availableRequired | array of string | The channels this kind can reach the caller on in these books: those of the preferences' in_app, email, slack, whatsapp |
keyRequired | string | A kind of notification: a notification's connection_failing, transactions_need_review, receipt_missing, period_closed, period_reopened, member_joined, mentioned, question_asked, question_answered, filing_proposed, weekly_digest |
KindPreferenceIn
| Name | Type | Description |
|---|---|---|
channelsRequired | array of string | Where it should reach the caller in these books from now on. Empty turns it off. in_app, email, slack, whatsapp |
keyRequired | string | A kind of notification: a notification's connection_failing, transactions_need_review, receipt_missing, period_closed, period_reopened, member_joined, mentioned, question_asked, question_answered, filing_proposed, weekly_digest |