Update email template

Updates an email template subject, body, sender address, and language, for a specified instance of Cloud Identity Service.

Request

POST /GmaApi/ss/updateEmailTemplate

Example cURL request

curl -v -i -X POST -H "Authorization: Bearer 73d2039d-7767-495f-b40c-f766fcf8f0e2" -H "Accept: application/json,application/xml,text/html,application/atom+xml,text/xhtml" -d {"instanceId":"3", "updatedData":[{"emailTypeID":"10","languages": [{"body":"<html>$firstName $lastName:<br/><br/>Your membership in the service $serviceName has been revoked.<br/><br/>Thank you,<br/>$clientWebPresenceName</html>", "langCode":"en-us","replyTo":"noreply@YourCompany.com","subject": "Reminder: One of your employees has pending approval records test change"}]}]} http://hostname/GmaApi/ss/updateEmailTemplate

Resource URI

https://hostname/GmaApi/ss/updateEmailTemplate

Authorization header

For information about obtaining an access token, see Request an access token.

Content type

application/json
A JSON representation of an array of email templates with one or more of the following parameters.
{  
  "instanceId":"",
  "updatedData":[  
    {  
      "emailTypeID":"",
      "languages":[  
        {  
          "body":"",
          "langCode":"",
          "replyTo":"",
          "subject":""
        }
      ]
    }
  ]
}

Request parameters

Table 1. Request body parameters
Parameter Type Required Description
instanceId String Yes ID of the instance to update.
updatedData Array Yes An array of email template objects to specify one or more email templates to update.
emailTypeID String Yes The email template ID.
languages Array Yes An array of objects. Each object contains parameter and parameter values for the specified email template. Use langCode to specify different translations for the same emailTypeID.
{  
 "instanceId":"",
 "updatedData":[  
   {  
    "emailTypeID":"1",
    "languages":[  
      {  
      "body":"<html>Approval needed</html>",
      "langCode":"en-us",
      "replyTo":"",
      "subject":"Awaiting approval"
      },
      {  
      "body":"<html>Approbation nécessaire</html>",
      "langCode":"fr",
      "replyTo":"",
      "subject":"En attente d’approbation"
      }
     ]
   }
 ]
}
body String Yes Email body that is specified in valid HTML.
langCode String Yes The locale language code for the template, for example en-us.
replyTo String Yes The email address of the sender.
subject String Yes The subject line of the email. A description of the subject of the email.

Example response

{"status":{"success":true,"apiError":false,"message":"Success","errors":{}}}

Response parameters

Table 2. Response parameters
Parameter name Description
status Returns whether the request was successful. Returns an error when the request is unsuccessful. For more information about errors, see Errors.