Generate a batch now
curl --request POST \
--url https://www.appstatic.io/api/v1/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"count": 15
}'import requests
url = "https://www.appstatic.io/api/v1/batches"
payload = { "count": 15 }
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({count: 15})
};
fetch('https://www.appstatic.io/api/v1/batches', 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://www.appstatic.io/api/v1/batches",
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([
'count' => 15
]),
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://www.appstatic.io/api/v1/batches"
payload := strings.NewReader("{\n \"count\": 15\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://www.appstatic.io/api/v1/batches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"count\": 15\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.appstatic.io/api/v1/batches")
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 \"count\": 15\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"market": "US",
"status": "pending",
"targetCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"metaCampaignId": "<string>",
"url": "<string>",
"ads": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"imageUrl": "<string>",
"treatment": "faithful",
"market": "<string>",
"status": "<string>",
"copyVariants": [
{
"primaryText": "<string>",
"headline": "<string>",
"cta": "<string>"
}
],
"concept": {
"slug": "<string>",
"hook": "<string>",
"visualStyle": "<string>",
"referenceBrand": "<string>",
"daysRunning": 123,
"euReach": 123
},
"metaAdId": "<string>"
}
]
}API Reference
Generate a batch now
Runs synchronously and returns the audited batch. About 15 seconds per ad with 8 rendered in parallel, so a 30-ad batch takes roughly 8 minutes; keep the connection open (the server allows 30). Each ad is rendered from a winning reference, audited for spelling and truthful claims, and re-rendered once if the audit finds something. Counts against the 14-day allowance of 30 ads per language (Global plans get a separate 30 for each enabled market), shared with the scheduled batch. One generation at a time per account.
POST
/
batches
Generate a batch now
curl --request POST \
--url https://www.appstatic.io/api/v1/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"count": 15
}'import requests
url = "https://www.appstatic.io/api/v1/batches"
payload = { "count": 15 }
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({count: 15})
};
fetch('https://www.appstatic.io/api/v1/batches', 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://www.appstatic.io/api/v1/batches",
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([
'count' => 15
]),
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://www.appstatic.io/api/v1/batches"
payload := strings.NewReader("{\n \"count\": 15\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://www.appstatic.io/api/v1/batches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"count\": 15\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.appstatic.io/api/v1/batches")
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 \"count\": 15\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"market": "US",
"status": "pending",
"targetCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"metaCampaignId": "<string>",
"url": "<string>",
"ads": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"imageUrl": "<string>",
"treatment": "faithful",
"market": "<string>",
"status": "<string>",
"copyVariants": [
{
"primaryText": "<string>",
"headline": "<string>",
"cta": "<string>"
}
],
"concept": {
"slug": "<string>",
"hook": "<string>",
"visualStyle": "<string>",
"referenceBrand": "<string>",
"daysRunning": 123,
"euReach": 123
},
"metaAdId": "<string>"
}
]
}Authorizations
API key from Settings → API & agents (as_live_…)
Body
application/json
Response
The finished batch with ads