Submit a numerical or registered-metric forecast
Requires forecast:submit. Retain the original payload and Idempotency-Key for uncertain retries. Request body limit: 1 MiB.
POST
/
api
/
forecasts
Submit a numerical or registered-metric forecast
curl --request POST \
--url https://build.aioncx.com/api/forecasts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"method": "auto",
"source": {
"type": "numerical",
"grain": "day",
"timezone": "UTC",
"historyStart": "2026-01-01T00:00:00Z",
"horizon": 4,
"series": [
{
"id": "daily-contacts",
"values": [
42,
45,
48,
43,
51,
36,
31,
44,
47,
50,
46,
54,
38,
33,
46,
49,
52,
48,
56,
40,
35,
48,
51,
54,
50,
58,
42,
37
]
}
]
}
}
'import requests
url = "https://build.aioncx.com/api/forecasts"
payload = {
"method": "auto",
"source": {
"type": "numerical",
"grain": "day",
"timezone": "UTC",
"historyStart": "2026-01-01T00:00:00Z",
"horizon": 4,
"series": [
{
"id": "daily-contacts",
"values": [42, 45, 48, 43, 51, 36, 31, 44, 47, 50, 46, 54, 38, 33, 46, 49, 52, 48, 56, 40, 35, 48, 51, 54, 50, 58, 42, 37]
}
]
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
method: 'auto',
source: {
type: 'numerical',
grain: 'day',
timezone: 'UTC',
historyStart: '2026-01-01T00:00:00Z',
horizon: 4,
series: [
{
id: 'daily-contacts',
values: [
42,
45,
48,
43,
51,
36,
31,
44,
47,
50,
46,
54,
38,
33,
46,
49,
52,
48,
56,
40,
35,
48,
51,
54,
50,
58,
42,
37
]
}
]
}
})
};
fetch('https://build.aioncx.com/api/forecasts', 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://build.aioncx.com/api/forecasts",
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([
'method' => 'auto',
'source' => [
'type' => 'numerical',
'grain' => 'day',
'timezone' => 'UTC',
'historyStart' => '2026-01-01T00:00:00Z',
'horizon' => 4,
'series' => [
[
'id' => 'daily-contacts',
'values' => [
42,
45,
48,
43,
51,
36,
31,
44,
47,
50,
46,
54,
38,
33,
46,
49,
52,
48,
56,
40,
35,
48,
51,
54,
50,
58,
42,
37
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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://build.aioncx.com/api/forecasts"
payload := strings.NewReader("{\n \"method\": \"auto\",\n \"source\": {\n \"type\": \"numerical\",\n \"grain\": \"day\",\n \"timezone\": \"UTC\",\n \"historyStart\": \"2026-01-01T00:00:00Z\",\n \"horizon\": 4,\n \"series\": [\n {\n \"id\": \"daily-contacts\",\n \"values\": [\n 42,\n 45,\n 48,\n 43,\n 51,\n 36,\n 31,\n 44,\n 47,\n 50,\n 46,\n 54,\n 38,\n 33,\n 46,\n 49,\n 52,\n 48,\n 56,\n 40,\n 35,\n 48,\n 51,\n 54,\n 50,\n 58,\n 42,\n 37\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://build.aioncx.com/api/forecasts")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"auto\",\n \"source\": {\n \"type\": \"numerical\",\n \"grain\": \"day\",\n \"timezone\": \"UTC\",\n \"historyStart\": \"2026-01-01T00:00:00Z\",\n \"horizon\": 4,\n \"series\": [\n {\n \"id\": \"daily-contacts\",\n \"values\": [\n 42,\n 45,\n 48,\n 43,\n 51,\n 36,\n 31,\n 44,\n 47,\n 50,\n 46,\n 54,\n 38,\n 33,\n 46,\n 49,\n 52,\n 48,\n 56,\n 40,\n 35,\n 48,\n 51,\n 54,\n 50,\n 58,\n 42,\n 37\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://build.aioncx.com/api/forecasts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"auto\",\n \"source\": {\n \"type\": \"numerical\",\n \"grain\": \"day\",\n \"timezone\": \"UTC\",\n \"historyStart\": \"2026-01-01T00:00:00Z\",\n \"horizon\": 4,\n \"series\": [\n {\n \"id\": \"daily-contacts\",\n \"values\": [\n 42,\n 45,\n 48,\n 43,\n 51,\n 36,\n 31,\n 44,\n 47,\n 50,\n 46,\n 54,\n 38,\n 33,\n 46,\n 49,\n 52,\n 48,\n 56,\n 40,\n 35,\n 48,\n 51,\n 54,\n 50,\n 58,\n 42,\n 37\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"results_url": "<string>",
"price": {}
}{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"results_url": "<string>",
"price": {}
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}Authorizations
A scoped Mach-1 atlas_ingest_ key with forecast:submit and/or forecast:read. Ingestion scopes alone do not grant forecasting.
Headers
Stable caller-generated key. Reuse only with the same request.
Required string length:
1 - 256Query Parameters
Select a granted workspace. Required when a credential grants multiple workspaces.
Body
application/json
⌘I
Submit a numerical or registered-metric forecast
curl --request POST \
--url https://build.aioncx.com/api/forecasts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"method": "auto",
"source": {
"type": "numerical",
"grain": "day",
"timezone": "UTC",
"historyStart": "2026-01-01T00:00:00Z",
"horizon": 4,
"series": [
{
"id": "daily-contacts",
"values": [
42,
45,
48,
43,
51,
36,
31,
44,
47,
50,
46,
54,
38,
33,
46,
49,
52,
48,
56,
40,
35,
48,
51,
54,
50,
58,
42,
37
]
}
]
}
}
'import requests
url = "https://build.aioncx.com/api/forecasts"
payload = {
"method": "auto",
"source": {
"type": "numerical",
"grain": "day",
"timezone": "UTC",
"historyStart": "2026-01-01T00:00:00Z",
"horizon": 4,
"series": [
{
"id": "daily-contacts",
"values": [42, 45, 48, 43, 51, 36, 31, 44, 47, 50, 46, 54, 38, 33, 46, 49, 52, 48, 56, 40, 35, 48, 51, 54, 50, 58, 42, 37]
}
]
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
method: 'auto',
source: {
type: 'numerical',
grain: 'day',
timezone: 'UTC',
historyStart: '2026-01-01T00:00:00Z',
horizon: 4,
series: [
{
id: 'daily-contacts',
values: [
42,
45,
48,
43,
51,
36,
31,
44,
47,
50,
46,
54,
38,
33,
46,
49,
52,
48,
56,
40,
35,
48,
51,
54,
50,
58,
42,
37
]
}
]
}
})
};
fetch('https://build.aioncx.com/api/forecasts', 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://build.aioncx.com/api/forecasts",
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([
'method' => 'auto',
'source' => [
'type' => 'numerical',
'grain' => 'day',
'timezone' => 'UTC',
'historyStart' => '2026-01-01T00:00:00Z',
'horizon' => 4,
'series' => [
[
'id' => 'daily-contacts',
'values' => [
42,
45,
48,
43,
51,
36,
31,
44,
47,
50,
46,
54,
38,
33,
46,
49,
52,
48,
56,
40,
35,
48,
51,
54,
50,
58,
42,
37
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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://build.aioncx.com/api/forecasts"
payload := strings.NewReader("{\n \"method\": \"auto\",\n \"source\": {\n \"type\": \"numerical\",\n \"grain\": \"day\",\n \"timezone\": \"UTC\",\n \"historyStart\": \"2026-01-01T00:00:00Z\",\n \"horizon\": 4,\n \"series\": [\n {\n \"id\": \"daily-contacts\",\n \"values\": [\n 42,\n 45,\n 48,\n 43,\n 51,\n 36,\n 31,\n 44,\n 47,\n 50,\n 46,\n 54,\n 38,\n 33,\n 46,\n 49,\n 52,\n 48,\n 56,\n 40,\n 35,\n 48,\n 51,\n 54,\n 50,\n 58,\n 42,\n 37\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://build.aioncx.com/api/forecasts")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"auto\",\n \"source\": {\n \"type\": \"numerical\",\n \"grain\": \"day\",\n \"timezone\": \"UTC\",\n \"historyStart\": \"2026-01-01T00:00:00Z\",\n \"horizon\": 4,\n \"series\": [\n {\n \"id\": \"daily-contacts\",\n \"values\": [\n 42,\n 45,\n 48,\n 43,\n 51,\n 36,\n 31,\n 44,\n 47,\n 50,\n 46,\n 54,\n 38,\n 33,\n 46,\n 49,\n 52,\n 48,\n 56,\n 40,\n 35,\n 48,\n 51,\n 54,\n 50,\n 58,\n 42,\n 37\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://build.aioncx.com/api/forecasts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"auto\",\n \"source\": {\n \"type\": \"numerical\",\n \"grain\": \"day\",\n \"timezone\": \"UTC\",\n \"historyStart\": \"2026-01-01T00:00:00Z\",\n \"horizon\": 4,\n \"series\": [\n {\n \"id\": \"daily-contacts\",\n \"values\": [\n 42,\n 45,\n 48,\n 43,\n 51,\n 36,\n 31,\n 44,\n 47,\n 50,\n 46,\n 54,\n 38,\n 33,\n 46,\n 49,\n 52,\n 48,\n 56,\n 40,\n 35,\n 48,\n 51,\n 54,\n 50,\n 58,\n 42,\n 37\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"results_url": "<string>",
"price": {}
}{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"results_url": "<string>",
"price": {}
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}{
"error": "<string>",
"retryable": true
}