Skip to content
Kumquat
Esc
↑↓navigate↵open⌘Jpreview

Create Task Template

POST/api/v1/task-templates
Authorization
AuthorizationBearer token · headerrequired
or
AuthorizationOAuth2 access token · headerrequired
Request body
requiredapplication/json
task_typeTaskTyperequired
Allowed:NEWVARLOCWHTNEWDESVARDESDESCLNVARAIADPTRSZ
labelstringrequired
sort_orderinteger
default: 0
defaultsTaskTemplateDefaults
The 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 properties
work_streamWorkStream | any
Show properties
Any of:
WorkStream
string
any
any
media_typeMediaType | any
Show properties
Any of:
MediaType
string
any
any
resolutionResolution | any
Show properties
Any of:
Resolution
string
any
any
sourceSource | any
Show properties
Any of:
Source
string
any
any
geoGeo | any
Show properties
Any of:
Geo
string
any
any
languageLanguage | any
Show properties
Any of:
Language
string
any
any
countinteger | any
Show properties
Any of:
integer
integer
any
any
creation_complexityinteger | any
Show properties
Any of:
integer
integer
any
any
execution_complexityinteger | any
Show properties
Any of:
integer
integer
any
any
priorityinteger | any
Show properties
Any of:
integer
integer
any
any
varied_elementsVariedElement[] | any
Show properties
Any of:
VariedElement[]
Array of VariedElement
string
any
any
descriptionstring | any
Show properties
Any of:
string
string
any
any
ownerTaskTemplatePerson
How a template fills Task Owner or Assignee. See `TemplatePersonMode`.
Show properties
modeTemplatePersonMode
How 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:unsetcreatoruser
user_idstring | any
Show properties
Any of:
string
string
any
any
assigneeTaskTemplatePerson
How a template fills Task Owner or Assignee. See `TemplatePersonMode`.
Show properties
modeTemplatePersonMode
How 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:unsetcreatoruser
user_idstring | any
Show properties
Any of:
string
string
any
any
variantsTaskVariant[]
Show properties
Array of TaskVariant
keystringrequired
variation_numintegerrequired
min 1
primary_anchorPrimaryAnchor | any
Show properties
Any of:
PrimaryAnchor
string
any
any
audiencestring | any
Show properties
Any of:
string
string
any
any
awareness_stageAwarenessStage | any
Show properties
Any of:
AwarenessStage
string
any
any
messaging_angleMessagingAngle | any
Show properties
Any of:
MessagingAngle
string
any
any
hook_triggerHookTrigger | any
Show properties
Any of:
HookTrigger
string
any
any
hook_typeHookType | any
Show properties
Any of:
HookType
string
any
any
ad_formatAdFormat | any
Show properties
Any of:
AdFormat
string
any
any
notesstring | any
Show properties
Any of:
string
string
any
any
tag_slugsstring[]
descriptionstring | any
Show properties
Any of:
string
string
any
any
completedboolean
default: false
Responses
201Successful Response
successboolean
default: true
dataTaskTemplate | any
Show properties
Any of:
TaskTemplate
idstring
schema_versioninteger
default: 1
task_typeTaskTyperequired
Allowed:NEWVARLOCWHTNEWDESVARDESDESCLNVARAIADPTRSZ
labelstringrequired
sort_orderinteger
default: 0
defaultsTaskTemplateDefaults
The 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 properties
work_streamWorkStream | any
Show properties
Any of:
WorkStream
string
any
any
media_typeMediaType | any
Show properties
Any of:
MediaType
string
any
any
resolutionResolution | any
Show properties
Any of:
Resolution
string
any
any
sourceSource | any
Show properties
Any of:
Source
string
any
any
geoGeo | any
Show properties
Any of:
Geo
string
any
any
languageLanguage | any
Show properties
Any of:
Language
string
any
any
countinteger | any
Show properties
Any of:
integer
integer
any
any
creation_complexityinteger | any
Show properties
Any of:
integer
integer
any
any
execution_complexityinteger | any
Show properties
Any of:
integer
integer
any
any
priorityinteger | any
Show properties
Any of:
integer
integer
any
any
varied_elementsVariedElement[] | any
Show properties
Any of:
VariedElement[]
Array of VariedElement
string
any
any
descriptionstring | any
Show properties
Any of:
string
string
any
any
ownerTaskTemplatePerson
How a template fills Task Owner or Assignee. See `TemplatePersonMode`.
Show properties
modeTemplatePersonMode
How 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:unsetcreatoruser
user_idstring | any
Show properties
Any of:
string
string
any
any
assigneeTaskTemplatePerson
How a template fills Task Owner or Assignee. See `TemplatePersonMode`.
Show properties
modeTemplatePersonMode
How 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:unsetcreatoruser
user_idstring | any
Show properties
Any of:
string
string
any
any
variantsTaskVariant[]
Show properties
Array of TaskVariant
keystringrequired
variation_numintegerrequired
min 1
primary_anchorPrimaryAnchor | any
Show properties
Any of:
PrimaryAnchor
string
any
any
audiencestring | any
Show properties
Any of:
string
string
any
any
awareness_stageAwarenessStage | any
Show properties
Any of:
AwarenessStage
string
any
any
messaging_angleMessagingAngle | any
Show properties
Any of:
MessagingAngle
string
any
any
hook_triggerHookTrigger | any
Show properties
Any of:
HookTrigger
string
any
any
hook_typeHookType | any
Show properties
Any of:
HookType
string
any
any
ad_formatAdFormat | any
Show properties
Any of:
AdFormat
string
any
any
notesstring | any
Show properties
Any of:
string
string
any
any
tag_slugsstring[]
descriptionstring | any
Show properties
Any of:
string
string
any
any
completedboolean
default: false
created_atstring<date-time>
updated_atstring<date-time>
deleted_atstring<date-time> | any
Show properties
Any of:
string<date-time>
string<date-time>
any
any
updated_bystring | any
Show properties
Any of:
string
string
any
any
any
any
messagestring | any
Show properties
Any of:
string
string
any
any
errorsstring[] | any
Show properties
Any of:
string[]
Array of string
string
any
any
422Validation Error
detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
curl -X POST "/api/v1/task-templates" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "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
    }
  ]
}'
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"
  ]
}