Skip to main content
POST
/
public-api
/
backfills
Create a backfill
curl --request POST \
  --url https://api.neoagent.io/public-api/backfills \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "daily_execution_windows": {
    "friday": [
      {
        "run_end_time": "<string>",
        "run_start_time": "<string>"
      }
    ],
    "monday": [
      {
        "run_end_time": "<string>",
        "run_start_time": "<string>"
      }
    ],
    "saturday": [
      {
        "run_end_time": "<string>",
        "run_start_time": "<string>"
      }
    ],
    "sunday": [
      {
        "run_end_time": "<string>",
        "run_start_time": "<string>"
      }
    ],
    "thursday": [
      {
        "run_end_time": "<string>",
        "run_start_time": "<string>"
      }
    ],
    "tuesday": [
      {
        "run_end_time": "<string>",
        "run_start_time": "<string>"
      }
    ],
    "wednesday": [
      {
        "run_end_time": "<string>",
        "run_start_time": "<string>"
      }
    ]
  },
  "filter_spec": {},
  "max_in_flight": 5,
  "target_workflow_id": 123,
  "timezone": "UTC",
  "total_estimated": 123
}
'
import requests

url = "https://api.neoagent.io/public-api/backfills"

payload = {
"daily_execution_windows": {
"friday": [
{
"run_end_time": "<string>",
"run_start_time": "<string>"
}
],
"monday": [
{
"run_end_time": "<string>",
"run_start_time": "<string>"
}
],
"saturday": [
{
"run_end_time": "<string>",
"run_start_time": "<string>"
}
],
"sunday": [
{
"run_end_time": "<string>",
"run_start_time": "<string>"
}
],
"thursday": [
{
"run_end_time": "<string>",
"run_start_time": "<string>"
}
],
"tuesday": [
{
"run_end_time": "<string>",
"run_start_time": "<string>"
}
],
"wednesday": [
{
"run_end_time": "<string>",
"run_start_time": "<string>"
}
]
},
"filter_spec": {},
"max_in_flight": 5,
"target_workflow_id": 123,
"timezone": "UTC",
"total_estimated": 123
}
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({
daily_execution_windows: {
friday: [{run_end_time: '<string>', run_start_time: '<string>'}],
monday: [{run_end_time: '<string>', run_start_time: '<string>'}],
saturday: [{run_end_time: '<string>', run_start_time: '<string>'}],
sunday: [{run_end_time: '<string>', run_start_time: '<string>'}],
thursday: [{run_end_time: '<string>', run_start_time: '<string>'}],
tuesday: [{run_end_time: '<string>', run_start_time: '<string>'}],
wednesday: [{run_end_time: '<string>', run_start_time: '<string>'}]
},
filter_spec: {},
max_in_flight: 5,
target_workflow_id: 123,
timezone: 'UTC',
total_estimated: 123
})
};

