---
title: "Create server action"
method: POST
path: "/v1/server-actions"
tags: ["Server Actions"]
---

# Create server action

`POST /v1/server-actions`

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.

## Request body

- ServerActionCreate
  - `name` string, required — Action name
  - `type` integer — Action type
  - `isDisabled` boolean — Whether the action is disabled
  - `isMarkdown` boolean — Whether the notification message body is markdown
  - `data` string — Action data (command, message, or script name depending on type)
  - `recipientAddress` string — Recipient address
  - `emailSubject` string — Email subject
  - `notificationChannelName` string — Notification channel name

## Response `201`

Server action created successfully

- ServerAction — Server action configuration
  - `id` integer — Action ID
  - `guid` string, uuid — Action GUID
  - `name` string — Action name
  - `type` integer — 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
  - `typeDescription` string — Human-readable action type description
  - `isDisabled` boolean — Whether the action is disabled
  - `isMarkdown` boolean — Whether the notification message body is markdown
  - `recipientAddress` string — Recipient address (supports macros)
  - `emailSubject` string — Email subject (supports macros)
  - `notificationChannelName` string — Notification channel name
  - `command` string — 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.
  - `message` string — Action payload for notification actions (type 3).
  - `scriptName` string — Action payload for script actions (type 5).
  - `data` string — Action payload for other action types (e.g. type 4, forward event).

## Other responses

- `400` — Missing or invalid name field
- `401` — Unauthorized
- `403` — User does not have MANAGE_ACTIONS access right
- `409` — Action with this name already exists
- `500` — Database failure

## Changes

> 71 revisions in range; 5 could not be searched.

- **2026-07-30** `02a14829a49c` — 2 info
  - added the new optional request property `isMarkdown`
  - added the optional property `isMarkdown` to the response with the `201` status
- **2026-06-10** `30e75dc6a94c` — 4 info
  - added the optional property `command` to the response with the `201` status
  - added the optional property `data` to the response with the `201` status
  - added the optional property `message` to the response with the `201` status
  - added the optional property `scriptName` to the response with the `201` status
- **2026-05-08** `c6aaf3632e48` — 4 warning
  - removed the optional property `command` from the response with the `201` status
  - removed the optional property `data` from the response with the `201` status
  - removed the optional property `message` from the response with the `201` status
  - removed the optional property `scriptName` from the response with the `201` status

[Change history](https://skmtc.dev/netxms/apis/netxms-api/changes/v1/server-actions/post.md)

---

[API](https://skmtc.dev/netxms/apis/netxms-api.md) · [All operations](https://skmtc.dev/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/netxms/netxms-api/revisions/b04ea2fbcedb/schema)
