1. Registry
  2. Packages
  3. Descope Provider
  4. API Docs
  5. EmailTemplate
Viewing docs for Descope v1.0.1
published on Sunday, Oct 11, 2026 by Descope
descope logo Descope
Viewing docs for Descope v1.0.1
published on Sunday, Oct 11, 2026 by Descope

    Manages a single email message template for an authentication method in a Descope project. The active template is selected on the method’s settings resource, e.g. the emailTemplateId attribute of descope.MagiclinkSettings.

    Create EmailTemplate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EmailTemplate(name: string, args: EmailTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def EmailTemplate(resource_name: str,
                      args: EmailTemplateArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def EmailTemplate(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      method: Optional[str] = None,
                      project_id: Optional[str] = None,
                      subject: Optional[str] = None,
                      html_body: Optional[str] = None,
                      name: Optional[str] = None,
                      plain_text_body: Optional[str] = None,
                      use_plain_text_body: Optional[bool] = None)
    func NewEmailTemplate(ctx *Context, name string, args EmailTemplateArgs, opts ...ResourceOption) (*EmailTemplate, error)
    public EmailTemplate(string name, EmailTemplateArgs args, CustomResourceOptions? opts = null)
    public EmailTemplate(String name, EmailTemplateArgs args)
    public EmailTemplate(String name, EmailTemplateArgs args, CustomResourceOptions options)
    
    type: descope:EmailTemplate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "descope_email_template" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args EmailTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EmailTemplateArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EmailTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EmailTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EmailTemplateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var emailTemplateResource = new Descope.EmailTemplate("emailTemplateResource", new()
    {
        Method = "string",
        ProjectId = "string",
        Subject = "string",
        HtmlBody = "string",
        Name = "string",
        PlainTextBody = "string",
        UsePlainTextBody = false,
    });
    
    example, err := descope.NewEmailTemplate(ctx, "emailTemplateResource", &descope.EmailTemplateArgs{
    	Method:           pulumi.String("string"),
    	ProjectId:        pulumi.String("string"),
    	Subject:          pulumi.String("string"),
    	HtmlBody:         pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	PlainTextBody:    pulumi.String("string"),
    	UsePlainTextBody: pulumi.Bool(false),
    })
    
    resource "descope_email_template" "emailTemplateResource" {
      lifecycle {
        create_before_destroy = true
      }
      method              = "string"
      project_id          = "string"
      subject             = "string"
      html_body           = "string"
      name                = "string"
      plain_text_body     = "string"
      use_plain_text_body = false
    }
    
    var emailTemplateResource = new EmailTemplate("emailTemplateResource", EmailTemplateArgs.builder()
        .method("string")
        .projectId("string")
        .subject("string")
        .htmlBody("string")
        .name("string")
        .plainTextBody("string")
        .usePlainTextBody(false)
        .build());
    
    email_template_resource = descope.EmailTemplate("emailTemplateResource",
        method="string",
        project_id="string",
        subject="string",
        html_body="string",
        name="string",
        plain_text_body="string",
        use_plain_text_body=False)
    
    const emailTemplateResource = new descope.EmailTemplate("emailTemplateResource", {
        method: "string",
        projectId: "string",
        subject: "string",
        htmlBody: "string",
        name: "string",
        plainTextBody: "string",
        usePlainTextBody: false,
    });
    
    type: descope:EmailTemplate
    properties:
        htmlBody: string
        method: string
        name: string
        plainTextBody: string
        projectId: string
        subject: string
        usePlainTextBody: false
    

    EmailTemplate Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The EmailTemplate resource accepts the following input properties:

    Method string
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    ProjectId string
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    Subject string
    The subject line of emails sent with this template.
    HtmlBody string
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    Name string
    A name for the email template that's unique among the templates of the same authentication method.
    PlainTextBody string
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    UsePlainTextBody bool
    Whether emails are sent with the plain text body instead of the HTML body.
    Method string
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    ProjectId string
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    Subject string
    The subject line of emails sent with this template.
    HtmlBody string
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    Name string
    A name for the email template that's unique among the templates of the same authentication method.
    PlainTextBody string
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    UsePlainTextBody bool
    Whether emails are sent with the plain text body instead of the HTML body.
    method string
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    project_id string
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    subject string
    The subject line of emails sent with this template.
    html_body string
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    name string
    A name for the email template that's unique among the templates of the same authentication method.
    plain_text_body string
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    use_plain_text_body bool
    Whether emails are sent with the plain text body instead of the HTML body.
    method String
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    projectId String
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    subject String
    The subject line of emails sent with this template.
    htmlBody String
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    name String
    A name for the email template that's unique among the templates of the same authentication method.
    plainTextBody String
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    usePlainTextBody Boolean
    Whether emails are sent with the plain text body instead of the HTML body.
    method string
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    projectId string
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    subject string
    The subject line of emails sent with this template.
    htmlBody string
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    name string
    A name for the email template that's unique among the templates of the same authentication method.
    plainTextBody string
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    usePlainTextBody boolean
    Whether emails are sent with the plain text body instead of the HTML body.
    method str
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    project_id str
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    subject str
    The subject line of emails sent with this template.
    html_body str
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    name str
    A name for the email template that's unique among the templates of the same authentication method.
    plain_text_body str
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    use_plain_text_body bool
    Whether emails are sent with the plain text body instead of the HTML body.
    method String
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    projectId String
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    subject String
    The subject line of emails sent with this template.
    htmlBody String
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    name String
    A name for the email template that's unique among the templates of the same authentication method.
    plainTextBody String
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    usePlainTextBody Boolean
    Whether emails are sent with the plain text body instead of the HTML body.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EmailTemplate resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing EmailTemplate Resource

    Get an existing EmailTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: EmailTemplateState, opts?: CustomResourceOptions): EmailTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            html_body: Optional[str] = None,
            method: Optional[str] = None,
            name: Optional[str] = None,
            plain_text_body: Optional[str] = None,
            project_id: Optional[str] = None,
            subject: Optional[str] = None,
            use_plain_text_body: Optional[bool] = None) -> EmailTemplate
    func GetEmailTemplate(ctx *Context, name string, id IDInput, state *EmailTemplateState, opts ...ResourceOption) (*EmailTemplate, error)
    public static EmailTemplate Get(string name, Input<string> id, EmailTemplateState? state, CustomResourceOptions? opts = null)
    public static EmailTemplate get(String name, Output<String> id, EmailTemplateState state, CustomResourceOptions options)
    resources:  existingEmailTemplate:    type: descope:EmailTemplate    get:      id: ${id}
    import {
      to = descope_email_template.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    state EmailTemplateState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state EmailTemplateState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    state EmailTemplateState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    state EmailTemplateState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    options CustomResourceOptions
    Bag of options to control resource's behavior.
    The following state arguments are supported:
    HtmlBody string
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    Method string
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    Name string
    A name for the email template that's unique among the templates of the same authentication method.
    PlainTextBody string
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    ProjectId string
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    Subject string
    The subject line of emails sent with this template.
    UsePlainTextBody bool
    Whether emails are sent with the plain text body instead of the HTML body.
    HtmlBody string
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    Method string
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    Name string
    A name for the email template that's unique among the templates of the same authentication method.
    PlainTextBody string
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    ProjectId string
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    Subject string
    The subject line of emails sent with this template.
    UsePlainTextBody bool
    Whether emails are sent with the plain text body instead of the HTML body.
    html_body string
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    method string
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    name string
    A name for the email template that's unique among the templates of the same authentication method.
    plain_text_body string
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    project_id string
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    subject string
    The subject line of emails sent with this template.
    use_plain_text_body bool
    Whether emails are sent with the plain text body instead of the HTML body.
    htmlBody String
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    method String
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    name String
    A name for the email template that's unique among the templates of the same authentication method.
    plainTextBody String
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    projectId String
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    subject String
    The subject line of emails sent with this template.
    usePlainTextBody Boolean
    Whether emails are sent with the plain text body instead of the HTML body.
    htmlBody string
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    method string
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    name string
    A name for the email template that's unique among the templates of the same authentication method.
    plainTextBody string
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    projectId string
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    subject string
    The subject line of emails sent with this template.
    usePlainTextBody boolean
    Whether emails are sent with the plain text body instead of the HTML body.
    html_body str
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    method str
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    name str
    A name for the email template that's unique among the templates of the same authentication method.
    plain_text_body str
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    project_id str
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    subject str
    The subject line of emails sent with this template.
    use_plain_text_body bool
    Whether emails are sent with the plain text body instead of the HTML body.
    htmlBody String
    The HTML body of emails sent with this template. Required unless usePlainTextBody is enabled. Template macros such as {{.code}} can be used to insert dynamic values.
    method String
    The authentication method the email template is used with, e.g. magiclink or otp. Changing this value will require the resource to be deleted and recreated.
    name String
    A name for the email template that's unique among the templates of the same authentication method.
    plainTextBody String
    The plain text body of emails sent with this template. Required when usePlainTextBody is enabled.
    projectId String
    The ID of the project that the email template belongs to. Changing this value will require the resource to be deleted and recreated.
    subject String
    The subject line of emails sent with this template.
    usePlainTextBody Boolean
    Whether emails are sent with the plain text body instead of the HTML body.

    Package Details

    Repository
    descope descope/pulumi-descope
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the descope Terraform Provider.
    descope logo Descope
    Viewing docs for Descope v1.0.1
    published on Sunday, Oct 11, 2026 by Descope

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial