Skip to main content
POST
Create a Script Template

Authorizations

Authorization
string
header
required

Altostrat SDX API uses JWT Bearer tokens for authentication. Obtain a token via the Authentication API and include it in the Authorization header as 'Bearer {token}'.

Body

application/json
name
string
required

The name for the new template.

Maximum string length: 100
Example:

"Disable Guest WiFi"

description
string
required

A description of the template's purpose.

Maximum string length: 200
Example:

"A script to disable the guest WiFi interface during off-hours."

content
string
required

The RouterOS script content.

Maximum string length: 5000
Example:

"/interface wireless disable [find name=\"guest-wifi\"]"

metadata
object

Key-value metadata. Keys up to 50 chars, values up to 1000.

Example:

Response

The script template was created successfully.

id
string<uuid>

The unique identifier for the script template.

Example:

"d9e5b5e3-3e8a-4c2f-8d2a-7e6e5a4b1c0d"

name
string

The name of the script template.

Example:

"Standard Firewall Setup"

description
string

A brief description of what the template does.

Example:

"Applies the standard set of corporate firewall rules to a device."

content
string

The full script content of the template.

Example:

"/ip firewall filter add chain=input action=accept connection-state=established,related"

metadata
object | null

A key-value map for storing arbitrary metadata.

Example:
author
string<uuid> | null

The user ID of the template's author. Null for global templates.

Example:

"auth0|642b7f3b8b3b3e3e3e3e3e3e"

read_only
boolean

True if the template is global and cannot be edited by the user.

Example:

false

created_at
string<date-time>

The timestamp when the template was created.

Example:

"2025-10-29T10:30:00.000000Z"

updated_at
string<date-time>

The timestamp when the template was last updated.

Example:

"2025-10-29T11:00:00.000000Z"