List Task Templates
GET
/api/v1/task-templatesAuthorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredResponses
200Successful Response
successbooleandefault: true
dataTaskTemplate[] | anyShow propertiesHide properties
Any of:
TaskTemplate[]
Array of
TaskTemplateidstringschema_versionintegerdefault: 1
task_typeTaskTyperequiredAllowed:
NEWVARLOCWHTNEWDESVARDESDESCLNVARAIADPTRSZlabelstringrequiredsort_orderintegerdefault: 0
defaultsTaskTemplateDefaultsThe fields a template pre-fills on the create form, as a partial `TaskCreate`.
Every field is optional and `None` means "the template does not set this" — the form leaves it
for the person to fill in, as LOC's Geo/Language and WHT's Source were left blank when these
templates were hardcoded in the frontend.
Deliberately a narrow allowlist rather than all of `TaskCreate`. A template is the shape of a
kind of work, so it carries taxonomy and creative parameters; what belongs to one particular
task — its origin creative, deadline, name, product, graph — must not be saved into the
template by whoever happened to have it on screen. `task_type` is absent for a different
reason: it is the template's own identity, so repeating it here could contradict it.
Show propertiesHide properties
work_streamWorkStream | anyShow propertiesHide properties
Any of:
WorkStream
stringany
anymedia_typeMediaType | anyShow propertiesHide properties
Any of:
MediaType
stringany
anyresolutionResolution | anyShow propertiesHide properties
Any of:
Resolution
stringany
anysourceSource | anyShow propertiesHide properties
Any of:
Source
stringany
anygeoGeo | anyShow propertiesHide properties
Any of:
Geo
stringany
anylanguageLanguage | anyShow propertiesHide properties
Any of:
Language
stringany
anycountinteger | anyShow propertiesHide properties
Any of:
integer
integerany
anycreation_complexityinteger | anyShow propertiesHide properties
Any of:
integer
integerany
anyexecution_complexityinteger | anyShow propertiesHide properties
Any of:
integer
integerany
anypriorityinteger | anyShow propertiesHide properties
Any of:
integer
integerany
anyvaried_elementsVariedElement[] | anyShow propertiesHide properties
Any of:
VariedElement[]
Array of
VariedElementstringany
anydescriptionstring | anyShow propertiesHide properties
Any of:
string
stringany
anyownerTaskTemplatePersonHow a template fills Task Owner or Assignee. See `TemplatePersonMode`.
Show propertiesHide properties
modeTemplatePersonModeHow a task template fills one of the two people fields when a task is created from it.
`CREATOR` is why this is a mode rather than a stored id: "whoever creates the task" cannot be
written down as a user, and a sentinel id in the field would be handed to the people picker —
and, unresolved, to the API — as if it were one.
Allowed:
unsetcreatoruseruser_idstring | anyShow propertiesHide properties
Any of:
string
stringany
anyassigneeTaskTemplatePersonHow a template fills Task Owner or Assignee. See `TemplatePersonMode`.
Show propertiesHide properties
modeTemplatePersonModeHow a task template fills one of the two people fields when a task is created from it.
`CREATOR` is why this is a mode rather than a stored id: "whoever creates the task" cannot be
written down as a user, and a sentinel id in the field would be handed to the people picker —
and, unresolved, to the API — as if it were one.
Allowed:
unsetcreatoruseruser_idstring | anyShow propertiesHide properties
Any of:
string
stringany
anyvariantsTaskVariant[]Show propertiesHide properties
Array of
TaskVariantkeystringrequiredvariation_numintegerrequiredmin 1
primary_anchorPrimaryAnchor | anyShow propertiesHide properties
Any of:
PrimaryAnchor
stringany
anyaudiencestring | anyShow propertiesHide properties
Any of:
string
stringany
anyawareness_stageAwarenessStage | anyShow propertiesHide properties
Any of:
AwarenessStage
stringany
anymessaging_angleMessagingAngle | anyShow propertiesHide properties
Any of:
MessagingAngle
stringany
anyhook_triggerHookTrigger | anyShow propertiesHide properties
Any of:
HookTrigger
stringany
anyhook_typeHookType | anyShow propertiesHide properties
Any of:
HookType
stringany
anyad_formatAdFormat | anyShow propertiesHide properties
Any of:
AdFormat
stringany
anynotesstring | anyShow propertiesHide properties
Any of:
string
stringany
anytag_slugsstring[]descriptionstring | anyShow propertiesHide properties
Any of:
string
stringany
anycompletedbooleandefault: false
created_atstring<date-time>updated_atstring<date-time>deleted_atstring<date-time> | anyShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
anyupdated_bystring | anyShow propertiesHide properties
Any of:
string
stringany
anyany
anymessagestring | anyShow propertiesHide properties
Any of:
string
stringany
anyerrorsstring[] | anyShow propertiesHide properties
Any of:
string[]
Array of
stringstringany
anyRequest
curl -X GET "/api/v1/task-templates" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("/api/v1/task-templates", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"/api/v1/task-templates",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"success": true,
"data": [
{
"id": "string",
"schema_version": 1,
"task_type": "NEW",
"label": "string",
"sort_order": 0,
"defaults": {
"work_stream": "Performance",
"media_type": "VID",
"resolution": "1080x1920",
"source": "META",
"geo": "US",
"language": "EN",
"count": 1,
"creation_complexity": 1,
"execution_complexity": 1,
"priority": 1,
"varied_elements": [
"hook"
]
},
"description": "string",
"owner": {
"mode": "unset",
"user_id": "string"
},
"assignee": {
"mode": "unset",
"user_id": "string"
},
"variants": [
{
"key": "string",
"variation_num": 1,
"primary_anchor": "pain_led",
"audience": "string",
"awareness_stage": "unaware",
"messaging_angle": "pattern_interrupt",
"hook_trigger": "pattern_interrupt",
"hook_type": "pattern_interrupt",
"ad_format": "animation",
"notes": "string",
"tag_slugs": [
"string"
],
"description": "string",
"completed": false
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"updated_by": "string"
}
],
"message": "string",
"errors": [
"string"
]
}