Skip to main content
POST
Update a template

Restrictions

Usage

  • template_name is required on every call and always written. Other fields left out keep their current values; a channel sent as an empty string is cleared, and notifications on that channel then use the built-in preset content.
  • Every non-empty channel source in the request is test-rendered against a mock incident; a template error fails the whole request with InvalidParameter. While wecom_markdown_v2_enabled is true, the rendered wecom content must be at most 4,096 bytes.
  • incident_card_hidden_fields and incident_card_closed_action_apps, when sent, replace the stored value as a whole.
  • An unknown template_id returns InvalidParameter; a new template_name must not be used by another template.
  • Only an account admin, the template creator, or a member of the template’s owning team may call this; others get AccessDenied.
  • Every call is recorded in the account audit log. Don’t put secrets in request fields.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json

Update an existing template.

template_id
string
required

Target template ID; obtain it from POST /template/list.

Pattern: ^[0-9a-fA-F]{24}$
Example:

"6605a1b2c3d4e5f6a7b8c9d0"

template_name
string
required

Template name, 1–39 characters. Required and written on every call; must not be used by another template.

Required string length: 1 - 39
team_id
integer<int64> | null

Team scope. 0 for account-wide. Omit to keep the template's current team.

description
string | null

Free-form description. Up to 500 characters. Omit to keep the current content; send an empty string to clear it.

Maximum string length: 500
email
string | null

Email body template source (Go html/template syntax). Omit to keep the current content; send an empty string to clear it.

sms
string | null

SMS template source (Go text/template syntax). Omit to keep the current content; send an empty string to clear it.

voice
string | null

Voice call script template source. Omit to keep the current content; send an empty string to clear it.

dingtalk
string | null

DingTalk robot message template source. Omit to keep the current content; send an empty string to clear it.

wecom
string | null

WeCom robot message template source. Omit to keep the current content; send an empty string to clear it.

wecom_markdown_v2_enabled
boolean | null

Send WeCom robot notifications as markdown_v2 messages instead of plain markdown. While enabled, the rendered wecom content must be at most 4,096 bytes. Omit to keep the current setting.

feishu
string | null

Feishu robot message template source. Omit to keep the current content; send an empty string to clear it.

feishu_app
string | null

Feishu app message template source. Omit to keep the current content; send an empty string to clear it.

feishu_app_card_v2_table_enabled
boolean | null

Render Markdown tables in the feishu_app content as native Feishu card tables. Omit to keep the current setting.

feishu_app_card_v2_preserve_blank_lines
boolean | null

When set, keep or drop blank lines in the body of Feishu app card v2 messages. Omit to keep the existing setting.

feishu_app_war_room_enabled
boolean | null

When set, show or hide the Create War Room button on Feishu app cards. Omit to keep the existing setting.

dingtalk_app_war_room_enabled
boolean | null

When set, show or hide the Create War Room button on DingTalk app cards. Omit to keep the existing setting.

slack_app_war_room_enabled
boolean | null

When set, show or hide the Create War Room button on Slack app cards. Omit to keep the existing setting.

dingtalk_app
string | null

DingTalk app message template source. Omit to keep the current content; send an empty string to clear it.

wecom_app
string | null

WeCom app message template source. Omit to keep the current content; send an empty string to clear it.

slack_app
string | null

Slack app message template source. Omit to keep the current content; send an empty string to clear it.

teams_app
string | null

Microsoft Teams app message template source. Omit to keep the current content; send an empty string to clear it.

telegram
string | null

Telegram bot message template source. Omit to keep the current content; send an empty string to clear it.

slack
string | null

Slack robot message template source. Omit to keep the current content; send an empty string to clear it.

zoom
string | null

Zoom bot message template source. Omit to keep the current content; send an empty string to clear it.

incident_card_closed_action_apps
enum<string>[]

Replaces the retained-app list when sent. Supported values: feishu_app, dingtalk_app, wecom_app, slack_app, teams_app. Omit the field to leave it unchanged.

Available options:
feishu_app,
dingtalk_app,
wecom_app,
slack_app,
teams_app
incident_card_hidden_fields
object

Incident card fields to hide per IM app type. When sent, replaces the stored value as a whole; omit to keep.

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object

An empty object. Returned as the data payload by operations whose success signal is simply the absence of an error.