channels
email
email-templates

Patch email template

Partially updates an existing email template with the provided changes.

patch/email/1/templates/{templateId}

Request

  • Base URL
    https://api.infobip.com (the document declares no server; this is the origin it was published from)
  • Auth
    • OAuth 2
      Client credentials
      Token URL: https://api.infobip.com/auth/1/oauth2/token
    • or API key in header Authorization
    • or API key in header Authorization
    • or HTTP basic

Path parameters

templateIdinteger required

Unique identifier (ID) of the email template.

Request body multipart/form-data

namestring

Name of the email template.

fromstring

Email address with optional sender name.

replyTostring email

Email address to which recipients of the email can reply.

subjectstring

Subject of the email template.

preheaderstring

Preheader of the email template.

htmlstring required

HTML content of the email template.

attachmentsstring

JSON string of attachments to be sent with the email template.

landingPagestring

The identifier of an opt out landing late to be used and displayed when an end user clicks the unsubscribe link. Create a landing page in your Infobip account and use the ID number. For example, 1_23456. If not present, the default opt out landing page is used.

Example request

{
  "name": "Welcome email",
  "from": "Infobip <noreply@example.com>",
  "replyTo": "support@example.com",
  "subject": "Welcome to Infobip",
  "preheader": "Welcome to Infobip",
  "html": "<html><head></head><body><h2>Welcome to Infobip</h2></body></html>",
  "attachments": "[{\"contentType\":\"application/pdf\",\"fileName\":\"attachment.pdf\",\"data\":\"base64encodeddata\"}]",
  "landingPage": "1_2345"
}

Response

OK

idinteger required

Unique identifier of the email template.

namestring

Name of the email template.

fromstring

Email address with optional sender name.

replyTostring

Email address to which recipients of the email can reply.

subjectstring

Subject of the email template.

preheaderstring

Preheader of the email template.

htmlstring required

HTML content of the email template.

isHtmlEditableboolean required

Flag indicating if the HTML content is editable.

landingPageIdstring

Unique identifier of the landing page.

imagePreviewUrlstring

URL of the image preview.

createdAtstring date-time

Date and time when the email template was created. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.

updatedAtstring date-time

Date and time when the email template was last updated. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.

Example response

{
  "id": 1000000000000000000,
  "name": "Welcome email",
  "from": "John Doe <john.doe@example.com",
  "replyTo": "support@example.com",
  "subject": "Welcome to Infobip",
  "preheader": "Welcome to Infobip",
  "html": "<html><head></head><body><h2>Welcome to Infobip</h2></body></html>",
  "isHtmlEditable": true,
  "attachments": [
    {
      "id": "7BE07D39-C7DA-4ED4-9F45-33BDB8643AA1",
      "contentType": "application/pdf",
      "filename": "attachment.pdf",
      "size": 1024,
      "url": "/email/1/templates/1000000000000000001/attachments/7BE07D39-C7DA-4ED4-9F45-33BDB8643AA1/download"
    }
  ],
  "landingPageId": "1_2345",
  "imagePreviewUrl": "/email/1/templates/1000000000000000001/preview.png"
}

Changes

No recorded changes to this operation across all 1 revision of this API.