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');

Documentation Index

Fetch the complete documentation index at: https://www.courier.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

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).

Body

application/json

Optional request body for publishing a notification template. Omit or send an empty object to publish the current draft.

version
string

Historical version to publish (e.g. "v001"). Omit to publish the current draft.

Pattern: ^v\d+$

Response

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