Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsCreate Task Template
Search the full API reference Esc to close

Create Task Template

Tasks · REST API reference

Get support
POST/v1/facilities/{facility_id}/task-templates
Create one recurring template at this facility. Answers 201 with the new template.

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request example

Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.

cURL
curl --request POST \
  --url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/task-templates' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "cadence": "daily",
  "title": "string",
  "anchor_on": "2026-10-29",
  "assignment": {
    "mode": "direct",
    "user_id": "00000000-0000-4000-8000-000000000001"
  },
  "day_of_month": 1,
  "description": "string",
  "due_offset_days": 0,
  "estimated_cost": 0,
  "inspection_kind": "string",
  "interval_count": 1,
  "kind": "task",
  "priority": "normal"
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

facility_idpath · stringrequired

Format: uuid

Request body

application/json · Required

anchor_onstring | null

The date the schedule counts from, in the facility's calendar: the first task is filed on the first scheduled day on or after it. Omitted, the facility's today.

Format: date

Show anchor_on schema
string | null

The date the schedule counts from, in the facility's calendar: the first task is filed on the first scheduled day on or after it. Omitted, the facility's today.

Variant 1: string
string
Variant 2: null
null
assignmentTaskAssignmentRequest | null

Who gets each task filed, in the form the task assign route takes: direct names a person who can be assigned work at this facility, auto gives each task to the facility's rotation, and unassigned leaves it for someone to claim. Omitted, unassigned.

Show assignment schema
TaskAssignmentRequest | null

Who gets each task filed, in the form the task assign route takes: direct names a person who can be assigned work at this facility, auto gives each task to the facility's rotation, and unassigned leaves it for someone to claim. Omitted, unassigned.

Variant 1: TaskAssignmentRequest
modestringrequired

direct assigns user_id; auto gives the task to the next person in its facility's rotation, and it waits when there is no one; unassigned clears the assignee.

Values: "direct", "auto", "unassigned"

user_idstring | null

The person to assign, with mode direct only.

Format: uuid

Show user_id schema
string | null

The person to assign, with mode direct only.

Variant 1: string
string
Variant 2: null
null
Variant 2: null
null
cadencestringrequired

How often a task is filed: daily, weekly or monthly.

Values: "daily", "monthly", "weekly"

day_of_monthinteger | null

The day of the month, 1 to 31; a day past the end of a shorter month files on its last day. Required with a monthly cadence and refused with any other.

Minimum: 1 · Maximum: 31

Show day_of_month schema
integer | null

The day of the month, 1 to 31; a day past the end of a shorter month files on its last day. Required with a monthly cadence and refused with any other.

Variant 1: integer
integer
Variant 2: null
null
descriptionstring | null

Longer detail copied onto each task filed. At most 2,000 characters. Empty or only spaces is stored as null.

Max length: 2000

Show description schema
string | null

Longer detail copied onto each task filed. At most 2,000 characters. Empty or only spaces is stored as null.

Variant 1: string
string
Variant 2: null
null
due_offset_daysinteger

How many days after its scheduled day each task falls due, 0 to 365. 0 is due that day.

Default: 0 · Minimum: 0 · Maximum: 365

estimated_costnumber | string | null

The estimate each work order carries, as a decimal string: zero or more, at most 99999999.99, with at most two decimal places. Null for none. A work order template's only.

Minimum: 0 · Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)

Show estimated_cost schema
number | string | null

The estimate each work order carries, as a decimal string: zero or more, at most 99999999.99, with at most two decimal places. Null for none. A work order template's only.

Variant 1: number
number
Variant 2: string
string
Variant 3: null
null
inspection_kindstring | null

The kind of round each inspection filed is: lock_audit, fire_life_safety, pest_control, lighting_safety, walkthrough, move_out or general. Required for an inspection template and refused on any other.

Max length: 30

Show inspection_kind schema
string | null

The kind of round each inspection filed is: lock_audit, fire_life_safety, pest_control, lighting_safety, walkthrough, move_out or general. Required for an inspection template and refused on any other.

Variant 1: string
string
Variant 2: null
null
interval_countinteger

Every how many days, weeks or months. At most 365 days, 52 weeks or 12 months.

Default: 1 · Minimum: 1 · Maximum: 365

kindstring

What each run files: task, work_order or inspection. A kind that cannot be scheduled yet answers 400; the list's available_kinds names the kinds that can.

Default: "task" · Values: "inspection", "task", "work_order"

prioritystring

How urgent each task filed is.

Default: "normal" · Values: "low", "normal", "high", "urgent"

requires_photo_proofboolean | null

Whether each task filed needs proof photos before it can be completed. Omitted or null, each task takes the facility's default for its type on the day it is filed. A value that differs from the facility's default needs the task.manage permission, and turning a default of true off needs a person. A false sent by an API key equals the default it was checked against and is stored as null.

