include

Welcome to our updated API documentation! (Details here.)
We invite you to rate this page at the bottom or send feedback to docs@sailthru.com.

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. You can store content by any custom include name, and each include can contain html and/or plain text versions of content.

To get started, use the API Client Library for your preferred language, or learn how to make Sailthru API calls with curl on the API Technical Details page. When using either method, or the API Test tool, you can use this page as a reference for building calls and interpreting responses.


Endpoint URL: https://api.sailthru.com/include


GET Mode

Examples

Get Include by Name

Example Call

{
    "include" : "global_footer"
}

Example Response

{
    "name" : "global_footer",
    "content_html" : "<img src="https://example.com/vvlogo.png"><p>We thank you for your business.</p>",
    "content_text" : "VARICK & VANDAM | We thank you for your business."
}

Get All Include Names

Example Call

{}

Example Response

{
    "includes" : [
        {
            "name" : "global_header"
        },
        {
            "name" : "global_footer"
        }
        {
            "name" : "company_address"
        }
    ]
}
Type Parameter Description
Optional Blank If your provide no parameters, all names return
Optional include If a name is provided, only returns that users with that unique indentifier
Return Blank If your provide no parameters, all names return
Return name An include’s unique identifier/name
Return content_html The HTML within an include
Return content_text The rendered text within an include

POST Mode

Examples

Create Include with html and text versions of content

Example Call

{
    "include" : "global_footer",
    "content_html" : "<img src="https://example.com/vvlogo.png"><p>We thank you for your business.</p>",
    "content_text" : "VARICK & VANDAM | We thank you for your business."
}
Type Parameter Description
Required include Becomes the name of the include and is used for additional updates to the include.
Optional content_html The HTML within an include
Optional content_text The rendered text within an include
Top