v1

latestOpenAPI 3.1.02026-08-061,5107704.5 MB
Email

EmailTemplates.update

Modifies EmailTemplate or EmailTemplates with given id(s)

patch/entities/EmailTemplates/{id}

Path parameters

idstring uuid required

ID of EmailTemplate to update

Query parameters

validation-levelinteger

Specify validation level of EmailTemplate on update. Use them as bit mask: 0 - validate each field on entity, 2 - validate only changed fields, 4 - validate only system fields, 8 - allows to override readonly fields, 16 - allows to set entity on deleted relationship.

Request body

bodystring

HTML body of the template. May use merge-field placeholders that are filled with record values when the template is composed.

email_template_folder_idstring uuid

Id of the folder.

namestring

Name of the entity and its default text representation.

owner_idstring uuid

Id of the template owner.

recent_colorsobject

List of integers.

share_mode0 | 1 | 2 | 3

Sharing model for the template (e.g. shared with selected sales units, selected users, or open for editing by all).

Integer enum value: 0 - Standard, 1 - Private, 2 - AllView, 3 - AllEdit

sharing_url_is_enabledboolean

When true, the template's public sharing URL is active and accessible. Setting to false invalidates outstanding sharing URLs.

sharing_url_settingsobject

Public sharing-link configuration: resolved URL plus optional personalisation context (entity type, entity id) used to pre-fill merge fields. Empty when no sharing link is configured.

subjectstring

Subject line of emails composed from this template. Supports merge-field placeholders.

type0 | 1 | 2

Template format (e.g. HtmlTemplate, PlainTextTemplate).

Integer enum value: 0 - TextTemplate, 1 - HtmlTemplate, 2 - WysiwygTemplate

revisioninteger

Revision when entity was lastly changed.

Example request

{
  "body": "string",
  "email_template_folder_id": "01234567-abcd-dcba-ffff-000000000000",
  "name": "string",
  "owner_id": "01234567-abcd-dcba-ffff-000000000000",
  "subject": "string",
  "revision": 1
}

Response

Modification confirmation. Returns resulting EmailTemplate

successboolean

True when response succeeded, false on error.

Example response

{
  "success": true,
  "data": {
    "id": "01234567-abcd-dcba-ffff-000000000000",
    "modified": "2019-01-01T00:00:00",
    "created": "2019-01-01T00:00:00",
    "body": "string",
    "email_template_folder_id": "01234567-abcd-dcba-ffff-000000000000",
    "name": "string",
    "owner_id": "01234567-abcd-dcba-ffff-000000000000",
    "subject": "string",
    "revision": 1
  }
}