Show requires_photo_proof schema
boolean | null

Whether each task filed needs proof photos before it can be completed. Omitted or null, each task takes the facility's default for its type on the day it is filed. A value that differs from the facility's default needs the task.manage permission, and turning a default of true off needs a person. A false sent by an API key equals the default it was checked against and is stored as null.

Variant 1: boolean
boolean
Variant 2: null
null
skip_if_openboolean

True files nothing on a scheduled day while a task this template filed is still open, and notes the skipped day on that task. False files on every scheduled day.

Default: true

task_typestring | null

The board type of each task filed. Required for a task template, and never a type that needs a unit: clean_unit, unit_prep, overlock or remove_overlock. A work order or inspection template takes its kind's own name (work_order or inspection) or nothing.

Values: "auction_prep", "clean_unit", "collection", "follow_up", "inspection", "lock_check", "maintenance", "other", "overlock", "remove_overlock", "review", "unit_prep", "walkthrough", "work_order"

Show task_type schema
string | null

The board type of each task filed. Required for a task template, and never a type that needs a unit: clean_unit, unit_prep, overlock or remove_overlock. A work order or inspection template takes its kind's own name (work_order or inspection) or nothing.

Variant 1: string
string

Values: "auction_prep", "clean_unit", "collection", "follow_up", "inspection", "lock_check", "maintenance", "other", "overlock", "remove_overlock", "review", "unit_prep", "walkthrough", "work_order"

Variant 2: null
null
titlestringrequired

What each task filed is called. Trimmed and required.

Min length: 1 · Max length: 255

unit_group_idstring | null

The unit group each inspection filed covers: a live unit group of this facility. Omitted for the whole facility. An inspection template's only.

Format: uuid

Show unit_group_id schema
string | null

The unit group each inspection filed covers: a live unit group of this facility. Omitted for the whole facility. An inspection template's only.

Variant 1: string
string
Variant 2: null
null
vendorstring | null

Who does each work order's work, as typed. At most 120 characters; empty or only spaces is stored as null. A work order template's only.

Max length: 120

Show vendor schema
string | null

Who does each work order's work, as typed. At most 120 characters; empty or only spaces is stored as null. A work order template's only.

Variant 1: string
string
Variant 2: null
null
weekdayinteger | null

The day of the week, 1 (Monday) to 7 (Sunday). Required with a weekly cadence and refused with any other.

Minimum: 1 · Maximum: 7

Show weekday schema
integer | null

The day of the week, 1 (Monday) to 7 (Sunday). Required with a weekly cadence and refused with any other.

Variant 1: integer
integer
Variant 2: null
null
work_order_categorystring | null

The trade each work order needs: doors, electrical, access, building, elevator, pest_control, hvac, security, paving, locks, plumbing, roofing, cleaning, maintenance or other. Required for a work order template and refused on any other.

Values: "doors", "electrical", "access", "building", "elevator", "pest_control", "hvac", "security", "paving", "locks", "plumbing", "roofing", "cleaning", "maintenance", "other"

Show work_order_category schema
string | null

The trade each work order needs: doors, electrical, access, building, elevator, pest_control, hvac, security, paving, locks, plumbing, roofing, cleaning, maintenance or other. Required for a work order template and refused on any other.

Variant 1: string
string

Values: "doors", "electrical", "access", "building", "elevator", "pest_control", "hvac", "security", "paving", "locks", "plumbing", "roofing", "cleaning", "maintenance", "other"

Variant 2: null
null

Responses

Expand a status to inspect its schema. Generated examples show structure and synthetic values.

