/v1/mgmt/templateAuthorization
Descope Project ID and Management Key Project ID:Management Key as bearer token.
In: header
Request Body
application/json
1 <= length1 <= length <= 254length <= 2541 <= length <= 254length <= 1048576The fields below apply to email templates only: requests that carry them for other template types are rejected, and responses omit them. Like the fields above they're written as given on updates, so an omitted field is cleared rather than preserved.
length <= 1024length <= 1048576Create a message template for an auth method and delivery channel, using a valid management key. The created template is returned with its server-generated id.
curl -X POST "https://api.descope.com/v1/mgmt/template" \ -H "Content-Type: application/json" \ -d '{ "type": "string", "method": "string", "name": "string" }'{ "type": "string", "method": "string", "id": "string", "name": "string", "body": "string", "subject": "string", "bodyPlainText": "string", "useBodyPlainText": true}/** * A custom message template for an auth method (Terraform: descope_email_template, * descope_text_template, descope_voice_template). Templates are addressed by their * server-generated id within the bucket named by type and method. The subject, bodyPlainText * and useBodyPlainText fields apply to email templates only and are rejected on other types. * The translation configuration is owned by the console and preserved across updates; the * active selection is managed on the auth method settings (e.g. * MagicLinkSettings.emailTemplateId), not here. */export interface Response {type: stringmethod: stringid?: stringname: stringbody?: string/** * The fields below apply to email templates only: requests that carry them for other template * types are rejected, and responses omit them. Like the fields above they're written as given * on updates, so an omitted field is cleared rather than preserved. */subject?: stringbodyPlainText?: stringuseBodyPlainText?: boolean}Set session classification POST
Create or update a session classification (upsert by name), using a valid management key. On a new name the defaults are applied; on an existing one, fields left out keep their stored value.
Delete template DELETE
Delete a single message template by type, method and id, using a valid management key. Deleting the active template resets the auth method's selection to the built-in System template.