v51

OpenAPI 3.0.2raw.githubusercontent.com2026-08-01245104440.0 KB
Server Actions

Create server action

Create a new server action. Only the name field is required. Additional fields (type, data, etc.) can optionally be included to configure the action immediately after creation.

post/v1/server-actions

Request body

namestring required

Action name

typeinteger

Action type

isDisabledboolean

Whether the action is disabled

isMarkdownboolean

Whether the notification message body is markdown

datastring

Action data (command, message, or script name depending on type)

recipientAddressstring

Recipient address

emailSubjectstring

Email subject

notificationChannelNamestring

Notification channel name

Response

Server action created successfully

idinteger

Action ID

guidstring uuid

Action GUID

namestring

Action name

typeinteger

Action type: 0=execute command on server, 1=execute command on remote node via agent, 3=send notification, 4=forward event, 5=execute server-side script, 7=execute command via SSH

typeDescriptionstring

Human-readable action type description

isDisabledboolean

Whether the action is disabled

isMarkdownboolean

Whether the notification message body is markdown

recipientAddressstring

Recipient address (supports macros)

emailSubjectstring

Email subject (supports macros)

notificationChannelNamestring

Notification channel name

commandstring

Action payload for command-type actions (type 0, 1, or 7). Exactly one of command/message/scriptName/data is present, selected by the action type.

messagestring

Action payload for notification actions (type 3).

scriptNamestring

Action payload for script actions (type 5).

datastring

Action payload for other action types (e.g. type 4, forward event).