Theme
Triggering a job through the REST API
If you need to trigger a Syncplify AFT! job from a script or tool that cannot run the aft start command, call the REST API directly. All you need is an API key and the name of the script to run.
Create the API key in the AFT! web UI on the API keys page, and make sure its IP allow list includes the machine making the request. The examples below use https:// because the instance has TLS enabled (Settings page, TLS section); an instance without a certificate answers on http:// instead.
Windows (PowerShell)
Minimal example:
powershell
$headers = @{ "X-API-Key" = "your-api-key-here" }
$body = @{ scriptName = "My Backup Job" } | ConvertTo-Json
Invoke-RestMethod -Method POST `
-Uri "https://127.0.0.1:44399/v1/jobs" `
-Headers $headers `
-ContentType "application/json" `
-Body $body `
-SkipCertificateCheckWith parameters:
powershell
$headers = @{ "X-API-Key" = "your-api-key-here" }
$body = @{
scriptName = "My Backup Job"
params = @{ destination = "/archive/2026"; character = "goofy" }
} | ConvertTo-Json -Depth 3
Invoke-RestMethod -Method POST `
-Uri "https://127.0.0.1:44399/v1/jobs" `
-Headers $headers `
-ContentType "application/json" `
-Body $body `
-SkipCertificateCheckLinux and macOS
Minimal example:
bash
curl -sk -X POST https://127.0.0.1:44399/v1/jobs \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"scriptName":"My Backup Job"}'With parameters:
bash
curl -sk -X POST https://127.0.0.1:44399/v1/jobs \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"scriptName":"My Backup Job","params":{"destination":"/archive/2026","character":"goofy"}}'INFO
The -SkipCertificateCheck and -k flags are needed when AFT! uses a self signed TLS certificate, which is what the Settings page generates for a local installation. Drop them once a certificate from a trusted authority is installed.
Request body reference
| Field | Type | Description |
|---|---|---|
scriptName | string | Name of the stored script to run, matched case insensitively. Use this in new integrations. |
scriptId | string | ID of the stored script. Kept for compatibility with AFT! v3 integrations; prefer scriptName. |
filePath | string | Path to a .syncjs file on the disk of the AFT! host, as an alternative to a stored script. |
params | object | Named parameters, as a flat object whose values are strings. Read them in the script with Param("name"). |
Provide exactly one of scriptName, scriptId or filePath. On success the API answers 201 Created with a job information object that includes the job ID. A request that fails the API key check (an unknown or disabled key, or a caller outside the key's IP allow list) gets 401.
Following the job
The job endpoints under /v1/adm/, such as GET /v1/adm/jobs/{id} for the status and DELETE /v1/adm/jobs/{id} to halt a running job, belong to the administrative API. They authenticate with the session of a signed in administrator, the same one the web UI uses; an API key does not open them. For most integrations the practical ways to follow a job are the web UI, where every job and its log are listed, and the script's own reporting: an email, a Slack message, or a call back to your system as in the external workflow API recipe.