Skip to main content
POST
/
journeys
/
{templateId}
/
templates
/
{notificationId}
/
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.journeys.templates.publish('x', { templateId: 'x' });
{
  "message": "<string>"
}

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

templateId
string
required

Journey id

Minimum string length: 1
notificationId
string
required

Notification template id

Minimum string length: 1

Body

application/json

Request body for publishing a journey-scoped notification template. Pass version to roll back to a prior version; omit to publish the current draft.

version
string
Pattern: ^v\d+$

Response

Published notification template