API v1
v1
View as Markdown

Mark a notification as read

PUT /api/v1/notifications/{notification}/read

Record that you have read one notification.

Marking something read twice keeps the first moment, because that is when it was read. There is no way to mark one unread again: this records something that happened rather than setting a flag.

Path parameters

Sent as JSON. Anything not listed here is ignored.

notification uuid Required

The address of the notification.

Returns

The notification as it now stands, carrying the moment it was read.

data object

The notification.

data.type string

Always notification. It names the kind of record, so a caller holding several kinds can tell them apart without looking at where they came from.

data.id string

The id of this record, as a string even when it reads as a number. It is what every endpoint naming this record takes.

data.attributes object

Everything the record holds.

data.attributes.notification_type string

What the notification is about, as a key such as reminder_due or digest. The set grows as the product finds new things to say, so match the keys you care about and let an unfamiliar one through rather than treating it as an error.

data.attributes.channel string

Which way it went out: in_app, email, slack, telegram or sms. One notification is written per channel, so a reminder that went out two ways is two records here, alike in everything but this field.

data.attributes.title string

The one line it leads with, up to 255 characters. For a reminder it is the name of the reminder.

data.attributes.body string

What it says under the title, of no fixed length, written in the language the account was set to at the moment it was made rather than the one you are asking in.

data.attributes.scheduled_for timestamp

When it was due, as a count of seconds since 1970. Quiet hours can hold a notification back, so this can be earlier than sent_at by hours.

data.attributes.sent_at timestamp

When it went out, as a count of seconds since 1970, or null when it has not gone out yet.

data.attributes.read_at timestamp

When it was first read, as a count of seconds since 1970, or null when it has not been. Reading something twice keeps the first moment.

data.attributes.failure_reason string

What the channel said when it refused, up to 255 characters, or null when nothing refused. A notification that failed keeps its record and its reason rather than disappearing.

data.attributes.created_at timestamp

When the record was written, as a count of seconds since 1970.

data.links object

Where to find this record.

data.links.self string

The absolute address this record is read from.

Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.

PUT
curl https://my.monicahq.com/api/v1/notifications/9c7f2a1e-4b6d-4f0a-9f2b-1d3c5e7a9b11/read \
-X PUT \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/notifications/9c7f2a1e-4b6d-4f0a-9f2b-1d3c5e7a9b11/read', {
method: 'PUT',
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->put('https://my.monicahq.com/api/v1/notifications/9c7f2a1e-4b6d-4f0a-9f2b-1d3c5e7a9b11/read');
Response 200
{
"data": {
"type": "notification",
"id": "9c7f2a1e-4b6d-4f0a-9f2b-1d3c5e7a9b11",
"attributes": {
"notification_type": "reminder_due",
"channel": "in_app",
"title": "Birthday, Michael Scott",
"body": "It is in seven days.",
"scheduled_for": 1756339200,
"sent_at": 1756339210,
"read_at": 1756342800,
"failure_reason": null,
"created_at": 1756339200
},
"links": {
"self": "https://my.monicahq.com/api/v1/notifications/9c7f2a1e-4b6d-4f0a-9f2b-1d3c5e7a9b11"
}
}
}

Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.