include API

Includes are reusable pieces of content (e.g. header or footer) that you can use throughout your templates and email campaigns. The most common use of an include is to create a standard header or footer. The include API allows you to get, create/update, or delete an include.

API Base URL
include https://api.sailthru.com/include
Description

GET MODE
Type Parameter Description Example
Optional Blank If your provide no parameters, all names return Example
Optional include If a name is provided, only returns that users with that unique indentifier Example
Return Blank If your provide no parameters, all names return Example
Return name An include’s unique identifier/name Example
Return content_html The HTML within an include
Return content_text The rendered text within an include

POST MODE
Type Parameter Description Example
Required include Adds an includeTIP:

  • The value listed here becomes the name of the include
Example
Optional content_html The HTML within an include Example
Optional content_text The rendered text within an include Example

Parameter Examples

GET MODE
Type Parameter
Optional Blank
Example
{}

The above code is not an error. If your provide no parameters, all names return.


GET MODE
Type Parameter
Optional include
Example
{
    "include":"Example"
}

GET MODE
Type Parameter
Return Blank
Example
[
    {
        "name":"Include1"
    },
    {
        "name":"Include2"
    },
    {
        "name":"Include3"
    }
]

GET MODE
Type Parameter
Return N/A
Example
{
    "name":"Example",
    "content_html":"<strong>content</strong>",
    "content_text":"555 Main St New York, NY 10013"
}

POST MODE
Type Parameter
Required include
Example
{
    "include":"Example"
}

POST MODE
Type Parameter
Optional content_html
Example
{
    "include":"Example",
    "content_html":"<strong>content</strong>"
}

POST MODE
Type Parameter
Optional content_text
Example
{
    "name":"Example",
    "content_html":"<strong>content</strong>",
    "content_text":"555 Main St New York, NY 10013"
}
Top