Queue an asynchronous RouterOS script
curl --request POST \
--url https://v1.api.altostrat.io/api/asynchronous/{siteId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Add guest network address",
"script": "/ip address add address=192.168.99.1/24 interface=bridge",
"make_backup": true,
"express_execute": true,
"needs_acknowledgement": true,
"notify_url": "https://example.com/sdx/job-complete"
}
'import requests
url = "https://v1.api.altostrat.io/api/asynchronous/{siteId}"
payload = {
"description": "Add guest network address",
"script": "/ip address add address=192.168.99.1/24 interface=bridge",
"make_backup": True,
"express_execute": True,
"needs_acknowledgement": True,
"notify_url": "https://example.com/sdx/job-complete"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Add guest network address',
script: '/ip address add address=192.168.99.1/24 interface=bridge',
make_backup: true,
express_execute: true,
needs_acknowledgement: true,
notify_url: 'https://example.com/sdx/job-complete'
})
};
fetch('https://v1.api.altostrat.io/api/asynchronous/{siteId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v1.api.altostrat.io/api/asynchronous/{siteId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Add guest network address',
'script' => '/ip address add address=192.168.99.1/24 interface=bridge',
'make_backup' => true,
'express_execute' => true,
'needs_acknowledgement' => true,
'notify_url' => 'https://example.com/sdx/job-complete'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/api/asynchronous/{siteId}"
payload := strings.NewReader("{\n \"description\": \"Add guest network address\",\n \"script\": \"/ip address add address=192.168.99.1/24 interface=bridge\",\n \"make_backup\": true,\n \"express_execute\": true,\n \"needs_acknowledgement\": true,\n \"notify_url\": \"https://example.com/sdx/job-complete\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/api/asynchronous/{siteId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Add guest network address\",\n \"script\": \"/ip address add address=192.168.99.1/24 interface=bridge\",\n \"make_backup\": true,\n \"express_execute\": true,\n \"needs_acknowledgement\": true,\n \"notify_url\": \"https://example.com/sdx/job-complete\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/api/asynchronous/{siteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Add guest network address\",\n \"script\": \"/ip address add address=192.168.99.1/24 interface=bridge\",\n \"make_backup\": true,\n \"express_execute\": true,\n \"needs_acknowledgement\": true,\n \"notify_url\": \"https://example.com/sdx/job-complete\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"idempotency_key": "f9e2b0a1-7f12-4d35-9c86-7ebfe33ac18b",
"request_id": "5f9475ef-565f-5d10-8a86-4c7f5fdb2687",
"target": "9c69345c-8d39-4786-9f17-8153c988c89a",
"notify_url": "https://example.com/sdx/job-complete",
"date": "2026-04-20T03:14:15+00:00"
}
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The 'lat' parameter must be between -90 and 90.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The 'lat' parameter must be between -90 and 90.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The 'lat' parameter must be between -90 and 90.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}Developer API
Queue an asynchronous RouterOS script
Queues a RouterOS script for execution on a managed site. Use asynchronous scripts for configuration changes, backups, and work that should be tracked as a device job.
POST
/
api
/
asynchronous
/
{siteId}
Queue an asynchronous RouterOS script
curl --request POST \
--url https://v1.api.altostrat.io/api/asynchronous/{siteId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Add guest network address",
"script": "/ip address add address=192.168.99.1/24 interface=bridge",
"make_backup": true,
"express_execute": true,
"needs_acknowledgement": true,
"notify_url": "https://example.com/sdx/job-complete"
}
'import requests
url = "https://v1.api.altostrat.io/api/asynchronous/{siteId}"
payload = {
"description": "Add guest network address",
"script": "/ip address add address=192.168.99.1/24 interface=bridge",
"make_backup": True,
"express_execute": True,
"needs_acknowledgement": True,
"notify_url": "https://example.com/sdx/job-complete"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Add guest network address',
script: '/ip address add address=192.168.99.1/24 interface=bridge',
make_backup: true,
express_execute: true,
needs_acknowledgement: true,
notify_url: 'https://example.com/sdx/job-complete'
})
};
fetch('https://v1.api.altostrat.io/api/asynchronous/{siteId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v1.api.altostrat.io/api/asynchronous/{siteId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Add guest network address',
'script' => '/ip address add address=192.168.99.1/24 interface=bridge',
'make_backup' => true,
'express_execute' => true,
'needs_acknowledgement' => true,
'notify_url' => 'https://example.com/sdx/job-complete'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/api/asynchronous/{siteId}"
payload := strings.NewReader("{\n \"description\": \"Add guest network address\",\n \"script\": \"/ip address add address=192.168.99.1/24 interface=bridge\",\n \"make_backup\": true,\n \"express_execute\": true,\n \"needs_acknowledgement\": true,\n \"notify_url\": \"https://example.com/sdx/job-complete\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/api/asynchronous/{siteId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Add guest network address\",\n \"script\": \"/ip address add address=192.168.99.1/24 interface=bridge\",\n \"make_backup\": true,\n \"express_execute\": true,\n \"needs_acknowledgement\": true,\n \"notify_url\": \"https://example.com/sdx/job-complete\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/api/asynchronous/{siteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Add guest network address\",\n \"script\": \"/ip address add address=192.168.99.1/24 interface=bridge\",\n \"make_backup\": true,\n \"express_execute\": true,\n \"needs_acknowledgement\": true,\n \"notify_url\": \"https://example.com/sdx/job-complete\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"idempotency_key": "f9e2b0a1-7f12-4d35-9c86-7ebfe33ac18b",
"request_id": "5f9475ef-565f-5d10-8a86-4c7f5fdb2687",
"target": "9c69345c-8d39-4786-9f17-8153c988c89a",
"notify_url": "https://example.com/sdx/job-complete",
"date": "2026-04-20T03:14:15+00:00"
}
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The 'lat' parameter must be between -90 and 90.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The 'lat' parameter must be between -90 and 90.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The 'lat' parameter must be between -90 and 90.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}Authorizations
Authenticate requests by providing a JSON Web Token (JWT) in the Authorization header. Example: Authorization: Bearer <YOUR_JWT>
Path Parameters
The target site/router UUID.
Example:
"9c69345c-8d39-4786-9f17-8153c988c89a"
Body
application/json
Example:
"Add guest network address"
Example:
"/ip address add address=192.168.99.1/24 interface=bridge"
Create a configuration backup before running the script.
Ask SDX to trigger a faster device check-in where possible.
Require the device job to acknowledge completion.
Optional HTTPS callback URL for job status notification.
Example:
"https://example.com/sdx/job-complete"
Was this page helpful?
⌘I