Get a list of Card Templates
A template is basically a card that's used as a starting point for creating a new card. The way these are used in our application is to show a menu of your templates and when you pick one, we pre-seed the editor with the template's content. Saving a new card using a template is just the same API call to create a card as you'd normally use.
GET https://api.getguru.com/api/v1/templates/cards
This will return up to 25 card templates. The results are paginated so if you have more than 25 templates you'll need to make multiple API calls to load all of them.
You may also provide a search string as a query parameter, like this to search for "incident report":
https://api.getguru.com/api/v1/templates/cards?search=incident%20report
The response is a list of objects where each looks like this:
{
"templateTitle": "Actionable Public Card Template",
"description": "Use when creating actionable public cards for marketing",
"cardTitle": "Template: [TITLE]",
"content": "<p>html here...</p>",
"lastModified": "2020-08-03T15:34:22.911+0000",
"id": "a17fbe09-099d-4813-b6d7-5335b6243faa",
"tags": [ ... ],
"collection": { ... },
"dateCreated": "2020-05-13T17:45:10.194+0000",
"createdBy": { ... },
"verificationInterval": 365,
"lastModifiedBy": { ... },
"shareStatus": "TEAM",
"boards": [ ... ],
"cardVerifier": { ... }
}
The important fields here are:
templateTitle
is what we show in our UI as the name of the template when you're picking a template from a list.description
is also shown in our UI when selecting a template.cardTitle
is the default title for the card when you select a template to use.content
is the HTML content of the template.
Loading a single template
If you know a template's ID (e.g. a17fbe09-099d-4813-b6d7-5335b6243faa
) you can load just that one template by making this API call:
GET https://api.getguru.com/api/v1/templates/cards/{id}