fetch('https://api.neoagent.io/public-api/backfills', 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.neoagent.io/public-api/backfills",
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([
'daily_execution_windows' => [
'friday' => [
[
'run_end_time' => '<string>',
'run_start_time' => '<string>'
]
],
'monday' => [
[
'run_end_time' => '<string>',
'run_start_time' => '<string>'
]
],
'saturday' => [
[
'run_end_time' => '<string>',
'run_start_time' => '<string>'
]
],
'sunday' => [
[
'run_end_time' => '<string>',
'run_start_time' => '<string>'
]
],
'thursday' => [
[
'run_end_time' => '<string>',
'run_start_time' => '<string>'
]
],
'tuesday' => [
[
'run_end_time' => '<string>',
'run_start_time' => '<string>'
]
],
'wednesday' => [
[
'run_end_time' => '<string>',
'run_start_time' => '<string>'
]
]
],
'filter_spec' => [

],
'max_in_flight' => 5,
'target_workflow_id' => 123,
'timezone' => 'UTC',
'total_estimated' => 123
]),
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://api.neoagent.io/public-api/backfills"

payload := strings.NewReader("{\n \"daily_execution_windows\": {\n \"friday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"monday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"saturday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"sunday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"thursday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"tuesday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"wednesday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ]\n },\n \"filter_spec\": {},\n \"max_in_flight\": 5,\n \"target_workflow_id\": 123,\n \"timezone\": \"UTC\",\n \"total_estimated\": 123\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://api.neoagent.io/public-api/backfills")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"daily_execution_windows\": {\n \"friday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"monday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"saturday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"sunday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"thursday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"tuesday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"wednesday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ]\n },\n \"filter_spec\": {},\n \"max_in_flight\": 5,\n \"target_workflow_id\": 123,\n \"timezone\": \"UTC\",\n \"total_estimated\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.neoagent.io/public-api/backfills")

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 \"daily_execution_windows\": {\n \"friday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"monday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"saturday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"sunday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"thursday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"tuesday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ],\n \"wednesday\": [\n {\n \"run_end_time\": \"<string>\",\n \"run_start_time\": \"<string>\"\n }\n ]\n },\n \"filter_spec\": {},\n \"max_in_flight\": 5,\n \"target_workflow_id\": 123,\n \"timezone\": \"UTC\",\n \"total_estimated\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "backfill": {
      "completed_at": "<string>",
      "created_at": "<string>",
      "created_by": "<string>",
      "daily_execution_windows": {
        "friday": [
          {
            "run_end_time": "<string>",
            "run_start_time": "<string>"
          }
        ],
        "monday": [
          {
            "run_end_time": "<string>",
            "run_start_time": "<string>"
          }
        ],
        "saturday": [
          {
            "run_end_time": "<string>",
            "run_start_time": "<string>"
          }
        ],
        "sunday": [
          {
            "run_end_time": "<string>",
            "run_start_time": "<string>"
          }
        ],
        "thursday": [
          {
            "run_end_time": "<string>",
            "run_start_time": "<string>"
          }
        ],
        "tuesday": [
          {
            "run_end_time": "<string>",
            "run_start_time": "<string>"
          }
        ],
        "wednesday": [
          {
            "run_end_time": "<string>",
            "run_start_time": "<string>"
          }
        ]
      },
      "error": "<string>",
      "failed_count": 123,
      "filter_spec": {},
      "id": "<string>",
      "max_in_flight": 123,
      "processed_count": 123,
      "started_at": "<string>",
      "succeeded_count": 123,
      "target_workflow_id": 123,
      "target_workflow_name": "<string>",
      "timezone": "<string>",
      "total_estimated": 123,
      "parent_backfill_run_id": "<string>"
    },
    "cost_estimate": {
      "credits_per_entity": 123,
      "total_credits_estimated": 123,
      "total_entities": 123
    }
  },
  "meta": {
    "request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "timings_ms": {},
    "pagination": {
      "has_more": true,
      "next_cursor": "<string>"
    },
    "warnings": [
      "<string>"
    ]
  }
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}

Authorizations

Authorization
string
header
required

Authorization: Bearer <token> where <token> is either a neo_sk_<env>_<secret> API key (service account) or a Microsoft Entra ID access token (dashboard user).

Body

application/json
daily_execution_windows
WorkflowDailyExecutionWindows · object
required
entity_type
enum<string>
required
Available options:
ticket,
project_ticket,
task,
scheduled_entry,
time_entry,
project,
company,
contact,
resource,
contract,
opportunity,
none,
configuration,
note,
team,
role,
audit_trail,
appointment,
servicecall,
contract_service,
company_location,
product
filter_spec
Filter Spec · object
required
max_in_flight
integer
required
Required range: 1 <= x <= 10
target_workflow_id
integer
required
timezone
string
default:UTC
total_estimated
integer | null

Response

Success.

data
CreateBackfillResponse · object
required
meta
object
required