Skip to main content
Version: v5.0

Template

The Template API allows you to list, create, update, search by ID, and delete notification templates.

Refer to the Template API calls below:

List templates#

Endpoints#

GET notificationsvc/api/v1/template

Request#

Request body#

ParameterTypeDescriptionRequired
_nsFilterStringEvent filter to applyOptional
_countIntegerNumber of templates. Default is 10.Required
_offsetIntegerPosition in list of templates to begin listingRequired
_localeStringTemplate areaOptional
_nameStringName of subscriptionRequired
_namespaceStringProject namespaceOptional
Request body example#

None

Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response#

{  _offset?: integer  _pageSize?: integer  _total?: integer  _list: {    _id?: string    _namespaces?: string[]    _createdAt?: string    _updatedAt?: string    _version?: integer    _name: string    _description?: string    _locale: string    _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK]    _format: enum[VELOCITY]    _email: {      _subject?: string      _body?: string    }  }[]}

Create template#

Endpoints#

POST notificationsvc/api/v1/template

Request#

Request body#

ParameterTypeDescriptionRequired
_nsFilterStringEvent filter to applyOptional

Request body example#

{  _description?: string  _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK]  _format: enum[VELOCITY]  _email: {    _subject?: string    _body?: string  }  _namespaces?: string[]  _name: string  _locale: string}

Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response#

{  _id?: string  _namespaces?: string[]  _createdAt?: string  _updatedAt?: string  _version?: integer  _name: string  _description?: string  _locale: string  _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK]  _format: enum[VELOCITY]  _email: {    _subject?: string    _body?: string  }}

Get template by ID#

Endpoints#

GET notificationsvc/api/v1/template/{id}

Request#

Request body#

ParameterTypeDescriptionRequired
_nsFilterStringEvent filter to applyOptional
Request body example#

None

Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response#

{  _id?: string  _namespaces?: string[]  _createdAt?: string  _updatedAt?: string  _version?: integer  _name: string  _description?: string  _locale: string  _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK]  _format: enum[VELOCITY]  _email: {    _subject?: string    _body?: string  }}

Update template by ID#

Endpoints#

PUT notificationsvc/api/v1/template/{id}

Request#

Request body#

ParameterTypeDescriptionRequired
_nsFilterStringEvent filter to applyOptional
_versionIntegerVersion of groupOptional

Request body example#

{  _description?: string  _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK]  _format: enum[VELOCITY]  _email: {    _subject?: string    _body?: string  }}

Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response#

{  _id?: string  _namespaces?: string[]  _createdAt?: string  _updatedAt?: string  _version?: integer  _name: string  _description?: string  _locale: string  _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK]  _format: enum[VELOCITY]  _email: {    _subject?: string    _body?: string  }}

Delete template by ID#

Endpoints#

DELETE notificationsvc/api/v1/template/{id}

Request#

Request body#

ParameterTypeDescriptionRequired
_nsFilterStringEvent filter to applyOptional
_versionStringVersion to apply
Request body example#


Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response#