API reference
Notifications
What LedgerIt told the caller, and marking it read.
- GET
/v1/notificationsList the caller's notifications - POST
/v1/notifications/readMark notifications read - GET
/v1/notifications/{notification_id}Get a notification - DELETE
/v1/notifications/{notification_id}Dismiss a notification
Guides: Settings and your team
List the caller's notifications
GET/v1/notifications
client.notifications.list()
The caller's notifications in these books, newest first, with how many are unread.
Parameters
| Name | Type | Description |
|---|---|---|
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
unread_onlyQuery | boolean | Only the ones not read yet. |
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/notifications" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Mark notifications read
POST/v1/notifications/read· Idempotent
client.notifications.markRead()
Mark some of the caller's notifications read, or all of them. Safe to repeat: one already read stays read.
Request body
Response
200MarkReadOut
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 POST "https://api.ledgerit.ai/v1/notifications/read" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'Get a notification
GET/v1/notifications/{notification_id}
client.notifications.get()
One of the caller's notifications.
Parameters
| Name | Type | Description |
|---|---|---|
notification_idPath · Required | string | An id that starts with |
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/notifications/{notification_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Dismiss a notification
DELETE/v1/notifications/{notification_id}
client.notifications.dismiss()
Dismiss one of the caller's notifications: it leaves their inbox for good, and the same notice is not sent to them again. Theirs only.
Parameters
| Name | Type | Description |
|---|---|---|
notification_idPath · Required | string | An id that starts with |
Response
204No content
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 DELETE "https://api.ledgerit.ai/v1/notifications/{notification_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
NotificationPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of NotificationOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null | |
unread_countRequired | integer | How many of the caller's notifications in these books are unread, in all pages. |
MarkReadIn
| Name | Type | Description |
|---|---|---|
all | boolean | Mark every one of the caller's notifications read. |
notification_ids | array of string or null | The notifications to mark read. Ids that are not the caller's are ignored. |
MarkReadOut
| Name | Type | Description |
|---|---|---|
markedRequired | integer | How many changed from unread to read. |
unread_countRequired | integer | How many are unread now. |
NotificationOut
| Name | Type | Description |
|---|---|---|
bodyRequired | string or null | More detail, in English, when there is any. |
channelsRequired | array of string | Where it goes, as the caller's preferences for its in_app, email, slack, whatsapp |
created_atRequired | string (date-time) | |
dataRequired | object | The facts behind the notice, by |
delivered_channelsRequired | array of string | Where it has got to so far: in_app, email, slack, whatsapp |
idRequired | string | An id that starts with |
readRequired | boolean | Whether the caller has seen it. |
severityRequired | string |
info, warning |
titleRequired | string | One line, in English. Render |
typeRequired | string | What happened. Decides the keys in connection_failing, transactions_need_review, receipt_missing, period_closed, period_reopened, member_joined, mentioned, question_asked, question_answered, filing_proposed, weekly_digest, entity_deletion_scheduled, plan_moving |