List templates with cursor pagination
GET
/v1/templates
const url = 'https://your-notavia-host/v1/templates?limit=20';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://your-notavia-host/v1/templates?limit=20' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” limit
integer
cursor
string
Responses
Section titled “ Responses ”Paginated list of templates.
Media type application/json
object
data
Array<object>
object
id
string format: uuid
key
string
name
string
subject_template
Populated from the Email channel body for backwards compatibility.
string
html_body_template
Populated from the Email channel body for backwards compatibility.
string
text_body_template
Populated from the Email/SMS channel body for backwards compatibility.
string
created_at
string format: date-time
updated_at
string format: date-time
bodies
Per-channel body variants. Replaces the legacy flat fields for new integrations.
Array<object>
Per-channel body variant for a template. The channel-specific fields that apply depend on the channel:
- Email:
subject_template+html_template(+ optionaltext_template) - InApp:
html_template(ortext_templatefor plain-text in-app) - SMS:
text_template - Slack:
structured_template(Block Kit JSON as Liquid template) - Teams:
structured_template(Adaptive Card v1.5 JSON as Liquid template) - Discord:
text_template(content) and/orstructured_template(embed JSON)
object
channel
Notification channel identifier.
string
subject_template
string
text_template
string
html_template
string
structured_template
string
body_channels
Kebab-case list of channels for which a body variant exists.
Array<string>
next_cursor
string
Example
{ "data": [ { "bodies": [ { "channel": "email" } ], "body_channels": [ "email" ] } ]}Missing or invalid credentials.
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}Credentials do not have the required scope.
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}