Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 1.49 KB

templates.md

File metadata and controls

32 lines (27 loc) · 1.49 KB

Templates

This library provides easy access to the Templates Resource.

Methods

  • list()
    List a summary of all templates.
  • get(id[, options])
    Get details about a specified template by its id
    • options.id - the id of the template you want to look up required
    • options.draft - specifies a draft or published template
  • create(template)
    Create a new template
  • update(id, template[, options])
    Update an existing template
    • id - the id of the template you want to update required
    • template - an object of template attributes required
    • options.update_published - If true, directly overwrite the existing published template. If false, create a new draft.
  • delete(id)
    Delete an existing template
    • id - the id of the template you want to delete required
  • preview(id[, options])
    Preview the most recent version of an existing template by id
    • id - the id of the template you want to look up required
    • options.substitution_data - Object of substitution data
    • options.draft - specifies a draft or published template

Examples

Visit our examples section to see all of our template resource examples.