201Successful Response
JSON · generated example
{
  "data": {
    "anchor_on": "2026-10-29",
    "assignee": {
      "display_name": "string",
      "id": "00000000-0000-4000-8000-000000000001"
    },
    "assignee_id": "00000000-0000-4000-8000-000000000001",
    "assignment_mode": "string",
    "cadence": "string",
    "capabilities": {
      "delete": false,
      "edit": false,
      "pause": false
    },
    "created_at": "2026-10-29T12:00:00Z",
    "created_by": "00000000-0000-4000-8000-000000000001",
    "day_of_month": 0,
    "description": "string",
    "due_offset_days": 0,
    "estimated_cost": "<VALUE_MATCHING_PATTERN>",
    "facility_id": "00000000-0000-4000-8000-000000000001",
    "facility_name": "string",
    "id": "00000000-0000-4000-8000-000000000001",
    "inspection_kind": "string",
    "interval_count": 0,
    "is_active": false,
    "kind": "string",
    "last_run_on": "2026-10-29",
    "next_run_on": "2026-10-29",
    "priority": "string",
    "requires_photo_proof": false,
    "skip_if_open": false,
    "task_type": "string",
    "title": "string",
    "unit_group_id": "00000000-0000-4000-8000-000000000001",
    "updated_at": "2026-10-29T12:00:00Z",
    "vendor": "string",
    "weekday": 0,
    "work_order_category": "string"
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataTaskTemplateResponserequired

One recurring template, with what the caller may do with it.

Show data schema
anchor_onstringrequired

The date the schedule counts from, in the facility's calendar.

Format: date

assigneePersonResponse | nullrequired

That person; null when there is none.

Show assignee schema
PersonResponse | null

That person; null when there is none.

Variant 1: PersonResponse
display_namestringrequired

The name to show for the user.

idstringrequired

The user's id.

Format: uuid

Variant 2: null
null
assignee_idstring | nullrequired

The person a direct template gives each task to; null otherwise.

Format: uuid

Show assignee_id schema
string | null

The person a direct template gives each task to; null otherwise.

Variant 1: string
string
Variant 2: null
null
assignment_modestringrequired

direct, auto or unassigned: who gets each task filed.

cadencestringrequired

daily, weekly or monthly.

capabilitiesTaskTemplateCapabilitiesResponserequired

What the caller may do with a template now, from their permissions at its facility.

Show capabilities schema
deletebooleanrequired

True when the caller may delete it now.

editbooleanrequired

True when the caller may change the template now.

pausebooleanrequired

True when the caller may pause or resume it now.

created_atstringrequired

When the template was created.

Format: date-time

created_bystringrequired

Who created it.

Format: uuid

day_of_monthinteger | nullrequired

A monthly template's day of the month, 1 to 31; null otherwise.

Show day_of_month schema
integer | null

A monthly template's day of the month, 1 to 31; null otherwise.

Variant 1: integer
integer
Variant 2: null
null
descriptionstring | nullrequired

Longer detail copied onto each task filed.

Show description schema
string | null

Longer detail copied onto each task filed.

Variant 1: string
string
Variant 2: null
null
due_offset_daysintegerrequired

How many days after its scheduled day each task falls due.

estimated_coststring | nullrequired

A work order template's estimate, as a decimal string; null when there is none.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show estimated_cost schema
string | null

A work order template's estimate, as a decimal string; null when there is none.

Variant 1: string
string
Variant 2: null
null
facility_idstringrequired

The facility the template files at.

Format: uuid

facility_namestringrequired

That facility's name.

idstringrequired

The template's id.

Format: uuid

inspection_kindstring | nullrequired

An inspection template's kind of round; null otherwise.

Show inspection_kind schema
string | null

An inspection template's kind of round; null otherwise.

Variant 1: string
string
Variant 2: null
null
interval_countintegerrequired

Every how many days, weeks or months.

is_activebooleanrequired

False while the template is paused.

kindstringrequired

What each run files: task, work_order or inspection.

last_run_onstring | nullrequired

The last scheduled day a run handled; null before the first.

Format: date

Show last_run_on schema
string | null

The last scheduled day a run handled; null before the first.

Variant 1: string
string
Variant 2: null
null
next_run_onstringrequired

The next scheduled day, in the facility's calendar.

Format: date

prioritystringrequired

How urgent each task filed is.

requires_photo_proofboolean | nullrequired

Whether each task filed needs proof photos. Null: each takes the facility's default for its type on the day it is filed.

Show requires_photo_proof schema
boolean | null

Whether each task filed needs proof photos. Null: each takes the facility's default for its type on the day it is filed.

Variant 1: boolean
boolean
Variant 2: null
null
skip_if_openbooleanrequired

True skips a scheduled day while a task this template filed is still open.

task_typestringrequired

The board type of each task filed. A work order or inspection template's is its kind.

titlestringrequired

What each task filed is called.

unit_group_idstring | nullrequired

The unit group an inspection template's rounds cover; null for the whole facility or another kind.

Format: uuid

Show unit_group_id schema
string | null

The unit group an inspection template's rounds cover; null for the whole facility or another kind.

Variant 1: string
string
Variant 2: null
null
updated_atstringrequired

When it last changed.

Format: date-time

vendorstring | nullrequired

A work order template's vendor; null when there is none.

Show vendor schema
string | null

A work order template's vendor; null when there is none.

Variant 1: string
string
Variant 2: null
null
weekdayinteger | nullrequired

A weekly template's day of the week, 1 (Monday) to 7 (Sunday); null otherwise.

Show weekday schema
integer | null

A weekly template's day of the week, 1 (Monday) to 7 (Sunday); null otherwise.

Variant 1: integer
integer
Variant 2: null
null
work_order_categorystring | nullrequired

A work order template's trade category; null otherwise.

Show work_order_category schema
string | null

A work order template's trade category; null otherwise.

Variant 1: string
string
Variant 2: null
null
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Continue exploringAll tasks operations
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

Create Task Template | Facily Developers