Skip to main content

Modify the named template

Sets the named message template for your organization. If a template already exists it will be overwritten and cannot be retrieved.

The following templates are available for customization:

  • email_authn_challenge: E-mail template with magic link;
  • text_authn_challenge: SMS template with magic link;
  • text_otp_message: SMS template with OTP code;
  • email_password_reset_challenge: E-mail template with a password reset link;
  • text_password_reset_challenge: SMS template with a password reset link.

All templates must conform to the mustache template syntax. The following tags are available:

  • {{attestation_url}}: Magic link URL (Required on email_authn_challenge and text_authn_challenge)
  • {{password_reset_url}}: Password reset URL (required on email_password_reset_challenge and text_password_reset_challenge)
  • {{otp_code}}: OTP code (Required on text_otp_message)
  • {{org_name}}: Organization name (Optional)
  • {{new_user}}: true for new signups, false for returning users (Optional)

Constraints:

  • Email templates:
    • Sender name must be at most 128B in size
    • Subject must be at most 128B in size
    • Body must be HTML and at most 50KB in size.
  • SMS:
    • Body must be at most 140 bytes in size.
Path Parameters
  • template_name string required

    Possible values: [email_authn_challenge, email_otp_message, text_authn_challenge, text_otp_message, email_password_reset, email_password_change_notify, text_password_reset, text_password_change_notify]

    Name of the template to retrieve or modify

Header Parameters
  • SlashID-OrgID string required

    The organization ID

    Example: af5fbd30-7ce7-4548-8b30-4cd59cb2aba1
  • SlashID-Required-Consistency string

    Possible values: [local_region, all_regions]

    Default value: local_region

    The consistency level required for this request. If the consistency level is not achieved within the timeout, the request will fail with a 408 Request Timeout error. 408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout. Allowed values: * local_region: Wait while the request executes in the local region. * all_regions: Wait while the request executes across all regions. You can learn more about our replication model on our Cross-region Replication Model page.

  • SlashID-Required-Consistency-Timeout integer

    Possible values: >= 1 and <= 120

    Default value: 30

    The maximum amount of seconds to wait for the requested consistency level to be achieved. If the consistency level is not achieved within this time, the request will fail with a 408 Request Timeout error. 408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout. You can learn more about our replication model on our Cross-region Replication Model page.

Request Body

The new content of the named template

  • sender_name string

    Sender name (not address). Must be empty for SMS templates.

  • subject string

    E-mail subject. Must be empty for SMS templates.

  • body string

    Message body. Must be HTML for e-mail templates and plain text for SMS

Responses

No content