• Register

Email Templates

Resource URI

/emailTemplateSets/{emailTemplateSetId}/emailTemplates/{emailTemplateId}

Items in curly braces represent variables.

Description

Email Templates contain the actual configuration for different types of developer notifications.

Resource Schema

Property Characteristics
id Type string
Sub-type
Create Rule Ignored
Update Rule Required (if not in context)
Fetch Rule Implicit
Description Object identifier.
created Type string
Sub-type datetime
Create Rule Ignored
Update Rule Ignored
Fetch Rule Implicit
Description Date/time the object was created.
updated Type string
Sub-type datetime
Create Rule Ignored
Update Rule Ignored
Fetch Rule Implicit
Description Date/time the object was updated.
from Type string
Sub-type
Create Rule Required
Update Rule Optional
Fetch Rule Implicit
Description Sender of the email.
subject Type string
Sub-type
Create Rule Optional
Update Rule Optional
Fetch Rule Implicit
Description Subject of the email.
body Type string
Sub-type
Create Rule Optional
Update Rule Optional
Fetch Rule Implicit
Description Body of the email.
type Type string
Sub-type
Create Rule Optional
Update Rule Optional
Fetch Rule Implicit
Description Type of email.

fetch all [GET]

Retrieves collection of Email Templates belonging to the given Email Template Set.

Parameters

Parameter Required Type Description
emailTemplateSetId true string Email Template Set identifier.
fields false string Comma-separated list of property paths to include in response. Each property path is a dot-separated list of object property names. fields=<property\[.property...\]>\[,...\]\[&fields=...\]
filter false string Colon-separated name/value pair specifying the name of property whose value must contain the given value (as a substring). Results may also be filtered by nested collections' properties by specifying a dot-separated property path. filter=<property\[.property...\]>:<value>\[&filter=...\]
sort false string Comma-separated list of properties to sort by. Only root-level properties are supported. Each property name may be optionally followed by :asc or :desc to specify sort direction (defaults to asc). sort=<property\[:(asc\|desc)\]>\[,...\]\[&sort=...\]
limit false int Number of objects to return in the result. Defaults to 100.
offset false int 0-based index of first object in the list to return. Defaults to 0.

Returns

Success

Array of Email Templates for the Email Template Sets If fields request parameter is not included, only those fields with "Fetch Rule" equal to "Implicit" will be returned. Otherwise, the fields contained in the URL parameter will be included in the response.

Failure

Array of validation responses

Examples

Request

curl -k 'https://api.mashery.com/v3/rest/emailTemplateSets/{emailTemplateSetId}/emailTemplates' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "id": "6c969358-3856-457f-80de-71bdfa4f2b36",
        "body": "penatibus",
        "created": "2014-02-04T11:51:20.000+0000",
        "updated": "2013-09-15T08:37:41.000+0000",
        "subject": "pulvinar",
        "from": "morbi sem mauris",
        "type": "cursus vestibulum proin"
    }
]

Request

curl -k 'https://api.mashery.com/v3/rest/emailTemplateSets/{emailTemplateSetId}/emailTemplates' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "id": "a00c417f-4db7-403b-9b2d-987a172293f0",
        "body": "suspendisse",
        "created": "2013-09-15T23:50:40.000+0000",
        "updated": "2013-11-29T23:53:01.000+0000",
        "subject": "ultrices posuere cubilia curae",
        "from": "commodo",
        "type": "et ultrices posuere"
    }
]

fetch [GET]

Retrieves the Plan, returning a Plan

Parameters

Parameter Required Type Description
emailTemplateSetId true string Email Template Set identifier.
emailTemplateId true string Email Template identifier.
fields false string Comma-separated list of property paths to include in response. Each property path is a dot-separated list of object property names. fields=<property\[.property...\]>\[,...\]\[&fields=...\]
filter false string Colon-separated name/value pair specifying the name of property whose value must contain the given value (as a substring). Results may also be filtered by nested collections' properties by specifying a dot-separated property path. filter=<property\[.property...\]>:<value>\[&filter=...\]
sort false string Comma-separated list of properties to sort by. Only root-level properties are supported. Each property name may be optionally followed by :asc or :desc to specify sort direction (defaults to asc). sort=<property\[:(asc\|desc)\]>\[,...\]\[&sort=...\]
limit false int Number of objects to return in the result. Defaults to 100.
offset false int 0-based index of first object in the list to return. Defaults to 0.
indent false boolean When set to true, responses are indented for better readability.

Returns

Success

Email Template as identified If fields request parameter is not included, only those fields with "Fetch Rule" equal to "Implicit" will be returned. Otherwise, the fields contained in the URL parameter will be included in the response.

Failure

Array of validation responses

Examples

Request

curl -k 'https://api.mashery.com/v3/rest/emailTemplateSets/{emailTemplateSetId}/emailTemplates/{emailTemplateId}' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "id": "997d4535-771c-4b24-b2c5-8a8d51b4f651",
        "body": "vestibulum proin",
        "created": "2013-12-11T04:06:56.000+0000",
        "updated": "2013-10-24T08:54:25.000+0000",
        "subject": "sit",
        "from": "proin",
        "type": "at dolor quis"
    }
]

Request

curl -k 'https://api.mashery.com/v3/rest/emailTemplateSets/{emailTemplateSetId}/emailTemplates/{emailTemplateId}' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "id": "fd2290d5-db07-4e80-a7fa-e0f33fa068c5",
        "body": "sed",
        "created": "2014-01-08T14:03:49.000+0000",
        "updated": "2014-03-03T22:58:34.000+0000",
        "subject": "pede ac",
        "from": "sapien",
        "type": "sodales"
    }
]

Docs Navigation