Email Templates

Purpose

To fetch the email templates in a module.

Request Details

Request URL

All - {api-domain}/crm/{version}/settings/email_templates
Specific - {api-domain}/crm/{version}/settings/email_templates/{id}

Header

Authorization: Zoho-oauthtoken <access_token>

Scope

scope=ZohoCRM.templates.email.READ

Parameters
  • modulestring

    The API name of the module you want to fetch email template from. Supported modules are:
    Leads, Accounts, Contacts, Deals, Tasks, Events, Calls, Products, Price Books, Quotes, Sales Orders, Purchase Orders, Invoices, Campaigns, Vendors, Cases, Solutions, and Custom.

Note
  • The content key contains the HTML of the email template and is rendered in the response only when you fetch a specific email template.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v3/settings/email_templates"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Response JSON Keys

  • created_timestring

    Represents the date and time at which the email template was created.

  • attachmentsJSON array

    Represents the attachments added in the template.

  • subjectstring

    Represents the subject of the email template.

  • moduleJSON object

    Represents the module with which the template is associated with.

  • created_byJSON object

    Represents the name and ID of the user who created the email template.

  • layoutJSON object

    Represents the layout the template is associated with.

  • modified_timestring

    Represents the date and time at which the email template was last modified.

  • folderJSON object

    Represents the name and unique ID of the template folder.

  • last_usage_timestring

    Represents the date and time at which the email template was last used.

  • associatedboolean

    Represents whether the template is associated or not.

  • namestring

    Represents the name of the email template.

  • consent_linkedboolean

    Represents whether the consent form is linked with the template.

  • modified_byJSON object

    Represents the name and ID of the user who last modified the email template.

  • idstring

    Represents the unique ID of the email template.

  • editor_modestring

    Represents the mode in which the email template is created. The possible values are gallery: the template is chosen from the template gallery and is customized, rich_text: a pre-designed custom template, plain_text: the template is built from scratch.

  • categorystring

    Represents the type of the template. The possible values are custom_templates: the templates created by a user, system_templates: the templates present in the system by default, plugin_templates: the templates that are created and installed from the Zoho CRM extension, marketplace_templates: the templates that are created and installed from the published plugins.

  • favoriteboolean

    Represents if the email template is marked as favorite.

Possible Errors

  • BAD_REQUESTHTTP 400

    The request method specified is invalid.
    Resolution: Specify the request method as GET.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    The token does not have the scope ZohoCRM.templates.email.READ.
    Resolution: Create a token with the scope ZohoCRM.templates.email.READ.

  • NO_PERMISSIONHTTP 403

    You do not have the permission to read the email templates.
    Resolution: Contact your administrator.

  • INVALID_URL_PATTERNHTTP 404

    The request URL has syntactical errors.
    Resolution: Correct the syntactical errors in the request URL.

Sample Response

Copied{
    "email_templates": [
        {
            "created_time": "2022-03-23T18:52:17+05:30",
            "attachments": null,
            "subject": "Holidays",
            "module": {
                "api_name": "Leads",
                "id": "4876876000000002175"
            },
            "created_by": {
                "name": "Patricia Boyle",
                "id": "4876876000000327001"
            },
            "layout": {
                "id": ""
            },
            "modified_time": "2022-03-23T18:52:17+05:30",
            "folder": {
                "name": "Holidays",
                "id": "4876876000000888001"
            },
            "last_usage_time": null,
            "associated": false,
            "name": "HappyHolidays",
            "consent_linked": false,
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "4876876000000327001"
            },
            "id": "4876876000000888006",
            "editor_mode": "gallery",
            "category": "normal",
            "favorite": false
        },
        {
            "created_time": "2021-08-09T09:52:11+05:30",
            "attachments": null,
            "subject": "Big Deal Alert",
            "module": {
                "api_name": "Deals",
                "id": "4876876000000002181"
            },
            "created_by": {
                "name": "Patricia Boyle",
                "id": "4876876000000327001"
            },
            "layout": {
                "id": ""
            },
            "modified_time": "2021-08-09T09:52:11+05:30",
            "folder": {
                "name": "Public Email Templates",
                "id": "4876876000000000077"
            },
            "last_usage_time": null,
            "associated": true,
            "name": "Big Deal Alert",
            "consent_linked": false,
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "4876876000000327001"
            },
            "id": "4876876000000000079",
            "editor_mode": "gallery",
            "category": "system_templates",
            "favorite": false
        }
    ],
    "info": {
        "per_page": 200,
        "count": 2,
        "page": 1,
        "more_records": false
    }
}