/v1/mgmt/templateAuthorization
Descope Project ID and Management Key Project ID:Management Key as bearer token.
In: header
Request Body
application/json
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.
Create 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", "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 Scope Claim Mapping POST
Replace the project-wide mapping of OIDC scopes to JWT claims. Each value may be a static string or a {{...}} template resolved at token-generation time.
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.