List all templates
GET {{baseUrl}}/templates
Returns a list of your templates. The templates are returned sorted by creation date, with the most recently created templates appearing first.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
limit | number | (optiona) How many results to return. | |
after | string | (optiona) A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the previous_url field in the return response. | |
before | string | (optiona) A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the next_url field in the return response. | |
date_created | string | (optiona) Filter by ISO-8601 date or datetime, e.g. { gt: '2012-01-01', lt: '2012-01-31T12:34:56Z' } where gt is ›, lt is ‹, gte is ≥, and lte is ≤. | |
include[] | string | (optiona) Request that the response include the total count by specifying include[]=total_count. | |
metadata | string | (optiona) Filter by metadata key-value pair, e.g. metadata[customer_id]=987654. |
RESPONSES
status: OK
{"data":[{"id":"tmpl_d5a5a89da9106f8","description":"Test Template","versions":[{"id":"vrsn_232a02fb8224791","description":"Test Template","html":"HTML for ","date_created":"2019-07-27T23:49:01.512Z","date_modified":"2019-07-27T23:49:01.512Z","object":"version"}],"published_version":{"id":"vrsn_232a02fb8224791","description":"Test Template","html":"HTML for ","date_created":"2019-07-27T23:49:01.512Z","date_modified":"2019-07-27T23:49:01.512Z","object":"version"},"metadata":{},"date_created":"2019-07-27T23:49:01.511Z","date_modified":"2019-07-27T23:49:01.511Z","object":"template"},{"id":"tmpl_59b2150ae120887","description":"Test Template","versions":[{"id":"vrsn_2a7eb63ccb795b9","description":"Test Template","html":"HTML for ","date_created":"2019-03-29T10:22:34.643Z","date_modified":"2019-03-29T10:22:34.643Z","object":"version"}],"published_version":{"id":"vrsn_2a7eb63ccb795b9","description":"Test Template","html":"HTML for ","date_created":"2019-03-29T10:22:34.643Z","date_modified":"2019-03-29T10:22:34.643Z","object":"version"},"metadata":{},"date_created":"2019-03-29T10:22:34.642Z","date_modified":"2019-03-29T10:22:34.642Z","object":"template"}],"object":"list","next_url":"https://api.lob.com/v1/templates?limit=2\u0026after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wMy0yOVQxMDoyMjozNC42NDJaIiwiaWRPZmZzZXQiOiJ0bXBsXzU5YjIxNTBhZTEyMDg4NyJ9","count":2}