Create background job
curl --request POST \
--url https://api.getnexor.ai/api/public/background-jobs \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"steps": [
{
"conditions": [
{}
],
"on_match": {},
"on_no_match": {},
"action": {}
}
],
"description": "<string>",
"trigger_type": "cron",
"cron_expression": "<string>",
"lead_filters": [
{}
],
"workflow_filters": "<unknown>",
"max_leads_per_cycle": 123,
"cooldown_minutes": 123,
"dry_run": true,
"is_active": true
}
'import requests
url = "https://api.getnexor.ai/api/public/background-jobs"
payload = {
"name": "<string>",
"steps": [
{
"conditions": [{}],
"on_match": {},
"on_no_match": {},
"action": {}
}
],
"description": "<string>",
"trigger_type": "cron",
"cron_expression": "<string>",
"lead_filters": [{}],
"workflow_filters": "<unknown>",
"max_leads_per_cycle": 123,
"cooldown_minutes": 123,
"dry_run": True,
"is_active": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
steps: [{conditions: [{}], on_match: {}, on_no_match: {}, action: {}}],
description: '<string>',
trigger_type: 'cron',
cron_expression: '<string>',
lead_filters: [{}],
workflow_filters: '<unknown>',
max_leads_per_cycle: 123,
cooldown_minutes: 123,
dry_run: true,
is_active: true
})
};
fetch('https://api.getnexor.ai/api/public/background-jobs', 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://api.getnexor.ai/api/public/background-jobs",
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([
'name' => '<string>',
'steps' => [
[
'conditions' => [
[
]
],
'on_match' => [
],
'on_no_match' => [
],
'action' => [
]
]
],
'description' => '<string>',
'trigger_type' => 'cron',
'cron_expression' => '<string>',
'lead_filters' => [
[
]
],
'workflow_filters' => '<unknown>',
'max_leads_per_cycle' => 123,
'cooldown_minutes' => 123,
'dry_run' => true,
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.getnexor.ai/api/public/background-jobs"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"conditions\": [\n {}\n ],\n \"on_match\": {},\n \"on_no_match\": {},\n \"action\": {}\n }\n ],\n \"description\": \"<string>\",\n \"trigger_type\": \"cron\",\n \"cron_expression\": \"<string>\",\n \"lead_filters\": [\n {}\n ],\n \"workflow_filters\": \"<unknown>\",\n \"max_leads_per_cycle\": 123,\n \"cooldown_minutes\": 123,\n \"dry_run\": true,\n \"is_active\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.getnexor.ai/api/public/background-jobs")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"conditions\": [\n {}\n ],\n \"on_match\": {},\n \"on_no_match\": {},\n \"action\": {}\n }\n ],\n \"description\": \"<string>\",\n \"trigger_type\": \"cron\",\n \"cron_expression\": \"<string>\",\n \"lead_filters\": [\n {}\n ],\n \"workflow_filters\": \"<unknown>\",\n \"max_leads_per_cycle\": 123,\n \"cooldown_minutes\": 123,\n \"dry_run\": true,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getnexor.ai/api/public/background-jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"conditions\": [\n {}\n ],\n \"on_match\": {},\n \"on_no_match\": {},\n \"action\": {}\n }\n ],\n \"description\": \"<string>\",\n \"trigger_type\": \"cron\",\n \"cron_expression\": \"<string>\",\n \"lead_filters\": [\n {}\n ],\n \"workflow_filters\": \"<unknown>\",\n \"max_leads_per_cycle\": 123,\n \"cooldown_minutes\": 123,\n \"dry_run\": true,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"steps": [
{
"conditions": [
{}
],
"on_match": {},
"on_no_match": {},
"action": {}
}
],
"is_active": true,
"description": "<string>",
"cron_expression": "<string>",
"lead_filters": [
{}
],
"workflow_filters": "<unknown>",
"max_leads_per_cycle": 123,
"cooldown_minutes": 123,
"dry_run": true,
"created_at": "2023-11-07T05:31:56Z",
"last_executed_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Create Background Job
Create a background job: a scheduled/forced automation that filters leads and runs steps on each. A step can evaluate a date/condition (on a metadata key, a collected funnel field, or a tag) and act, or run an action directly — including sending a WhatsApp template (send_message). Common use: send a survey template once to everyone sitting in a given status. See the steps field for the full vocabulary.
POST
/
background-jobs
Create background job
curl --request POST \
--url https://api.getnexor.ai/api/public/background-jobs \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"steps": [
{
"conditions": [
{}
],
"on_match": {},
"on_no_match": {},
"action": {}
}
],
"description": "<string>",
"trigger_type": "cron",
"cron_expression": "<string>",
"lead_filters": [
{}
],
"workflow_filters": "<unknown>",
"max_leads_per_cycle": 123,
"cooldown_minutes": 123,
"dry_run": true,
"is_active": true
}
'import requests
url = "https://api.getnexor.ai/api/public/background-jobs"
payload = {
"name": "<string>",
"steps": [
{
"conditions": [{}],
"on_match": {},
"on_no_match": {},
"action": {}
}
],
"description": "<string>",
"trigger_type": "cron",
"cron_expression": "<string>",
"lead_filters": [{}],
"workflow_filters": "<unknown>",
"max_leads_per_cycle": 123,
"cooldown_minutes": 123,
"dry_run": True,
"is_active": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
steps: [{conditions: [{}], on_match: {}, on_no_match: {}, action: {}}],
description: '<string>',
trigger_type: 'cron',
cron_expression: '<string>',
lead_filters: [{}],
workflow_filters: '<unknown>',
max_leads_per_cycle: 123,
cooldown_minutes: 123,
dry_run: true,
is_active: true
})
};
fetch('https://api.getnexor.ai/api/public/background-jobs', 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://api.getnexor.ai/api/public/background-jobs",
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([
'name' => '<string>',
'steps' => [
[
'conditions' => [
[
]
],
'on_match' => [
],
'on_no_match' => [
],
'action' => [
]
]
],
'description' => '<string>',
'trigger_type' => 'cron',
'cron_expression' => '<string>',
'lead_filters' => [
[
]
],
'workflow_filters' => '<unknown>',
'max_leads_per_cycle' => 123,
'cooldown_minutes' => 123,
'dry_run' => true,
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.getnexor.ai/api/public/background-jobs"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"conditions\": [\n {}\n ],\n \"on_match\": {},\n \"on_no_match\": {},\n \"action\": {}\n }\n ],\n \"description\": \"<string>\",\n \"trigger_type\": \"cron\",\n \"cron_expression\": \"<string>\",\n \"lead_filters\": [\n {}\n ],\n \"workflow_filters\": \"<unknown>\",\n \"max_leads_per_cycle\": 123,\n \"cooldown_minutes\": 123,\n \"dry_run\": true,\n \"is_active\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.getnexor.ai/api/public/background-jobs")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"conditions\": [\n {}\n ],\n \"on_match\": {},\n \"on_no_match\": {},\n \"action\": {}\n }\n ],\n \"description\": \"<string>\",\n \"trigger_type\": \"cron\",\n \"cron_expression\": \"<string>\",\n \"lead_filters\": [\n {}\n ],\n \"workflow_filters\": \"<unknown>\",\n \"max_leads_per_cycle\": 123,\n \"cooldown_minutes\": 123,\n \"dry_run\": true,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getnexor.ai/api/public/background-jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"conditions\": [\n {}\n ],\n \"on_match\": {},\n \"on_no_match\": {},\n \"action\": {}\n }\n ],\n \"description\": \"<string>\",\n \"trigger_type\": \"cron\",\n \"cron_expression\": \"<string>\",\n \"lead_filters\": [\n {}\n ],\n \"workflow_filters\": \"<unknown>\",\n \"max_leads_per_cycle\": 123,\n \"cooldown_minutes\": 123,\n \"dry_run\": true,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"steps": [
{
"conditions": [
{}
],
"on_match": {},
"on_no_match": {},
"action": {}
}
],
"is_active": true,
"description": "<string>",
"cron_expression": "<string>",
"lead_filters": [
{}
],
"workflow_filters": "<unknown>",
"max_leads_per_cycle": 123,
"cooldown_minutes": 123,
"dry_run": true,
"created_at": "2023-11-07T05:31:56Z",
"last_executed_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key for authentication. Keys are prefixed with nxr_live_.
Body
application/json
Required array length:
1 - 3 elementsShow child attributes
Show child attributes
Available options:
cron, event, api Required for trigger_type=cron, e.g. "0 9 * * *".
Available options:
lead_scoped, workflow_scoped Target leads in given workflow(s)/status(es), e.g. [{workflow_id, status_keys:[...]}].
1-500. Defaults to 50.
Response
Background job created
Show child attributes
Show child attributes
Last modified on June 30, 2026
⌘I