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

Update Communication Template

Communications · REST API reference

Get support
PATCH/v1/communication-templates/{template_id}

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 PATCH \
  --url 'https://api.staging.facily.ai/v1/communication-templates/<TEMPLATE_ID>' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "body": "string",
  "default_key": "string",
  "document_type": "string",
  "is_active": false,
  "layout_id": "00000000-0000-4000-8000-000000000001",
  "merge_fields": [
    "string"
  ],
  "name": "string",
  "subject": "string",
  "trigger_key": "string"
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

template_idpath · stringrequired

Format: uuid

Request body

application/json · Required

bodystring | null

Min length: 1

Show body schema
string | null
Variant 1: string
string
Variant 2: null
null
default_keystring | null
Show default_key schema
string | null
Variant 1: string
string
Variant 2: null
null
document_typestring | null

Max length: 50

Show document_type schema
string | null
Variant 1: string
string
Variant 2: null
null
is_activeboolean | null
Show is_active schema
boolean | null
Variant 1: boolean
boolean
Variant 2: null
null
layout_idstring | null

Format: uuid

Show layout_id schema
string | null
Variant 1: string
string
Variant 2: null
null
merge_fieldsstring[] | null
Show merge_fields schema
string[] | null
Variant 1: string[]
string[]
Variant 2: null
null
namestring | null

Min length: 1 · Max length: 100

Show name schema
string | null
Variant 1: string
string
Variant 2: null
null
subjectstring | null

Max length: 255

Show subject schema
string | null
Variant 1: string
string
Variant 2: null
null
trigger_keystring | null
Show trigger_key schema
string | null
Variant 1: string
string
Variant 2: null
null

Responses

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

200Successful Response
JSON · generated example
{
  "data": {
    "body": "string",
    "created_at": "2026-10-29T12:00:00Z",
    "id": "00000000-0000-4000-8000-000000000001",
    "is_active": false,
    "kind": "string",
    "name": "string",
    "source": "facility",
    "updated_at": "2026-10-29T12:00:00Z",
    "version": 0,
    "default_key": "string",
    "document_type": "string",
    "facility_id": "00000000-0000-4000-8000-000000000001"
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataTemplateResponserequired

One saved template row, full detail including its body. Returned by the create/get/update/delete routes -- never by the list routes, which return `TemplateListItemResponse` instead.

Show data schema
bodystringrequired
created_atstringrequired

Format: date-time

default_keystring | null
Show default_key schema
string | null
Variant 1: string
string
Variant 2: null
null
document_typestring | null
Show document_type schema
string | null
Variant 1: string
string
Variant 2: null
null
facility_idstring | null

Format: uuid

Show facility_id schema
string | null
Variant 1: string
string
Variant 2: null
null
idstringrequired

Format: uuid

is_activebooleanrequired
kindstringrequired
layout_idstring | null

Format: uuid

Show layout_id schema
string | null
Variant 1: string
string
Variant 2: null
null
merge_fieldsstring[]
Show merge_fields schema
string
namestringrequired
sourcestringrequired

Values: "facility", "org"

subjectstring | null
Show subject schema
string | null
Variant 1: string
string
Variant 2: null
null
trigger_keystring | null
Show trigger_key schema
string | null
Variant 1: string
string
Variant 2: null
null
updated_atstringrequired

Format: date-time

versionintegerrequired
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
Build something that works beautifully.

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

Update Communication Template | Facily Developers