Skip to main content
POST
/
notifications
/
{id}
/
publish
JavaScript
import Courier from '@trycourier/courier';

const client = new Courier({
  apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});

await client.notifications.publish('id');
{
  "type": "invalid_request_error",
  "message": "Notification template nt_nonexistent not found"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Template ID (nt_ prefix).

Response

Successfully published, or already published with no changes (idempotent).