Update an email template

Update an email template

put
Path parameters
idstringRequired

The id of the email template.

Header parameters
Brand-URLstringRequired

The brand URL of the request. This is used to identify the brand.

Example: YOUR_BRAND_URL
Auth-KeystringRequired

This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.

Example: YOUR_AUTH_KEY
Body

This class represents the data transfer object for the email template with command request.

eventIdstring · min: 1Required

The id of the event.

countryCodestring | nullableOptional

The country code of the email. This value is used to determine the country of the email. Following the ISO 3166-1 alpha-2 standard. For example, "US" for United States, "FR" for France, etc.

languageCodestring · min: 1Required

The language code of the email. This value is used to determine the language of the email. Following the ISO 639-1 standard. For example, "en" for English, "fr" for French, etc.

subjectstring · min: 1Required

The subject of the email.

bodystring · min: 1Required

The body of the email. If the email is in HTML format, the body should be in HTML format. The body can contain placeholders. Please refer to the placeholder-keys API to get the list of placeholders. And replace the placeholders with the actual values.

tagsstring | nullableOptional

The tags of the email.

Responses
201
The request was successful.
application/json
put
PUT /api/v1/email-templates/{id} HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 106

{
  "eventId": "text",
  "countryCode": "text",
  "languageCode": "text",
  "subject": "text",
  "body": "text",
  "tags": "text"
}
{
  "success": true,
  "statusCode": 200,
  "message": "The request was successful.",
  "data": {
    "id": "sApKpllz4sAplsmzha",
    "countryCode": "US",
    "languageCode": "en",
    "subject": "Welcome to Our Service!",
    "body": "Dear {{user.email_address}}, welcome to our platform. We are excited to have you on board!",
    "tags": "#Welcome",
    "event": {
      "id": "sApKpllz4sAplsmzha",
      "guid": "00000000-0000-0000-0000-000000000000",
      "groupCodeName": "Example",
      "code": "CODE",
      "name": "Name",
      "description": "Description",
      "trackingLevel": 1,
      "tags": "Tags",
      "zOrder": 1,
      "status": "Active",
      "isSystem": false
    }
  },
  "errors": []
}

Last updated

Was this helpful?