API v1
v1
View as Markdown

Send a test message

POST /api/v1/notification-channels/{channel}/test

Send one message on a channel to find out whether it works.

This touches no reminder and writes no notification. Nothing here is something the account was owed, so nothing about it belongs in the record of what the account was told.

A channel that is not finished is refused with 422. A channel that is finished but whose service refuses the message answers 422 as well, carrying what came back, and the refusal is counted against the channel exactly as a real send would be.

Path parameters

Sent as JSON. Anything not listed here is ignored.

channel string Required

Which channel: in_app, email, telegram or sms. Anything else answers 404.

Returns

Whether it got through, and what came back when it did not.

data object

What happened when we tried.

data.sent boolean

Whether the message got through.

data.reason string

What the service said when it refused, up to 255 characters, or null when nothing refused.

Rate limit

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

POST
curl https://my.monicahq.com/api/v1/notification-channels/telegram/test \
-X POST \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/notification-channels/telegram/test', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->post('https://my.monicahq.com/api/v1/notification-channels/telegram/test');
Response 201
{
"data": {
"sent": true,
"reason": null
}
}

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