Notifications

The caller's own in-app notifications and delivery preferences.

Needs a signed-in person

Every endpoint here acts for the person using the app, so it takes a browser session and refuses API keys with 403. Integrations can't call them; they are documented because the app is built on them.

Your notifications#

Your notifications

GET/api/v2/notifications

Any signed-in person.

Needs a signed-in person: API keys can't call this.

Query parameters

unread"0" | "1" | "true" | "false"
limitinteger

Responses

OK

curl -X GET "https://docuflow.pendral.io/api/v2/notifications" \
-H "Cookie: __Secure-better-auth.session_token=$DOCUFLOW_SESSION"
Response200
{
"items": [
{
"id": "clx9k2m4p0001qh8z3v7d5f2a",
"type": "type",
"title": "Invoice total",
"body": "Please confirm the PO number with the supplier.",
"targetType": "targetType",
"targetId": "clx9k2m4p0001qh8z3v7d5f2a",
"url": "https://hooks.example.com/docuflow",
"readAt": "2026-10-01T12:00:00.000Z",
"createdAt": "2026-10-01T12:00:00.000Z"
}
],
"unreadCount": 1
}

Mark read or unread#

{ ids } or { all: true }; unread: true marks unread again.

POST/api/v2/notifications/read

Any signed-in person.

Needs a signed-in person: API keys can't call this.

Body

application/json
idsstring[]
allboolean
unreadboolean

Responses

OK

curl -X POST "https://docuflow.pendral.io/api/v2/notifications/read" \
-H "Cookie: __Secure-better-auth.session_token=$DOCUFLOW_SESSION" \
-H "Content-Type: application/json" \
-d '{}'
Response200
{
"updated": 1
}

Delivery preferences#

Delivery preferences

GET/api/v2/notifications/preferences

Any signed-in person.

Needs a signed-in person: API keys can't call this.

Responses

OK

curl -X GET "https://docuflow.pendral.io/api/v2/notifications/preferences" \
-H "Cookie: __Secure-better-auth.session_token=$DOCUFLOW_SESSION"
Response200
{
"preferences": [
{
"type": "type",
"inApp": false,
"email": false
}
],
"digest": {
"enabled": true,
"lastSentAt": "2026-10-01T12:00:00.000Z"
}
}

Update delivery preferences#

Update delivery preferences

PUT/api/v2/notifications/preferences

Any signed-in person.

Needs a signed-in person: API keys can't call this.

Body

application/json
preferencesobject[]
digestboolean

Responses

OK

curl -X PUT "https://docuflow.pendral.io/api/v2/notifications/preferences" \
-H "Cookie: __Secure-better-auth.session_token=$DOCUFLOW_SESSION" \
-H "Content-Type: application/json" \
-d '{}'
Response200
{
"preferences": [
{
"type": "type",
"inApp": false,
"email": false
}
],
"digest": {
"enabled": true,
"lastSentAt": "2026-10-01T12:00:00.000Z"
}
}

Send your digest now#

A preview of the daily digest. Limited to 5 per hour.

POST/api/v2/notifications/digest

Any signed-in person.

Needs a signed-in person: API keys can't call this.

Responses

OK

curl -X POST "https://docuflow.pendral.io/api/v2/notifications/digest" \
-H "Cookie: __Secure-better-auth.session_token=$DOCUFLOW_SESSION"
Response200
{
"sent": false,
"reason": "Duplicate of an earlier upload"
}