5 minutes to help shape OpenTodo. Anonymous, no account. Take the survey

Notification channels API

A person's delivery channels: ntfy, Pushover, Gotify, or a signed webhook.

Implementation notes

A person's delivery channels: ntfy, Pushover, Gotify, or a signed webhook (OpenSpec notification-channels; guide: notification-channels.md). Every /api/v1/notification-channels route answers 404 channels_disabled while the owner's switch is off; these routes and the setting answer 403 demo_restricted on the public demo. Channels are server data: never operations, never synced or exported, and their tokens, user keys and signing secrets live in <data>/secrets/notification-channels.json only.

GET /api/v1/notification-channels

List notification channels · Token or session

{channels: [...], kinds, events}: id, kind, name, url, topic, events, includeTitles, enabled, disabledReason (too_many_failures), lang, tokenSet, userKeySet (Pushover), secretSet (webhook), lastOkAt, lastError, failures, createdAt, updatedAt. Never a secret

Response 200
FieldTypeDescription
channels requiredarray of object
channels[].createdAt requirednumber
channels[].disabledReasonstring
channels[].enabled requiredboolean
channels[].events requiredarray of string
channels[].failures requirednumber
channels[].id requiredstring
channels[].includeTitles requiredboolean
channels[].kind requiredstring
channels[].lang requiredstring
channels[].lastErrorstring
channels[].lastOkAt requirednumber | null
channels[].name requiredstring
channels[].secretSetboolean
channels[].tokenSet requiredboolean
channels[].topicstring
channels[].updatedAt requirednumber
channels[].urlstring
channels[].userKeySetboolean
events requiredarray of string
kinds requiredarray of string

POST /api/v1/notification-channels

Create a notification channel · Token or session

{kind, name?, url?, topic?, token?, userKey?, events?, includeTitles?, enabled?, lang?, origin?} → 201 {channel, secret?}; secret is a webhook channel's signing secret, shown only here

Request body
FieldTypeDescription
enabledboolean | null
eventsarray of string
includeTitlesboolean | null
kindstring | null
langstring | null
namestring | null
originstring | null
rotateSecret requiredboolean
tokenstring | null
topicstring | null
urlstring | null
userKeystring | null
Response 201
FieldTypeDescription
channel requiredobject | null
channel.createdAt requirednumber
channel.disabledReasonstring
channel.enabled requiredboolean
channel.events requiredarray of string
channel.failures requirednumber
channel.id requiredstring
channel.includeTitles requiredboolean
channel.kind requiredstring
channel.lang requiredstring
channel.lastErrorstring
channel.lastOkAt requirednumber | null
channel.name requiredstring
channel.secretSetboolean
channel.tokenSet requiredboolean
channel.topicstring
channel.updatedAt requirednumber
channel.urlstring
channel.userKeySetboolean
secretstring

PATCH /api/v1/notification-channels/{id}

Update a notification channel · Token or session

any field above except kind; token and userKey replace the stored ones; rotateSecret: true gives a webhook channel a new signing secret, returned once as secret; enabled: true clears a stop and the failure count

Path parameters
FieldTypeDescription
id requiredstringpath
Request body
FieldTypeDescription
enabledboolean | null
eventsarray of string
includeTitlesboolean | null
kindstring | null
langstring | null
namestring | null
originstring | null
rotateSecret requiredboolean
tokenstring | null
topicstring | null
urlstring | null
userKeystring | null
Response 200
FieldTypeDescription
channel requiredobject | null
channel.createdAt requirednumber
channel.disabledReasonstring
channel.enabled requiredboolean
channel.events requiredarray of string
channel.failures requirednumber
channel.id requiredstring
channel.includeTitles requiredboolean
channel.kind requiredstring
channel.lang requiredstring
channel.lastErrorstring
channel.lastOkAt requirednumber | null
channel.name requiredstring
channel.secretSetboolean
channel.tokenSet requiredboolean
channel.topicstring
channel.updatedAt requirednumber
channel.urlstring
channel.userKeySetboolean
secretstring

DELETE /api/v1/notification-channels/{id}

Delete a notification channel · Token or session

204; its secrets and queued messages are removed

Path parameters
FieldTypeDescription
id requiredstringpath

Response 200: OK

GET /api/v1/notification-channels/{id}/deliveries

List notification channel deliveries · Token or session

{deliveries: [{id, event, status, attempts, nextAttemptAt, lastStatusCode, lastError, createdAt, deliveredAt}]}, newest first, at most 50; status is pending, retry, delivered, failed or skipped (rate_limited)

Path parameters
FieldTypeDescription
id requiredstringpath
Response 200
FieldTypeDescription
deliveries requiredarray of object
deliveries[].attempts requirednumber
deliveries[].createdAt requirednumber
deliveries[].deliveredAt requirednumber | null
deliveries[].event requiredstring
deliveries[].id requiredstring
deliveries[].lastErrorstring
deliveries[].lastStatusCode requirednumber | null
deliveries[].nextAttemptAt requirednumber | null
deliveries[].status requiredstring

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

Notification channel test · Token or session

send "Test from OpenTodo" now: {delivered, statusCode?, error?}; at most 12 per account per hour (429 rate_limited)

Path parameters
FieldTypeDescription
id requiredstringpath
Response 200
FieldTypeDescription
delivered requiredboolean
errorstring
statusCodenumber

GET /api/v1/settings/notification-channels

List settings notification channels · Token or session

{enabled}, the setting notifications.channels; on by default; a change is recorded as settings.changed

Response 200
FieldTypeDescription
enabled requiredboolean

PUT /api/v1/settings/notification-channels

Update settings notification channels · Token or session

{enabled}, the setting notifications.channels; on by default; a change is recorded as settings.changed

Only the server's owner.

Request body
FieldTypeDescription
enabled requiredboolean
Response 200
FieldTypeDescription
enabled requiredboolean

This group in the HTTP API guide