View as Markdown

SDK reference · Node SDK

prov.account.setNotifyTemplate

prov.account.setNotifyTemplate in Node SDK. Set (or clear with null) the per-account SMS template.

Signature

prov.account.setNotifyTemplate(template: string | null): Promise<NotifyTemplates>

Parameters

templatestring | nullRequired

Request fields

templatestring | null
Your team's template, with {{action}} and {{link}} slots; null resets it.
approver_sms_templatestring | null
Approval texts to approvers outside your account, with {{requester}}, {{action}} and {{link}} slots; null resets it.
invite_sms_templatestring | null
Approver invite texts, with {{requester}} and {{link}} slots; null resets it.
approver_email_subjectstring | null
The approval email's subject: up to 120 characters with {{requester}}; {{action}}, {{amount}} and {{expires}} are optional.
approver_email_bodystring | null
The approval email's intro: plain text, up to 600 characters, no link.
invite_email_subjectstring | null
The invite email's subject: up to 120 characters with {{requester}}.
invite_email_bodystring | null
The invite email's intro: plain text, up to 600 characters, no link.
capture_sms_templatestring | null
The capture-link text: up to 320 characters with {{requester}} and {{link}}; {{what}} and {{expires}} are optional. Pro and up.
capture_email_subjectstring | null
The capture email's subject: up to 120 characters with {{requester}}; {{what}} and {{expires}} are optional.
capture_email_bodystring | null
The capture email's intro: plain text, up to 600 characters, no link.

Returns

Promise<NotifyTemplates> The templates in effect (null means the default).

HTTP operation

PUT /v1/account/notify_template: Set the message templates

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/notify_template`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "template": "Approve your agent's request: {{action}} {{link}}",
    "approver_sms_template": "{{requester}}'s agent needs your OK to {{action}}: {{link}}",
    "approver_email_subject": "{{requester}} needs your approval for {{amount}}"
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.