ad10 Geliştiriciler v1
Reklam API'si
Hızlı başlangıç, aranabilir endpoint'ler ve sözleşmeden üretilen kod örnekleri.
Rehberler / 01
İlk API isteğini gönder.
Uygulamanı oluştur, erişim sınırlarını belirle ve ilk reklam işini hazırlat. Rehberlerden başlayabilir veya doğrudan bir endpoint seçebilirsin.
Bir uygulama oluştur
Entegrasyonuna bir ad ver; gerekiyorsa OAuth dönüş adreslerini ekle.
Erişimin sınırlarını belirle
Çalışma alanını, reklam hesaplarını, yetkileri ve kredi limitlerini seç.
Sunucundan bağlan
Erişim belirtecini güvenle sakla. API rehberindeki örnekle ilk isteğini gönder.
curl --request POST 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/ad-jobs' \
--header 'Authorization: Bearer <grant-bound-access-token>' \
--header 'Idempotency-Key: example-campaign-v1' \
--header 'Content-Type: application/json' \
--data '{"website_url":"https://example.com/product","business_description":"We provide office coffee subscriptions for businesses in Istanbul.","objective":"leads","market":{"countries":["TR"],"languages":["tr"]},"execution":{"mode":"prepare","approval":"in_app"},"ai":{"model":"auto","allow_api_fallback":false,"max_credits":"50"},"channels":[{"account_id":"11111111-1111-4111-8111-111111111111","budget":{"type":"daily","amount":"100.00","currency":"TRY"},"product":"meta_ads","identity":{"page_id":"connected-page-id"}}],"metadata":{}}'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.createAdJob({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111"
},
"body": {
"website_url": "https://example.com/product",
"business_description": "We provide office coffee subscriptions for businesses in Istanbul.",
"objective": "leads",
"market": {
"countries": [
"TR"
],
"languages": [
"tr"
]
},
"execution": {
"mode": "prepare",
"approval": "in_app"
},
"ai": {
"model": "auto",
"allow_api_fallback": false,
"max_credits": "50"
},
"channels": [
{
"account_id": "11111111-1111-4111-8111-111111111111",
"budget": {
"type": "daily",
"amount": "100.00",
"currency": "TRY"
},
"product": "meta_ads",
"identity": {
"page_id": "connected-page-id"
}
}
],
"metadata": {}
},
"idempotencyKey": "example-campaign-v1"
});Örnekler kurgusal kimlikler ve placeholder belirteçler içerir. Gerçek hesap kimliklerinizi ve yalnız sunucuda saklanan erişim belirtecinizi kullanın. Bu örnekler reklam yayınlandığına dair bir sonuç göstermez.
createAdJobOAuth 2.1 / PKCE
Güvenli başlangıç
Uygulama oluşturun, çalışma alanı ve hesaplara açık izin verin. Sağlayıcı parolalarını veya oturum belirteçlerini paylaşmayın.
OAuth yetkilendirme akışı
authorization_code akışını S256 PKCE ve state ile kullan. Erişimi kullanıcı yetkilendirir; istemci sırrı gerekmez.
- 01
Uygulama kaydet
Konsolda bir uygulama oluştur. Uygulamanın UUID'sini client_id olarak ve kayıtlı adresle birebir aynı redirect_uri değerini kullan. API çağrılarından önce çalışma alanı ve hesap iznini etkinleştir.
- 02
Yetkilendirme iste
Yeni bir code_verifier ve S256 code_challenge oluştur. state değerini sakla ve kodu değiştirmeden önce dönen değeri doğrula.
- 03
Kodu token ile değiştir
Tek kullanımlık kodu ilk code_verifier, client_id ve birebir aynı redirect_uri ile değiştir.
- 04
Token'ları yenile
refresh_token akışını kullan. Her yenilemede dönen yeni refresh token değerini sakla; önceki token geçersiz olur.
İstemci sırrı taşımayan uygulamalar PKCE kullanır; client_secret veya HTTP Basic kimlik doğrulaması göndermez.
import { randomBytes, createHash } from "node:crypto";
const verifier = randomBytes(32).toString('base64url');
const state = randomBytes(24).toString('base64url');
const url = new URL('https://app.ad10.app/api/developer/oauth/authorize');
url.search = new URLSearchParams({
client_id: process.env.AD10_APP_ID,
redirect_uri: process.env.AD10_REDIRECT_URI,
response_type: 'code',
scope: 'ad_jobs:create ad_jobs:read',
code_challenge: createHash('sha256').update(verifier).digest('base64url'),
code_challenge_method: 'S256',
state,
}).toString();
console.log(url.href);curl 'https://app.ad10.app/api/developer/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode "grant_type=authorization_code" \
--data-urlencode "client_id=$AD10_APP_ID" \
--data-urlencode "redirect_uri=$AD10_REDIRECT_URI" \
--data-urlencode "code=$AD10_AUTHORIZATION_CODE" \
--data-urlencode "code_verifier=$AD10_CODE_VERIFIER"curl 'https://app.ad10.app/api/developer/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode "grant_type=refresh_token" \
--data-urlencode "client_id=$AD10_APP_ID" \
--data-urlencode "refresh_token=$AD10_REFRESH_TOKEN"curl 'https://app.ad10.app/api/developer/oauth/revoke' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode "client_id=$AD10_APP_ID" \
--data-urlencode "token=$AD10_REFRESH_TOKEN"OAuth uç noktaları
- Yetkilendirme isteği
https://app.ad10.app/api/developer/oauth/authorize- Kod değişimi
https://app.ad10.app/api/developer/oauth/token- Token iptali
https://app.ad10.app/api/developer/oauth/revoke
Bearer token gönder
API isteklerinde erişim token'ını Authorization: Bearer başlığında gönder.
Authorization: Bearer <access_token>En az gerekli yetki
Yalnız işlem için gereken kapsamları iste. Uygulama, çalışma alanı, hesap ve rol sınırları geçerliliğini korur.
accounts:readad_jobs:createad_jobs:readcreatives:generatecampaigns:proposecampaigns:publishwebhooks:manageusage:read
Yetkilendirme hataları
401 / unauthorized- 401: erişim token'ı geçersiz veya süresi dolmuş. Yenile veya yeniden yetkilendir.
403 / forbidden- 403: kapsam, hesap izni veya rol bu işleme izin vermiyor.
invalid_grant- invalid_grant: kod kullanılmış, süresi dolmuş veya PKCE verifier eşleşmiyor.
OAuth keşif belgesi
{
"issuer": "https://app.ad10.app/api/developer",
"authorization_endpoint": "https://app.ad10.app/api/developer/oauth/authorize",
"token_endpoint": "https://app.ad10.app/api/developer/oauth/token",
"revocation_endpoint": "https://app.ad10.app/api/developer/oauth/revoke",
"response_types_supported": [
"code"
],
"grant_types_supported": [
"authorization_code",
"refresh_token"
],
"code_challenge_methods_supported": [
"S256"
],
"token_endpoint_auth_methods_supported": [
"none"
],
"revocation_endpoint_auth_methods_supported": [
"none"
],
"scopes_supported": [
"accounts:read",
"ad_jobs:create",
"ad_jobs:read",
"creatives:generate",
"campaigns:propose",
"campaigns:publish",
"webhooks:manage",
"usage:read"
]
}{
"resource": "https://app.ad10.app/api/developer/v1",
"authorization_servers": [
"https://app.ad10.app/api/developer"
],
"bearer_methods_supported": [
"header"
],
"scopes_supported": [
"accounts:read",
"ad_jobs:create",
"ad_jobs:read",
"creatives:generate",
"campaigns:propose",
"campaigns:publish",
"webhooks:manage",
"usage:read"
]
}İncele
Hazırlayın, inceleyin, sonra yayınlayın
Hazırlama, duraklatılmış reklam oluşturma ve etkinleştirme farklı izinlerdir. Başarılı bir iş, reklamın gösterildiği anlamına gelmez.
prepare- prepare isteği doğrular ve incelenebilir bir plan hazırlar; sağlayıcıda hiçbir şey oluşturmaz.
create_paused- create_paused gerekli izinleri ve sağlayıcı kontrollerini gerektirir; oluşturulan öğeler duraklatılmış kalır.
activate- activate ayrı ve açık onay ile publish kapsamı gerektirir. Sağlayıcının kabulü veya işin başarısı, reklam incelemesini ya da gösterimi kanıtlamaz.
Her yetki sınırını kontrol et
Her işlemden önce çalışma alanı ve hesap iznini, rolü, gerekli en dar kapsamı, güncel kaynak revizyonunu ve sağlayıcı ön koşullarını kontrol et.
preparecreate_pausedactivate
Webhook'lar / Olaylar
Asenkron sonuçlar
İşleri API'den okuyun veya imzalı webhook alın. Tekrar denemelerde aynı idempotency anahtarını kullanın.
İş kimliğini sakla
Dönen iş kimliğini kalıcı olarak sakla. Durumu düzenli sorgula ve güncellemeler için webhook kullan; sonraki adıma karar vermeden önce güncel işi oku.
curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/ad-jobs/22222222-2222-4222-8222-222222222222' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.getAdJob({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"job_id": "22222222-2222-4222-8222-222222222222"
}
});Webhook olaylarını doğrula
İşlemeden önce imzayı ham istek gövdesi ve zaman damgasıyla doğrula. Olay kimliğine göre yinelenenleri ayıkla.
Sonuçlar / Medya
Sonuçları kendi uygulamanda göster
İmzalı webhook'u doğrula ve olay kimliğiyle tekrarları ayıkla. Sunucundaki API anahtarıyla sürümlü iş sonucunu oku; hedefi, stratejiyi, metinleri, kontrolleri ve kredi dökümünü göster. Kreatif erişimini ayrıca al; kısa süreli medya bağlantıları webhook içeriğine konulmaz.
Gerçek sonuçları oku
Yapılandırılmış sonucu oku; çıktıları kimlikleriyle yetkili uç noktadan al. Bir sonucun veya çıktının bulunması, tüm işin başarılı olduğu anlamına gelmez.
curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/ad-jobs/22222222-2222-4222-8222-222222222222/result' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.getAdJobResult({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"job_id": "22222222-2222-4222-8222-222222222222"
}
});Rehberler
Durumlar ve olaylar
Durumları ve olayları izle
Güncel durumu olaylarıyla birlikte oku. Devam eden işlemi, beklemeyi ve sonlanmış sonuçları ayır; takip için iş kimliğini sakla.
- Bekleme durumlarını ele al
- İşin neden beklediğini oku: girdi, açık onay veya hesabın yeniden bağlanması gerekebilir. Beklemek tamamlanmak değildir.
- Belirsiz sonucu uzlaştır
- Yanıt belirsizse veya kaybolduysa önce güncel işi ya da işlemi oku. Yazmayı yalnız aynı Idempotency-Key ve birebir aynı gövdeyle yeniden dene; körlemesine tekrarlama.
- Sonlanmış sonuçları ayrı tut
- succeeded, partial, failed ve cancelled farklı sonuçlardır. Her işlemin sonucunu ve hatalarını incele; sonlanmış durum gösterimi kanıtlamaz.
İş durumları
queuedrunningwaiting_capacityrequires_inputrequires_approvalrequires_reconnectneeds_reconciliationcancel_requestedsucceededpartially_succeededfailedcancelled
Çalıştırma biçimleri
preparecreate_pausedactivate
Webhook olayları
ad_job.updatedad_job.requires_inputad_job.requires_approvalad_job.requires_reconnectad_job.succeededad_job.partially_succeededad_job.failedad_job.cancelledbilling.settledad.review_changed
Zapier ile bağlayın
Mevcut site URL'si ve işletme açıklamasını CRM, form veya tablo tetikleyicinizden alın. Bu akış yeni site oluşturmaz.
Geliştirici konsoluBağlantı ve yetki
Konsolda uygulama ve açık çalışma alanı/hesap izni oluşturun. Sınırlı kişisel belirteci yalnız korunan kimlik bilgisi olarak saklayın; sağlayıcı parolası veya uygulama oturumu kullanmayın.
Teklif ve iş oluşturma
Aşağıdaki doğrulanmış örneği kendi alanlarınızla eşleyin. Teklif ve iş oluşturma ayrı komutlardır. Ağ tekrarında aynı semantik istek için aynı idempotency anahtarını koruyun; kabul, reklamın gösterildiği anlamına gelmez.
Sonuç ve kurtarma
İş kimliğini ve sürümünü kaydedin. Yetkili GET/polling veya imzalı olayları kullanın. Girdi, onay, yeniden bağlantı veya mutabakat gerektiğinde durun; kısmi başarıda bütün işi yeniden oluşturmayın.
Catch Hook ve imza
Aboneliği gerçek işlemle oluşturun. Ham gövde imzası doğrulanamıyorsa callback yalnız uyandırma sinyalidir; sonucu token ile GET'ten okuyun. Doğrulanmış olay gövdesindeki id ile dedup yapın; teslim denemesi kimliği bunun yerine geçmez.
Teklif ve iş oluşturma
{
"method": "POST",
"url": "https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/quotes",
"headers": {
"Authorization": "Bearer <grant-bound-access-token>",
"Idempotency-Key": "example-quote-v1",
"Content-Type": "application/json"
},
"body": {
"website_url": "https://example.com/product",
"business_description": "We provide office coffee subscriptions for businesses in Istanbul.",
"objective": "leads",
"market": {
"countries": [
"TR"
],
"languages": [
"tr"
]
},
"execution": {
"mode": "prepare",
"approval": "in_app"
},
"ai": {
"model": "auto",
"allow_api_fallback": false,
"max_credits": "50"
},
"channels": [
{
"account_id": "11111111-1111-4111-8111-111111111111",
"budget": {
"type": "daily",
"amount": "100.00",
"currency": "TRY"
},
"product": "meta_ads",
"identity": {
"page_id": "connected-page-id"
}
}
],
"metadata": {}
}
}Kanonik webhook başlıkları
- signature:
- X-Ad10-Signature
- event:
- X-Ad10-Event
- delivery:
- X-Ad10-Delivery
Native Zapier uygulaması: yayımlanmamış tasarım
Public-client PKCE S256, güvenli verifier saklama, exact redirect, refresh rotasyonu ve REST-hook sahipliği doğrulanmadan hazır OAuth uygulaması iddiası yoktur. Client secret veya otomatik HMAC doğrulaması varsayılmaz.
Rehberler
Şemalar ve SDK
OpenAPI, SDK ve tipleri belgeden ayrılmadan burada görüntüle, kopyala veya indir.
OpenAPI
https://app.ad10.app/api/developer/openapi.jsonJavaScript SDK
https://app.ad10.app/api/developer/sdk.mjsTip tanımları
https://app.ad10.app/api/developer/sdk.d.mtsEndpoint'ler / v1
listAutomationConnections
/api/developer/v1/workspaces/{workspace_id}/automation-connectionsList grant-bound automation templates without keys.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"limit": {
"default": 5,
"type": "integer",
"minimum": 1,
"maximum": 5
}
},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"items": {
"maxItems": 5,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"grantId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"active": {
"type": "boolean"
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"products": {
"default": [],
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
}
},
"keyHint": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"lastInvokedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"config": {
"type": "object",
"properties": {
"template": {
"type": "object",
"properties": {
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"objective": {
"type": "string",
"enum": [
"leads",
"traffic",
"conversions",
"awareness",
"engagement",
"app_installs"
]
},
"market": {
"type": "object",
"properties": {
"countries": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"
}
}
},
"required": [
"countries",
"languages"
],
"additionalProperties": false
},
"execution": {
"default": {
"mode": "prepare",
"approval": "in_app"
},
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"prepare",
"create_paused",
"activate"
]
},
"approval": {
"default": "in_app",
"type": "string",
"enum": [
"in_app",
"delegated"
]
},
"delegation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"mode",
"approval"
],
"additionalProperties": false
},
"ai": {
"type": "object",
"properties": {
"model": {
"default": "auto",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"allow_api_fallback": {
"default": false,
"type": "boolean"
},
"max_credits": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
}
},
"required": [
"model",
"allow_api_fallback",
"max_credits"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "meta_ads"
},
"measurement": {
"type": "object",
"properties": {
"pixel_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"event": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"lead_form_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"application_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"object_store_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
}
},
"additionalProperties": false
},
"identity": {
"type": "object",
"properties": {
"page_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"instagram_user_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"page_id"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "daily"
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_action_ids": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
}
},
"youtube_channel_confirmation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
"format": {
"type": "string",
"const": "demand_gen_video"
},
"placements": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"youtube_in_stream",
"youtube_in_feed",
"youtube_shorts"
]
}
}
},
"required": [
"account_id",
"budget",
"product",
"format",
"placements"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"lead_form_urn": {
"type": "string",
"pattern": "^urn:li:adForm:[1-9]\\d{0,49}$"
}
},
"additionalProperties": false
},
"political_intent": {
"type": "string",
"enum": [
"NOT_POLITICAL",
"POLITICAL",
"NOT_DECLARED"
]
},
"identity": {
"type": "object",
"properties": {
"organization_urn": {
"type": "string",
"pattern": "^urn:li:organization:\\d+$"
}
},
"required": [
"organization_urn"
],
"additionalProperties": false
},
"locale": {
"type": "object",
"properties": {
"country": {
"type": "string",
"pattern": "^[A-Z]{2}$"
},
"language": {
"type": "string",
"pattern": "^[a-z]{2}$"
}
},
"required": [
"country",
"language"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
}
]
}
},
"webhook_subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"metadata": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,64}$"
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
}
},
"required": [
"website_url",
"business_description",
"objective",
"market",
"execution",
"ai",
"channels",
"metadata"
],
"additionalProperties": false
},
"variables": {
"maxItems": 24,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"type": {
"type": "string",
"enum": [
"text",
"url",
"number",
"boolean",
"media_id",
"video_id"
]
},
"required": {
"default": true,
"type": "boolean"
},
"defaultValue": {
"anyOf": [
{
"type": "string",
"maxLength": 8000
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"targetPath": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"sourcePath": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
}
},
"required": [
"key",
"label",
"type",
"required",
"targetPath"
],
"additionalProperties": false
}
}
},
"required": [
"template",
"variables"
],
"additionalProperties": false
}
},
"required": [
"id",
"workspaceId",
"grantId",
"name",
"active",
"version",
"expiresAt",
"createdAt",
"updatedAt",
"environment",
"products",
"config"
],
"additionalProperties": false
}
},
"nextCursor": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"required": [
"items",
"nextCursor"
],
"additionalProperties": false
}curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/automation-connections' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.listAutomationConnections({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111"
}
});Endpoint'ler / v1
getAutomationConnection
/api/developer/v1/workspaces/{workspace_id}/automation-connections/{connection_id}Read one authorized versioned automation template and declared fields.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"connection_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"connection_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"grantId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"active": {
"type": "boolean"
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"products": {
"default": [],
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
}
},
"keyHint": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"lastInvokedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"config": {
"type": "object",
"properties": {
"template": {
"type": "object",
"properties": {
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"objective": {
"type": "string",
"enum": [
"leads",
"traffic",
"conversions",
"awareness",
"engagement",
"app_installs"
]
},
"market": {
"type": "object",
"properties": {
"countries": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"
}
}
},
"required": [
"countries",
"languages"
],
"additionalProperties": false
},
"execution": {
"default": {
"mode": "prepare",
"approval": "in_app"
},
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"prepare",
"create_paused",
"activate"
]
},
"approval": {
"default": "in_app",
"type": "string",
"enum": [
"in_app",
"delegated"
]
},
"delegation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"mode",
"approval"
],
"additionalProperties": false
},
"ai": {
"type": "object",
"properties": {
"model": {
"default": "auto",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"allow_api_fallback": {
"default": false,
"type": "boolean"
},
"max_credits": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
}
},
"required": [
"model",
"allow_api_fallback",
"max_credits"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "meta_ads"
},
"measurement": {
"type": "object",
"properties": {
"pixel_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"event": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"lead_form_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"application_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"object_store_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
}
},
"additionalProperties": false
},
"identity": {
"type": "object",
"properties": {
"page_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"instagram_user_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"page_id"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "daily"
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_action_ids": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
}
},
"youtube_channel_confirmation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
"format": {
"type": "string",
"const": "demand_gen_video"
},
"placements": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"youtube_in_stream",
"youtube_in_feed",
"youtube_shorts"
]
}
}
},
"required": [
"account_id",
"budget",
"product",
"format",
"placements"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"lead_form_urn": {
"type": "string",
"pattern": "^urn:li:adForm:[1-9]\\d{0,49}$"
}
},
"additionalProperties": false
},
"political_intent": {
"type": "string",
"enum": [
"NOT_POLITICAL",
"POLITICAL",
"NOT_DECLARED"
]
},
"identity": {
"type": "object",
"properties": {
"organization_urn": {
"type": "string",
"pattern": "^urn:li:organization:\\d+$"
}
},
"required": [
"organization_urn"
],
"additionalProperties": false
},
"locale": {
"type": "object",
"properties": {
"country": {
"type": "string",
"pattern": "^[A-Z]{2}$"
},
"language": {
"type": "string",
"pattern": "^[a-z]{2}$"
}
},
"required": [
"country",
"language"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
}
]
}
},
"webhook_subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"metadata": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,64}$"
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
}
},
"required": [
"website_url",
"business_description",
"objective",
"market",
"execution",
"ai",
"channels",
"metadata"
],
"additionalProperties": false
},
"variables": {
"maxItems": 24,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"type": {
"type": "string",
"enum": [
"text",
"url",
"number",
"boolean",
"media_id",
"video_id"
]
},
"required": {
"default": true,
"type": "boolean"
},
"defaultValue": {
"anyOf": [
{
"type": "string",
"maxLength": 8000
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"targetPath": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"sourcePath": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
}
},
"required": [
"key",
"label",
"type",
"required",
"targetPath"
],
"additionalProperties": false
}
}
},
"required": [
"template",
"variables"
],
"additionalProperties": false
}
},
"required": [
"id",
"workspaceId",
"grantId",
"name",
"active",
"version",
"expiresAt",
"createdAt",
"updatedAt",
"environment",
"products",
"config"
],
"additionalProperties": false
}curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/automation-connections/11111111-1111-4111-8111-111111111111' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.getAutomationConnection({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"connection_id": "11111111-1111-4111-8111-111111111111"
}
});Endpoint'ler / v1
validateAutomationInput
/api/developer/v1/workspaces/{workspace_id}/automation-connections/{connection_id}/validateValidate mapped fields without AI, job admission or provider writes.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"connection_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"connection_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"fields": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"additionalProperties": {},
"maxProperties": 100,
"description": "Template field values; at most 100 keys per object and 8 nested levels."
},
"expected_version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"fields"
],
"additionalProperties": false
}
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"type": "object",
"properties": {
"valid": {
"type": "boolean",
"const": true
},
"input": {
"type": "object",
"properties": {
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"objective": {
"type": "string",
"enum": [
"leads",
"traffic",
"conversions",
"awareness",
"engagement",
"app_installs"
]
},
"market": {
"type": "object",
"properties": {
"countries": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"
}
}
},
"required": [
"countries",
"languages"
],
"additionalProperties": false
},
"execution": {
"default": {
"mode": "prepare",
"approval": "in_app"
},
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"prepare",
"create_paused",
"activate"
]
},
"approval": {
"default": "in_app",
"type": "string",
"enum": [
"in_app",
"delegated"
]
},
"delegation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"mode",
"approval"
],
"additionalProperties": false
},
"ai": {
"type": "object",
"properties": {
"model": {
"default": "auto",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"allow_api_fallback": {
"default": false,
"type": "boolean"
},
"max_credits": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
}
},
"required": [
"model",
"allow_api_fallback",
"max_credits"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "meta_ads"
},
"measurement": {
"type": "object",
"properties": {
"pixel_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"event": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"lead_form_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"application_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"object_store_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
}
},
"additionalProperties": false
},
"identity": {
"type": "object",
"properties": {
"page_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"instagram_user_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"page_id"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "daily"
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_action_ids": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
}
},
"youtube_channel_confirmation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
"format": {
"type": "string",
"const": "demand_gen_video"
},
"placements": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"youtube_in_stream",
"youtube_in_feed",
"youtube_shorts"
]
}
}
},
"required": [
"account_id",
"budget",
"product",
"format",
"placements"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"lead_form_urn": {
"type": "string",
"pattern": "^urn:li:adForm:[1-9]\\d{0,49}$"
}
},
"additionalProperties": false
},
"political_intent": {
"type": "string",
"enum": [
"NOT_POLITICAL",
"POLITICAL",
"NOT_DECLARED"
]
},
"identity": {
"type": "object",
"properties": {
"organization_urn": {
"type": "string",
"pattern": "^urn:li:organization:\\d+$"
}
},
"required": [
"organization_urn"
],
"additionalProperties": false
},
"locale": {
"type": "object",
"properties": {
"country": {
"type": "string",
"pattern": "^[A-Z]{2}$"
},
"language": {
"type": "string",
"pattern": "^[a-z]{2}$"
}
},
"required": [
"country",
"language"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
}
]
}
},
"webhook_subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"metadata": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,64}$"
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
}
},
"required": [
"website_url",
"business_description",
"objective",
"market",
"execution",
"ai",
"channels",
"metadata"
],
"additionalProperties": false
},
"issues": {
"minItems": 0,
"maxItems": 0,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"path": {
"type": "array",
"items": {
"type": "string"
}
},
"code": {
"type": "string"
}
},
"required": [
"path",
"code"
],
"additionalProperties": false
}
}
},
"required": [
"valid",
"input",
"issues"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"valid": {
"type": "boolean",
"const": false
},
"issues": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"path": {
"type": "array",
"items": {
"type": "string"
}
},
"code": {
"type": "string"
}
},
"required": [
"path",
"code"
],
"additionalProperties": false
}
}
},
"required": [
"valid",
"issues"
],
"additionalProperties": false
}
]
}curl --request POST 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/automation-connections/11111111-1111-4111-8111-111111111111/validate' \
--header 'Authorization: Bearer <grant-bound-access-token>' \
--header 'Content-Type: application/json' \
--data '{"fields":{"description":"Office coffee subscriptions"},"expected_version":1}'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.validateAutomationInput({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"connection_id": "11111111-1111-4111-8111-111111111111"
},
"body": {
"fields": {
"description": "Office coffee subscriptions"
},
"expected_version": 1
}
});Endpoint'ler / v1
runAutomationTemplate
/api/developer/v1/workspaces/{workspace_id}/automation-connections/{connection_id}/runsAdmit a bounded template run with a durable source event identity; replay returns the original job.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"connection_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"connection_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expected_version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"event_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"fields": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"additionalProperties": {},
"maxProperties": 100,
"description": "Template field values; at most 100 keys per object and 8 nested levels."
}
},
"required": [
"event_id",
"fields"
],
"additionalProperties": false
}
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"invocation": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"eventId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"templateVersion": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"jobId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"status": {
"type": "string",
"const": "accepted"
},
"jobStatus": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
}
},
"required": [
"id",
"connectionId",
"eventId",
"templateVersion",
"jobId",
"createdAt",
"status"
],
"additionalProperties": false
},
"job": {
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"object": {
"type": "string",
"const": "ad_job"
},
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
},
"phase": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"finished_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channels": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
}
},
"account_ids": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"result": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"business_summary": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"site_evidence": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"claim": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"url",
"claim"
],
"additionalProperties": false
}
},
"targeting_strategy": {
"type": "object",
"properties": {
"countries": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 2,
"maxLength": 20
}
},
"keywords": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"interests": {
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"countries",
"languages",
"keywords",
"interests",
"reasoning"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "meta_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 30
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 90
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
}
]
}
},
"requirements": {
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
}
},
"required": [
"business_summary",
"site_evidence",
"targeting_strategy",
"channels",
"requirements"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"artifacts": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"type": "string",
"enum": [
"image",
"video",
"document"
]
},
"media_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"media_id"
],
"additionalProperties": false
}
},
"billing": {
"type": "object",
"properties": {
"payer_kind": {
"type": "string",
"enum": [
"workspace",
"developer"
]
},
"payer_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"not_reserved",
"reserved",
"pending_measurement",
"settled",
"released",
"adjusted"
]
},
"reserved_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"settled_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"anyOf": [
{
"type": "string",
"const": "credits"
},
{
"type": "string",
"pattern": "^[A-Z]{3}$"
}
]
},
"pricing_version": {
"type": "string",
"maxLength": 100
}
},
"required": [
"payer_kind",
"payer_id",
"status",
"reserved_amount",
"settled_amount",
"currency"
],
"additionalProperties": false
},
"children": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"provider_reviews": {
"type": "object",
"properties": {
"coverage": {
"type": "string",
"const": "observed_only"
},
"items": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"entity_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"review": {
"type": "string",
"enum": [
"unknown",
"review",
"approved",
"limited",
"rejected"
]
},
"source": {
"type": "string",
"enum": [
"effective_status",
"policy_summary",
"review.status"
]
},
"observed_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"entity_id",
"review",
"source",
"observed_at"
],
"additionalProperties": false
}
},
"has_more": {
"type": "boolean"
}
},
"required": [
"coverage",
"items",
"has_more"
],
"additionalProperties": false
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"product": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled",
"prepared"
]
},
"proposal_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"remote_ids": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"maxLength": 300
}
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"certainty": {
"type": "string",
"enum": [
"not_started",
"confirmed",
"unknown"
]
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product",
"account_id",
"status",
"proposal_id",
"remote_ids",
"revision",
"certainty",
"error"
],
"additionalProperties": false
}
},
"requirements": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"events": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"review_in_app": {
"type": "string",
"maxLength": 2048
}
},
"required": [
"self",
"events"
],
"additionalProperties": false
}
},
"required": [
"environment",
"id",
"object",
"workspace_id",
"status",
"phase",
"version",
"created_at",
"updated_at",
"finished_at",
"website_url",
"business_description",
"channels",
"account_ids",
"result",
"artifacts",
"billing",
"children",
"requirements",
"error",
"links"
],
"additionalProperties": false
},
"duplicate": {
"type": "boolean"
}
},
"required": [
"invocation",
"job",
"duplicate"
],
"additionalProperties": false
}curl --request POST 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/automation-connections/11111111-1111-4111-8111-111111111111/runs' \
--header 'Authorization: Bearer <grant-bound-access-token>' \
--header 'Idempotency-Key: example-automation-crm-482-rev7' \
--header 'Content-Type: application/json' \
--data '{"expected_version":1,"event_id":"crm-record-482-rev7","fields":{"description":"Office coffee subscriptions"}}'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.runAutomationTemplate({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"connection_id": "11111111-1111-4111-8111-111111111111"
},
"body": {
"expected_version": 1,
"event_id": "crm-record-482-rev7",
"fields": {
"description": "Office coffee subscriptions"
}
},
"idempotencyKey": "example-automation-crm-482-rev7"
});Endpoint'ler / v1
listAutomationRuns
/api/developer/v1/workspaces/{workspace_id}/automation-connections/{connection_id}/runsList only invocations of this authorized connection.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"connection_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"connection_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"limit": {
"default": 5,
"type": "integer",
"minimum": 1,
"maximum": 5
}
},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"items": {
"maxItems": 5,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"eventId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"templateVersion": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"jobId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"status": {
"type": "string",
"const": "accepted"
},
"jobStatus": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
}
},
"required": [
"id",
"connectionId",
"eventId",
"templateVersion",
"jobId",
"createdAt",
"status"
],
"additionalProperties": false
}
},
"nextCursor": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"required": [
"items",
"nextCursor"
],
"additionalProperties": false
}curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/automation-connections/11111111-1111-4111-8111-111111111111/runs' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.listAutomationRuns({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"connection_id": "11111111-1111-4111-8111-111111111111"
}
});Endpoint'ler / v1
getAutomationRun
/api/developer/v1/workspaces/{workspace_id}/automation-connections/{connection_id}/runs/{invocation_id}Read one grant-and-connection-bound invocation before following its job reference.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"connection_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"invocation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"connection_id",
"invocation_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"eventId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"templateVersion": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"jobId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"status": {
"type": "string",
"const": "accepted"
},
"jobStatus": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
}
},
"required": [
"id",
"connectionId",
"eventId",
"templateVersion",
"jobId",
"createdAt",
"status"
],
"additionalProperties": false
}curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/automation-connections/11111111-1111-4111-8111-111111111111/runs/11111111-1111-4111-8111-111111111111' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.getAutomationRun({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"connection_id": "11111111-1111-4111-8111-111111111111",
"invocation_id": "11111111-1111-4111-8111-111111111111"
}
});Endpoint'ler / v1
listAutomationEvents
/api/developer/v1/workspaces/{workspace_id}/automation-eventsRecover connection-filtered canonical events for REST Hook samples and delivery recovery.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"limit": {
"default": 5,
"type": "integer",
"minimum": 1,
"maximum": 5
},
"connection_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"event_type": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
}
},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"items": {
"maxItems": 5,
"type": "array",
"items": {
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"sandbox_delivery": {
"type": "string",
"enum": [
"recorded",
"not_requested"
]
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"type": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
},
"schema_version": {
"type": "string",
"const": "1"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"data": {
"type": "object",
"properties": {
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
}
},
"required": [
"job_id",
"job_version",
"status"
],
"additionalProperties": false
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"subscriptionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"environment",
"id",
"type",
"schema_version",
"created_at",
"data",
"connectionId"
],
"additionalProperties": false
}
},
"nextCursor": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"required": [
"items",
"nextCursor"
],
"additionalProperties": false
}curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/automation-events' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.listAutomationEvents({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111"
}
});Endpoint'ler / v1
getAutomationEvent
/api/developer/v1/workspaces/{workspace_id}/automation-events/{event_id}Authenticate a webhook hint by reading its canonical, grant-bound event.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"event_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"event_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"connection_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"sandbox_delivery": {
"type": "string",
"enum": [
"recorded",
"not_requested"
]
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"type": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
},
"schema_version": {
"type": "string",
"const": "1"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"data": {
"type": "object",
"properties": {
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
}
},
"required": [
"job_id",
"job_version",
"status"
],
"additionalProperties": false
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"subscriptionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"environment",
"id",
"type",
"schema_version",
"created_at",
"data",
"connectionId"
],
"additionalProperties": false
}curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/automation-events/11111111-1111-4111-8111-111111111111' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.getAutomationEvent({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"event_id": "11111111-1111-4111-8111-111111111111"
}
});Endpoint'ler / v1
createAutomationSubscription
/api/developer/v1/workspaces/{workspace_id}/automation-connections/{connection_id}/subscriptionsSubscribe one Zap to this connection through the existing signed delivery outbox.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"connection_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"connection_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"events": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
}
}
},
"required": [
"url",
"events"
],
"additionalProperties": false
}
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"url_hint": {
"type": "string",
"maxLength": 2048
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
}
},
"active": {
"type": "boolean"
},
"reauthorization_required": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"connectionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"id",
"url_hint",
"events",
"active",
"created_at",
"connectionId"
],
"additionalProperties": false
}curl --request POST 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/automation-connections/11111111-1111-4111-8111-111111111111/subscriptions' \
--header 'Authorization: Bearer <grant-bound-access-token>' \
--header 'Idempotency-Key: example-automation-subscription-v1' \
--header 'Content-Type: application/json' \
--data '{"url":"https://example.org/hooks/automation","events":["ad_job.succeeded"]}'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.createAutomationSubscription({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"connection_id": "11111111-1111-4111-8111-111111111111"
},
"body": {
"url": "https://example.org/hooks/automation",
"events": [
"ad_job.succeeded"
]
},
"idempotencyKey": "example-automation-subscription-v1"
});Endpoint'ler / v1
deleteAutomationSubscription
/api/developer/v1/workspaces/{workspace_id}/automation-connections/{connection_id}/subscriptions/{subscription_id}Unsubscribe only the bound automation destination; other Zaps and existing jobs remain intact.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"connection_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"connection_id",
"subscription_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"active": {
"type": "boolean",
"const": false
}
},
"required": [
"id",
"active"
],
"additionalProperties": false
}curl --request DELETE 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/automation-connections/11111111-1111-4111-8111-111111111111/subscriptions/11111111-1111-4111-8111-111111111111' \
--header 'Authorization: Bearer <grant-bound-access-token>' \
--header 'Idempotency-Key: example-automation-unsubscribe-v1'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.deleteAutomationSubscription({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"connection_id": "11111111-1111-4111-8111-111111111111",
"subscription_id": "11111111-1111-4111-8111-111111111111"
},
"idempotencyKey": "example-automation-unsubscribe-v1"
});Endpoint'ler / v1
getMe
/api/developer/v1/meInspect the current app, actor, grant scope and payer without credentials.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"app_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"actor_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"account_ids": {
"maxItems": 500,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"scopes": {
"type": "array",
"items": {
"type": "string",
"enum": [
"accounts:read",
"ad_jobs:create",
"ad_jobs:read",
"creatives:generate",
"campaigns:propose",
"campaigns:publish",
"webhooks:manage",
"usage:read"
]
}
},
"payer": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "workspace"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "developer"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
}
]
},
"expires_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"environment",
"app_id",
"actor_id",
"workspace_id",
"account_ids",
"scopes",
"payer",
"expires_at"
],
"additionalProperties": false
}Endpoint'ler / v1
listAccounts
/api/developer/v1/workspaces/{workspace_id}/accountsList only accounts allowed by the current grant, with readiness requirements.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"limit": {
"default": 30,
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"items": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"environment": {
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"product": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"name": {
"type": "string",
"maxLength": 300
},
"currency": {
"anyOf": [
{
"type": "string",
"pattern": "^[A-Z]{3}$"
},
{
"type": "null"
}
]
},
"ready": {
"type": "boolean"
},
"requirements": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"product",
"name",
"currency",
"ready",
"requirements"
],
"additionalProperties": false
}
},
"next_cursor": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"required": [
"items",
"next_cursor"
],
"additionalProperties": false
}Endpoint'ler / v1
createQuote
/api/developer/v1/workspaces/{workspace_id}/quotesQuote a bounded intent using the current payer and immutable pricing version.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"objective": {
"type": "string",
"enum": [
"leads",
"traffic",
"conversions",
"awareness",
"engagement",
"app_installs"
]
},
"market": {
"type": "object",
"properties": {
"countries": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"
}
}
},
"required": [
"countries",
"languages"
],
"additionalProperties": false
},
"execution": {
"default": {
"mode": "prepare",
"approval": "in_app"
},
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"prepare",
"create_paused",
"activate"
]
},
"approval": {
"default": "in_app",
"type": "string",
"enum": [
"in_app",
"delegated"
]
},
"delegation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"mode"
],
"additionalProperties": false
},
"ai": {
"type": "object",
"properties": {
"model": {
"default": "auto",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"allow_api_fallback": {
"default": false,
"type": "boolean"
},
"max_credits": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
}
},
"required": [
"max_credits"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "meta_ads"
},
"measurement": {
"type": "object",
"properties": {
"pixel_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"event": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"lead_form_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"application_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"object_store_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
}
},
"additionalProperties": false
},
"identity": {
"type": "object",
"properties": {
"page_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"instagram_user_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"page_id"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "daily"
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_action_ids": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
}
},
"youtube_channel_confirmation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
"format": {
"type": "string",
"const": "demand_gen_video"
},
"placements": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"youtube_in_stream",
"youtube_in_feed",
"youtube_shorts"
]
}
}
},
"required": [
"account_id",
"budget",
"product",
"format",
"placements"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"lead_form_urn": {
"type": "string",
"pattern": "^urn:li:adForm:[1-9]\\d{0,49}$"
}
},
"additionalProperties": false
},
"political_intent": {
"type": "string",
"enum": [
"NOT_POLITICAL",
"POLITICAL",
"NOT_DECLARED"
]
},
"identity": {
"type": "object",
"properties": {
"organization_urn": {
"type": "string",
"pattern": "^urn:li:organization:\\d+$"
}
},
"required": [
"organization_urn"
],
"additionalProperties": false
},
"locale": {
"type": "object",
"properties": {
"country": {
"type": "string",
"pattern": "^[A-Z]{2}$"
},
"language": {
"type": "string",
"pattern": "^[a-z]{2}$"
}
},
"required": [
"country",
"language"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
}
]
}
},
"webhook_subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"metadata": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,64}$"
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
}
},
"required": [
"website_url",
"business_description",
"objective",
"market",
"ai",
"channels"
],
"additionalProperties": false
}
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"object": {
"type": "string",
"const": "ad_quote"
},
"expires_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"pricing_version": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"currency": {
"anyOf": [
{
"type": "string",
"const": "credits"
},
{
"type": "string",
"pattern": "^[A-Z]{3}$"
}
]
},
"estimated_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"max_charge": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"requirements": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"object",
"expires_at",
"pricing_version",
"currency",
"estimated_amount",
"max_charge",
"requirements"
],
"additionalProperties": false
}Endpoint'ler / v1
createAdJob
/api/developer/v1/workspaces/{workspace_id}/ad-jobsDurably admit an authorized, bounded advertising job; acceptance is not publication.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"objective": {
"type": "string",
"enum": [
"leads",
"traffic",
"conversions",
"awareness",
"engagement",
"app_installs"
]
},
"market": {
"type": "object",
"properties": {
"countries": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"
}
}
},
"required": [
"countries",
"languages"
],
"additionalProperties": false
},
"execution": {
"default": {
"mode": "prepare",
"approval": "in_app"
},
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"prepare",
"create_paused",
"activate"
]
},
"approval": {
"default": "in_app",
"type": "string",
"enum": [
"in_app",
"delegated"
]
},
"delegation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"mode"
],
"additionalProperties": false
},
"ai": {
"type": "object",
"properties": {
"model": {
"default": "auto",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"allow_api_fallback": {
"default": false,
"type": "boolean"
},
"max_credits": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
}
},
"required": [
"max_credits"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "meta_ads"
},
"measurement": {
"type": "object",
"properties": {
"pixel_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"event": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"lead_form_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"application_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"object_store_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
}
},
"additionalProperties": false
},
"identity": {
"type": "object",
"properties": {
"page_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"instagram_user_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"page_id"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "daily"
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_action_ids": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
}
},
"youtube_channel_confirmation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
"format": {
"type": "string",
"const": "demand_gen_video"
},
"placements": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"youtube_in_stream",
"youtube_in_feed",
"youtube_shorts"
]
}
}
},
"required": [
"account_id",
"budget",
"product",
"format",
"placements"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"lead_form_urn": {
"type": "string",
"pattern": "^urn:li:adForm:[1-9]\\d{0,49}$"
}
},
"additionalProperties": false
},
"political_intent": {
"type": "string",
"enum": [
"NOT_POLITICAL",
"POLITICAL",
"NOT_DECLARED"
]
},
"identity": {
"type": "object",
"properties": {
"organization_urn": {
"type": "string",
"pattern": "^urn:li:organization:\\d+$"
}
},
"required": [
"organization_urn"
],
"additionalProperties": false
},
"locale": {
"type": "object",
"properties": {
"country": {
"type": "string",
"pattern": "^[A-Z]{2}$"
},
"language": {
"type": "string",
"pattern": "^[a-z]{2}$"
}
},
"required": [
"country",
"language"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
}
]
}
},
"webhook_subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"metadata": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,64}$"
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
}
},
"required": [
"website_url",
"business_description",
"objective",
"market",
"ai",
"channels"
],
"additionalProperties": false
}
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"object": {
"type": "string",
"const": "ad_job"
},
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
},
"phase": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"finished_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channels": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
}
},
"account_ids": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"result": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"business_summary": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"site_evidence": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"claim": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"url",
"claim"
],
"additionalProperties": false
}
},
"targeting_strategy": {
"type": "object",
"properties": {
"countries": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 2,
"maxLength": 20
}
},
"keywords": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"interests": {
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"countries",
"languages",
"keywords",
"interests",
"reasoning"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "meta_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 30
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 90
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
}
]
}
},
"requirements": {
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
}
},
"required": [
"business_summary",
"site_evidence",
"targeting_strategy",
"channels",
"requirements"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"artifacts": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"type": "string",
"enum": [
"image",
"video",
"document"
]
},
"media_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"media_id"
],
"additionalProperties": false
}
},
"billing": {
"type": "object",
"properties": {
"payer_kind": {
"type": "string",
"enum": [
"workspace",
"developer"
]
},
"payer_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"not_reserved",
"reserved",
"pending_measurement",
"settled",
"released",
"adjusted"
]
},
"reserved_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"settled_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"anyOf": [
{
"type": "string",
"const": "credits"
},
{
"type": "string",
"pattern": "^[A-Z]{3}$"
}
]
},
"pricing_version": {
"type": "string",
"maxLength": 100
}
},
"required": [
"payer_kind",
"payer_id",
"status",
"reserved_amount",
"settled_amount",
"currency"
],
"additionalProperties": false
},
"children": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"provider_reviews": {
"type": "object",
"properties": {
"coverage": {
"type": "string",
"const": "observed_only"
},
"items": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"entity_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"review": {
"type": "string",
"enum": [
"unknown",
"review",
"approved",
"limited",
"rejected"
]
},
"source": {
"type": "string",
"enum": [
"effective_status",
"policy_summary",
"review.status"
]
},
"observed_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"entity_id",
"review",
"source",
"observed_at"
],
"additionalProperties": false
}
},
"has_more": {
"type": "boolean"
}
},
"required": [
"coverage",
"items",
"has_more"
],
"additionalProperties": false
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"product": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled",
"prepared"
]
},
"proposal_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"remote_ids": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"maxLength": 300
}
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"certainty": {
"type": "string",
"enum": [
"not_started",
"confirmed",
"unknown"
]
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product",
"account_id",
"status",
"proposal_id",
"remote_ids",
"revision",
"certainty",
"error"
],
"additionalProperties": false
}
},
"requirements": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"events": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"review_in_app": {
"type": "string",
"maxLength": 2048
}
},
"required": [
"self",
"events"
],
"additionalProperties": false
}
},
"required": [
"environment",
"id",
"object",
"workspace_id",
"status",
"phase",
"version",
"created_at",
"updated_at",
"finished_at",
"website_url",
"business_description",
"channels",
"account_ids",
"result",
"artifacts",
"billing",
"children",
"requirements",
"error",
"links"
],
"additionalProperties": false
}curl --request POST 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/ad-jobs' \
--header 'Authorization: Bearer <grant-bound-access-token>' \
--header 'Idempotency-Key: example-campaign-v1' \
--header 'Content-Type: application/json' \
--data '{"website_url":"https://example.com/product","business_description":"We provide office coffee subscriptions for businesses in Istanbul.","objective":"leads","market":{"countries":["TR"],"languages":["tr"]},"execution":{"mode":"prepare","approval":"in_app"},"ai":{"model":"auto","allow_api_fallback":false,"max_credits":"50"},"channels":[{"account_id":"11111111-1111-4111-8111-111111111111","budget":{"type":"daily","amount":"100.00","currency":"TRY"},"product":"meta_ads","identity":{"page_id":"connected-page-id"}}],"metadata":{}}'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.createAdJob({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111"
},
"body": {
"website_url": "https://example.com/product",
"business_description": "We provide office coffee subscriptions for businesses in Istanbul.",
"objective": "leads",
"market": {
"countries": [
"TR"
],
"languages": [
"tr"
]
},
"execution": {
"mode": "prepare",
"approval": "in_app"
},
"ai": {
"model": "auto",
"allow_api_fallback": false,
"max_credits": "50"
},
"channels": [
{
"account_id": "11111111-1111-4111-8111-111111111111",
"budget": {
"type": "daily",
"amount": "100.00",
"currency": "TRY"
},
"product": "meta_ads",
"identity": {
"page_id": "connected-page-id"
}
}
],
"metadata": {}
},
"idempotencyKey": "example-campaign-v1"
});Endpoint'ler / v1
getAdJob
/api/developer/v1/workspaces/{workspace_id}/ad-jobs/{job_id}Read authorized job, channel, billing and review status independently.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"job_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"object": {
"type": "string",
"const": "ad_job"
},
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
},
"phase": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"finished_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channels": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
}
},
"account_ids": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"result": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"business_summary": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"site_evidence": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"claim": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"url",
"claim"
],
"additionalProperties": false
}
},
"targeting_strategy": {
"type": "object",
"properties": {
"countries": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 2,
"maxLength": 20
}
},
"keywords": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"interests": {
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"countries",
"languages",
"keywords",
"interests",
"reasoning"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "meta_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 30
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 90
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
}
]
}
},
"requirements": {
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
}
},
"required": [
"business_summary",
"site_evidence",
"targeting_strategy",
"channels",
"requirements"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"artifacts": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"type": "string",
"enum": [
"image",
"video",
"document"
]
},
"media_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"media_id"
],
"additionalProperties": false
}
},
"billing": {
"type": "object",
"properties": {
"payer_kind": {
"type": "string",
"enum": [
"workspace",
"developer"
]
},
"payer_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"not_reserved",
"reserved",
"pending_measurement",
"settled",
"released",
"adjusted"
]
},
"reserved_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"settled_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"anyOf": [
{
"type": "string",
"const": "credits"
},
{
"type": "string",
"pattern": "^[A-Z]{3}$"
}
]
},
"pricing_version": {
"type": "string",
"maxLength": 100
}
},
"required": [
"payer_kind",
"payer_id",
"status",
"reserved_amount",
"settled_amount",
"currency"
],
"additionalProperties": false
},
"children": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"provider_reviews": {
"type": "object",
"properties": {
"coverage": {
"type": "string",
"const": "observed_only"
},
"items": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"entity_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"review": {
"type": "string",
"enum": [
"unknown",
"review",
"approved",
"limited",
"rejected"
]
},
"source": {
"type": "string",
"enum": [
"effective_status",
"policy_summary",
"review.status"
]
},
"observed_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"entity_id",
"review",
"source",
"observed_at"
],
"additionalProperties": false
}
},
"has_more": {
"type": "boolean"
}
},
"required": [
"coverage",
"items",
"has_more"
],
"additionalProperties": false
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"product": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled",
"prepared"
]
},
"proposal_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"remote_ids": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"maxLength": 300
}
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"certainty": {
"type": "string",
"enum": [
"not_started",
"confirmed",
"unknown"
]
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product",
"account_id",
"status",
"proposal_id",
"remote_ids",
"revision",
"certainty",
"error"
],
"additionalProperties": false
}
},
"requirements": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"events": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"review_in_app": {
"type": "string",
"maxLength": 2048
}
},
"required": [
"self",
"events"
],
"additionalProperties": false
}
},
"required": [
"environment",
"id",
"object",
"workspace_id",
"status",
"phase",
"version",
"created_at",
"updated_at",
"finished_at",
"website_url",
"business_description",
"channels",
"account_ids",
"result",
"artifacts",
"billing",
"children",
"requirements",
"error",
"links"
],
"additionalProperties": false
}curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/ad-jobs/22222222-2222-4222-8222-222222222222' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.getAdJob({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"job_id": "22222222-2222-4222-8222-222222222222"
}
});Endpoint'ler / v1
getAdJobArtifact
/api/developer/v1/workspaces/{workspace_id}/ad-jobs/{job_id}/artifacts/{artifact_id}Read a grant-bound artifact and short-lived media access; no generation, provider mutation or AI credit charge.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"artifact_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"job_id",
"artifact_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"variant": {
"default": "preview",
"type": "string",
"enum": [
"preview",
"original",
"download"
]
}
},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"object": {
"type": "string",
"const": "ad_job_artifact"
},
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"artifact_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"media_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"enum": [
"image",
"video",
"document"
]
},
"state": {
"type": "string",
"enum": [
"ready",
"processing",
"failed",
"unavailable"
]
},
"variant": {
"default": "preview",
"type": "string",
"enum": [
"preview",
"original",
"download"
]
},
"mime": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
},
"size_bytes": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9]\\d{0,18}$"
},
{
"type": "null"
}
]
},
"width": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"duration_seconds": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?$"
},
{
"type": "null"
}
]
},
"content_mime": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
},
"content_size_bytes": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9]\\d{0,18}$"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string",
"maxLength": 16384,
"format": "uri"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"maximum_url_lifetime_seconds": {
"type": "number",
"const": 120
}
},
"required": [
"environment",
"object",
"job_id",
"artifact_id",
"media_id",
"kind",
"state",
"variant",
"mime",
"size_bytes",
"width",
"height",
"duration_seconds",
"content_mime",
"content_size_bytes",
"url",
"expires_at",
"maximum_url_lifetime_seconds"
],
"additionalProperties": false
}curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/ad-jobs/22222222-2222-4222-8222-222222222222/artifacts/33333333-3333-4333-8333-333333333333' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.getAdJobArtifact({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"job_id": "22222222-2222-4222-8222-222222222222",
"artifact_id": "33333333-3333-4333-8333-333333333333"
}
});Endpoint'ler / v1
getAdJobResult
/api/developer/v1/workspaces/{workspace_id}/ad-jobs/{job_id}/resultRead the same evidence-bound intent, creative, approval, outcome and billing presentation shown in the panel; never generates or charges.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"job_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"object": {
"type": "string",
"const": "ad_job_result"
},
"schema_version": {
"type": "string",
"const": "1"
},
"job": {
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"object": {
"type": "string",
"const": "ad_job"
},
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
},
"phase": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"finished_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channels": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
}
},
"account_ids": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"result": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"business_summary": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"site_evidence": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"claim": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"url",
"claim"
],
"additionalProperties": false
}
},
"targeting_strategy": {
"type": "object",
"properties": {
"countries": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 2,
"maxLength": 20
}
},
"keywords": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"interests": {
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"countries",
"languages",
"keywords",
"interests",
"reasoning"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "meta_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 30
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 90
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
}
]
}
},
"requirements": {
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
}
},
"required": [
"business_summary",
"site_evidence",
"targeting_strategy",
"channels",
"requirements"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"artifacts": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"type": "string",
"enum": [
"image",
"video",
"document"
]
},
"media_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"media_id"
],
"additionalProperties": false
}
},
"billing": {
"type": "object",
"properties": {
"payer_kind": {
"type": "string",
"enum": [
"workspace",
"developer"
]
},
"payer_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"not_reserved",
"reserved",
"pending_measurement",
"settled",
"released",
"adjusted"
]
},
"reserved_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"settled_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"anyOf": [
{
"type": "string",
"const": "credits"
},
{
"type": "string",
"pattern": "^[A-Z]{3}$"
}
]
},
"pricing_version": {
"type": "string",
"maxLength": 100
}
},
"required": [
"payer_kind",
"payer_id",
"status",
"reserved_amount",
"settled_amount",
"currency"
],
"additionalProperties": false
},
"children": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"provider_reviews": {
"type": "object",
"properties": {
"coverage": {
"type": "string",
"const": "observed_only"
},
"items": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"entity_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"review": {
"type": "string",
"enum": [
"unknown",
"review",
"approved",
"limited",
"rejected"
]
},
"source": {
"type": "string",
"enum": [
"effective_status",
"policy_summary",
"review.status"
]
},
"observed_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"entity_id",
"review",
"source",
"observed_at"
],
"additionalProperties": false
}
},
"has_more": {
"type": "boolean"
}
},
"required": [
"coverage",
"items",
"has_more"
],
"additionalProperties": false
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"product": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled",
"prepared"
]
},
"proposal_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"remote_ids": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"maxLength": 300
}
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"certainty": {
"type": "string",
"enum": [
"not_started",
"confirmed",
"unknown"
]
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product",
"account_id",
"status",
"proposal_id",
"remote_ids",
"revision",
"certainty",
"error"
],
"additionalProperties": false
}
},
"requirements": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"events": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"review_in_app": {
"type": "string",
"maxLength": 2048
}
},
"required": [
"self",
"events"
],
"additionalProperties": false
}
},
"required": [
"environment",
"id",
"object",
"workspace_id",
"status",
"phase",
"version",
"created_at",
"updated_at",
"finished_at",
"website_url",
"business_description",
"channels",
"account_ids",
"result",
"artifacts",
"billing",
"children",
"requirements",
"error",
"links"
],
"additionalProperties": false
},
"requested": {
"type": "object",
"properties": {
"revision": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"source": {
"type": "string",
"enum": [
"accepted_input",
"unavailable"
]
},
"snapshot": {
"anyOf": [
{
"type": "object",
"properties": {
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"objective": {
"type": "string",
"enum": [
"leads",
"traffic",
"conversions",
"awareness",
"engagement",
"app_installs"
]
},
"market": {
"type": "object",
"properties": {
"countries": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"
}
}
},
"required": [
"countries",
"languages"
],
"additionalProperties": false
},
"execution": {
"default": {
"mode": "prepare",
"approval": "in_app"
},
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"prepare",
"create_paused",
"activate"
]
},
"approval": {
"default": "in_app",
"type": "string",
"enum": [
"in_app",
"delegated"
]
},
"delegation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"mode",
"approval"
],
"additionalProperties": false
},
"ai": {
"type": "object",
"properties": {
"model": {
"default": "auto",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"allow_api_fallback": {
"default": false,
"type": "boolean"
},
"max_credits": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
}
},
"required": [
"model",
"allow_api_fallback",
"max_credits"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "meta_ads"
},
"measurement": {
"type": "object",
"properties": {
"pixel_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"event": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"lead_form_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"application_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"object_store_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
}
},
"additionalProperties": false
},
"identity": {
"type": "object",
"properties": {
"page_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"instagram_user_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"page_id"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "daily"
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_action_ids": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
}
},
"youtube_channel_confirmation_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
"format": {
"type": "string",
"const": "demand_gen_video"
},
"placements": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"youtube_in_stream",
"youtube_in_feed",
"youtube_shorts"
]
}
}
},
"required": [
"account_id",
"budget",
"product",
"format",
"placements"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"budget": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"daily",
"lifetime"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
}
},
"required": [
"type",
"amount",
"currency"
],
"additionalProperties": false
},
"creative": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "existing_media"
},
"media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "youtube_video"
},
"video_id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{11}$"
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"source",
"video_id",
"logo_media_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "generate"
},
"brief": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"logo_media_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reference_media_ids": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"source",
"brief",
"reference_media_ids"
],
"additionalProperties": false
}
]
},
"schedule": {
"type": "object",
"properties": {
"start_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"end_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"measurement": {
"type": "object",
"properties": {
"conversion_id": {
"type": "string",
"pattern": "^[1-9]\\d{0,49}$"
},
"lead_form_urn": {
"type": "string",
"pattern": "^urn:li:adForm:[1-9]\\d{0,49}$"
}
},
"additionalProperties": false
},
"political_intent": {
"type": "string",
"enum": [
"NOT_POLITICAL",
"POLITICAL",
"NOT_DECLARED"
]
},
"identity": {
"type": "object",
"properties": {
"organization_urn": {
"type": "string",
"pattern": "^urn:li:organization:\\d+$"
}
},
"required": [
"organization_urn"
],
"additionalProperties": false
},
"locale": {
"type": "object",
"properties": {
"country": {
"type": "string",
"pattern": "^[A-Z]{2}$"
},
"language": {
"type": "string",
"pattern": "^[a-z]{2}$"
}
},
"required": [
"country",
"language"
],
"additionalProperties": false
}
},
"required": [
"account_id",
"budget",
"product"
],
"additionalProperties": false
}
]
}
},
"webhook_subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"metadata": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,64}$"
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
}
},
"required": [
"website_url",
"business_description",
"objective",
"market",
"execution",
"ai",
"channels",
"metadata"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"revision",
"source",
"snapshot"
],
"additionalProperties": false
},
"prepared": {
"anyOf": [
{
"type": "object",
"properties": {
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"source": {
"type": "string",
"const": "ai_result"
},
"snapshot": {
"type": "object",
"properties": {
"business_summary": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"site_evidence": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"claim": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"url",
"claim"
],
"additionalProperties": false
}
},
"targeting_strategy": {
"type": "object",
"properties": {
"countries": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 2,
"maxLength": 20
}
},
"keywords": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"interests": {
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"countries",
"languages",
"keywords",
"interests",
"reasoning"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "meta_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 30
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 90
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
}
]
}
},
"requirements": {
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
}
},
"required": [
"business_summary",
"site_evidence",
"targeting_strategy",
"channels",
"requirements"
],
"additionalProperties": false
}
},
"required": [
"revision",
"source",
"snapshot"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"channels": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"product": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"approval": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"unavailable",
"pending",
"approved",
"rejected"
]
},
"source": {
"type": "string",
"const": "proposal"
},
"snapshot": {
"anyOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"approved_native_plan",
"submitted_native_plan"
]
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"plan_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"settings": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"enum": [
"name",
"objective",
"budget_type",
"budget_amount",
"budget_currency",
"start_at",
"end_at",
"countries",
"locations",
"languages",
"interests",
"headline",
"primary_text",
"description",
"placements",
"destination_url"
]
},
"values": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"maxLength": 3000
}
}
},
"required": [
"field",
"values"
],
"additionalProperties": false
}
}
},
"required": [
"source",
"revision",
"plan_hash",
"settings"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"snapshot_status": {
"type": "string",
"enum": [
"recorded",
"not_recorded"
]
},
"proposal_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"proposal_status": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100
},
{
"type": "null"
}
]
},
"observed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
}
},
"required": [
"status",
"source",
"snapshot",
"snapshot_status",
"proposal_id",
"proposal_status",
"observed_at"
],
"additionalProperties": false
},
"applied": {
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"provider_receipt",
"child_state"
]
},
"snapshot": {
"anyOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"approved_native_plan",
"submitted_native_plan"
]
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"plan_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"settings": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"enum": [
"name",
"objective",
"budget_type",
"budget_amount",
"budget_currency",
"start_at",
"end_at",
"countries",
"locations",
"languages",
"interests",
"headline",
"primary_text",
"description",
"placements",
"destination_url"
]
},
"values": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"maxLength": 3000
}
}
},
"required": [
"field",
"values"
],
"additionalProperties": false
}
}
},
"required": [
"source",
"revision",
"plan_hash",
"settings"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"snapshot_status": {
"type": "string",
"enum": [
"recorded",
"not_recorded"
]
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"certainty": {
"type": "string",
"enum": [
"not_started",
"confirmed",
"unknown"
]
},
"remote_ids": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"maxLength": 300
}
},
"observed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
}
},
"required": [
"source",
"snapshot",
"snapshot_status",
"revision",
"certainty",
"remote_ids",
"observed_at"
],
"additionalProperties": false
},
"checks": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"product": {
"anyOf": [
{
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"passed",
"warning",
"blocked",
"not_checked",
"unavailable"
]
},
"source": {
"type": "string",
"enum": [
"requirement",
"provider_review",
"not_observed"
]
},
"field": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"observed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product",
"status",
"source",
"field",
"message",
"observed_at"
],
"additionalProperties": false
}
},
"performance": {
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "unavailable"
},
"reason": {
"type": "string",
"const": "not_connected"
}
},
"required": [
"status",
"reason"
],
"additionalProperties": false
}
},
"required": [
"id",
"product",
"account_id",
"revision",
"approval",
"applied",
"checks",
"performance"
],
"additionalProperties": false
}
},
"credit_accounting": {
"type": "object",
"properties": {
"released_amount": {
"anyOf": [
{
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
{
"type": "null"
}
]
},
"source": {
"type": "string",
"enum": [
"ledger",
"unavailable"
]
}
},
"required": [
"released_amount",
"source"
],
"additionalProperties": false
},
"timeline": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"sandbox_delivery": {
"type": "string",
"enum": [
"recorded",
"not_requested"
]
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"type": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
},
"schema_version": {
"type": "string",
"const": "1"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"data": {
"type": "object",
"properties": {
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
}
},
"required": [
"job_id",
"job_version",
"status"
],
"additionalProperties": false
}
},
"required": [
"environment",
"id",
"type",
"schema_version",
"created_at",
"data"
],
"additionalProperties": false
}
},
"timeline_has_more": {
"type": "boolean"
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"panel": {
"type": "string",
"minLength": 1,
"maxLength": 2048
}
},
"required": [
"self",
"panel"
],
"additionalProperties": false
}
},
"required": [
"environment",
"object",
"schema_version",
"job",
"requested",
"prepared",
"channels",
"credit_accounting",
"timeline",
"timeline_has_more",
"links"
],
"additionalProperties": false
}curl --request GET 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/ad-jobs/22222222-2222-4222-8222-222222222222/result' \
--header 'Authorization: Bearer <grant-bound-access-token>'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.getAdJobResult({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"job_id": "22222222-2222-4222-8222-222222222222"
}
});Endpoint'ler / v1
submitAdJobInputs
/api/developer/v1/workspaces/{workspace_id}/ad-jobs/{job_id}/inputsAnswer requirements against an expected job version; never manufacture approval.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"job_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expected_version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"answers": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"additionalProperties": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "boolean"
},
{
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
]
},
"minProperties": 1,
"maxProperties": 100
}
},
"required": [
"expected_version",
"answers"
],
"additionalProperties": false
}
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"object": {
"type": "string",
"const": "ad_job"
},
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
},
"phase": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"finished_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channels": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
}
},
"account_ids": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"result": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"business_summary": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"site_evidence": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"claim": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"url",
"claim"
],
"additionalProperties": false
}
},
"targeting_strategy": {
"type": "object",
"properties": {
"countries": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 2,
"maxLength": 20
}
},
"keywords": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"interests": {
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"countries",
"languages",
"keywords",
"interests",
"reasoning"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "meta_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 30
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 90
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
}
]
}
},
"requirements": {
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
}
},
"required": [
"business_summary",
"site_evidence",
"targeting_strategy",
"channels",
"requirements"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"artifacts": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"type": "string",
"enum": [
"image",
"video",
"document"
]
},
"media_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"media_id"
],
"additionalProperties": false
}
},
"billing": {
"type": "object",
"properties": {
"payer_kind": {
"type": "string",
"enum": [
"workspace",
"developer"
]
},
"payer_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"not_reserved",
"reserved",
"pending_measurement",
"settled",
"released",
"adjusted"
]
},
"reserved_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"settled_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"anyOf": [
{
"type": "string",
"const": "credits"
},
{
"type": "string",
"pattern": "^[A-Z]{3}$"
}
]
},
"pricing_version": {
"type": "string",
"maxLength": 100
}
},
"required": [
"payer_kind",
"payer_id",
"status",
"reserved_amount",
"settled_amount",
"currency"
],
"additionalProperties": false
},
"children": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"provider_reviews": {
"type": "object",
"properties": {
"coverage": {
"type": "string",
"const": "observed_only"
},
"items": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"entity_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"review": {
"type": "string",
"enum": [
"unknown",
"review",
"approved",
"limited",
"rejected"
]
},
"source": {
"type": "string",
"enum": [
"effective_status",
"policy_summary",
"review.status"
]
},
"observed_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"entity_id",
"review",
"source",
"observed_at"
],
"additionalProperties": false
}
},
"has_more": {
"type": "boolean"
}
},
"required": [
"coverage",
"items",
"has_more"
],
"additionalProperties": false
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"product": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled",
"prepared"
]
},
"proposal_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"remote_ids": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"maxLength": 300
}
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"certainty": {
"type": "string",
"enum": [
"not_started",
"confirmed",
"unknown"
]
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product",
"account_id",
"status",
"proposal_id",
"remote_ids",
"revision",
"certainty",
"error"
],
"additionalProperties": false
}
},
"requirements": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"events": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"review_in_app": {
"type": "string",
"maxLength": 2048
}
},
"required": [
"self",
"events"
],
"additionalProperties": false
}
},
"required": [
"environment",
"id",
"object",
"workspace_id",
"status",
"phase",
"version",
"created_at",
"updated_at",
"finished_at",
"website_url",
"business_description",
"channels",
"account_ids",
"result",
"artifacts",
"billing",
"children",
"requirements",
"error",
"links"
],
"additionalProperties": false
}Endpoint'ler / v1
cancelAdJob
/api/developer/v1/workspaces/{workspace_id}/ad-jobs/{job_id}/cancelRequest cancellation of future steps; already submitted ads are not deleted.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"job_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expected_version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reason": {
"type": "string",
"maxLength": 500
}
},
"required": [
"expected_version"
],
"additionalProperties": false
}
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"object": {
"type": "string",
"const": "ad_job"
},
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
},
"phase": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"finished_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"website_url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"business_description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channels": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
}
},
"account_ids": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"result": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"business_summary": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"site_evidence": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"claim": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"url",
"claim"
],
"additionalProperties": false
}
},
"targeting_strategy": {
"type": "object",
"properties": {
"countries": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"languages": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 2,
"maxLength": 20
}
},
"keywords": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"interests": {
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"countries",
"languages",
"keywords",
"interests",
"reasoning"
],
"additionalProperties": false
},
"channels": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "meta_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "youtube_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 30
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 90
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_name": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 25
},
{
"type": "null"
}
]
},
"long_headline": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 90
},
{
"type": "null"
}
]
},
"primary_text": {
"type": "string",
"maxLength": 3000
},
"reasoning": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"product": {
"type": "string",
"const": "linkedin_ads"
},
"headlines": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 150
}
},
"descriptions": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
}
},
"required": [
"name",
"business_name",
"long_headline",
"primary_text",
"reasoning",
"product",
"headlines",
"descriptions"
],
"additionalProperties": false
}
]
}
},
"requirements": {
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
}
},
"required": [
"business_summary",
"site_evidence",
"targeting_strategy",
"channels",
"requirements"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"artifacts": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"type": "string",
"enum": [
"image",
"video",
"document"
]
},
"media_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"media_id"
],
"additionalProperties": false
}
},
"billing": {
"type": "object",
"properties": {
"payer_kind": {
"type": "string",
"enum": [
"workspace",
"developer"
]
},
"payer_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"not_reserved",
"reserved",
"pending_measurement",
"settled",
"released",
"adjusted"
]
},
"reserved_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"settled_amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"anyOf": [
{
"type": "string",
"const": "credits"
},
{
"type": "string",
"pattern": "^[A-Z]{3}$"
}
]
},
"pricing_version": {
"type": "string",
"maxLength": 100
}
},
"required": [
"payer_kind",
"payer_id",
"status",
"reserved_amount",
"settled_amount",
"currency"
],
"additionalProperties": false
},
"children": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"provider_reviews": {
"type": "object",
"properties": {
"coverage": {
"type": "string",
"const": "observed_only"
},
"items": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"entity_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"review": {
"type": "string",
"enum": [
"unknown",
"review",
"approved",
"limited",
"rejected"
]
},
"source": {
"type": "string",
"enum": [
"effective_status",
"policy_summary",
"review.status"
]
},
"observed_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"entity_id",
"review",
"source",
"observed_at"
],
"additionalProperties": false
}
},
"has_more": {
"type": "boolean"
}
},
"required": [
"coverage",
"items",
"has_more"
],
"additionalProperties": false
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"product": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"account_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled",
"prepared"
]
},
"proposal_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"remote_ids": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"maxLength": 300
}
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"certainty": {
"type": "string",
"enum": [
"not_started",
"confirmed",
"unknown"
]
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"product",
"account_id",
"status",
"proposal_id",
"remote_ids",
"revision",
"certainty",
"error"
],
"additionalProperties": false
}
},
"requirements": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"channel": {
"type": "string",
"enum": [
"meta_ads",
"youtube_ads",
"linkedin_ads"
]
},
"blocking": {
"default": true,
"type": "boolean"
}
},
"required": [
"code",
"field",
"message",
"blocking"
],
"additionalProperties": false
}
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"message": {
"type": "string",
"maxLength": 2000
},
"retryable": {
"type": "boolean"
},
"effects": {
"type": "string",
"enum": [
"none",
"confirmed",
"unknown"
]
}
},
"required": [
"code",
"message",
"retryable",
"effects"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"events": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"review_in_app": {
"type": "string",
"maxLength": 2048
}
},
"required": [
"self",
"events"
],
"additionalProperties": false
}
},
"required": [
"environment",
"id",
"object",
"workspace_id",
"status",
"phase",
"version",
"created_at",
"updated_at",
"finished_at",
"website_url",
"business_description",
"channels",
"account_ids",
"result",
"artifacts",
"billing",
"children",
"requirements",
"error",
"links"
],
"additionalProperties": false
}Endpoint'ler / v1
listAdJobEvents
/api/developer/v1/workspaces/{workspace_id}/ad-jobs/{job_id}/eventsRecover versioned job events after duplicate, missed or reordered push notifications.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"job_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"limit": {
"default": 30,
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"items": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"environment": {
"default": "production",
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"sandbox_delivery": {
"type": "string",
"enum": [
"recorded",
"not_requested"
]
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"type": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
},
"schema_version": {
"type": "string",
"const": "1"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"data": {
"type": "object",
"properties": {
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"waiting_capacity",
"requires_input",
"requires_approval",
"requires_reconnect",
"needs_reconciliation",
"cancel_requested",
"succeeded",
"partially_succeeded",
"failed",
"cancelled"
]
}
},
"required": [
"job_id",
"job_version",
"status"
],
"additionalProperties": false
}
},
"required": [
"environment",
"id",
"type",
"schema_version",
"created_at",
"data"
],
"additionalProperties": false
}
},
"next_cursor": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"required": [
"items",
"next_cursor"
],
"additionalProperties": false
}Endpoint'ler / v1
createWebhookSubscription
/api/developer/v1/workspaces/{workspace_id}/webhook-subscriptionsRegister an authorized HTTPS destination; the signing secret is shown once.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"format": "uri"
},
"events": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
}
}
},
"required": [
"url",
"events"
],
"additionalProperties": false
}
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"url_hint": {
"type": "string",
"maxLength": 2048
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
}
},
"active": {
"type": "boolean"
},
"reauthorization_required": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"signing_secret": {
"type": "string",
"minLength": 32,
"maxLength": 200
}
},
"required": [
"id",
"url_hint",
"events",
"active",
"created_at"
],
"additionalProperties": false
}curl --request POST 'https://app.ad10.app/api/developer/v1/workspaces/11111111-1111-4111-8111-111111111111/webhook-subscriptions' \
--header 'Authorization: Bearer <grant-bound-access-token>' \
--header 'Idempotency-Key: example-webhook-v1' \
--header 'Content-Type: application/json' \
--data '{"url":"https://example.org/hooks/ads","events":["ad_job.succeeded","ad_job.failed"]}'import { createDeveloperApiSdk } from "./ad10-sdk.mjs";
const token = process.env.AD10_ACCESS_TOKEN;
if (!token) throw new Error("Set AD10_ACCESS_TOKEN in your server environment.");
const api = createDeveloperApiSdk({ baseUrl: "https://app.ad10.app", token });
const result = await api.createWebhookSubscription({
"params": {
"workspace_id": "11111111-1111-4111-8111-111111111111"
},
"body": {
"url": "https://example.org/hooks/ads",
"events": [
"ad_job.succeeded",
"ad_job.failed"
]
},
"idempotencyKey": "example-webhook-v1"
});Endpoint'ler / v1
rotateWebhookSecret
/api/developer/v1/workspaces/{workspace_id}/webhook-subscriptions/{subscription_id}/rotateRotate the signing secret; the replacement is shown once and retries do not reveal it.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"subscription_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"url_hint": {
"type": "string",
"maxLength": 2048
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
}
},
"active": {
"type": "boolean"
},
"reauthorization_required": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"signing_secret": {
"type": "string",
"minLength": 32,
"maxLength": 200
}
},
"required": [
"id",
"url_hint",
"events",
"active",
"created_at"
],
"additionalProperties": false
}Endpoint'ler / v1
listWebhookSubscriptions
/api/developer/v1/workspaces/{workspace_id}/webhook-subscriptionsList grant-scoped destinations without signing secrets.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"limit": {
"default": 30,
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"items": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"environment": {
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"url_hint": {
"type": "string",
"maxLength": 2048
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"ad_job.updated",
"ad_job.requires_input",
"ad_job.requires_approval",
"ad_job.requires_reconnect",
"ad_job.succeeded",
"ad_job.partially_succeeded",
"ad_job.failed",
"ad_job.cancelled",
"billing.settled",
"ad.review_changed"
]
}
},
"active": {
"type": "boolean"
},
"reauthorization_required": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"url_hint",
"events",
"active",
"created_at"
],
"additionalProperties": false
}
},
"next_cursor": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"required": [
"items",
"next_cursor"
],
"additionalProperties": false
}Endpoint'ler / v1
deleteWebhookSubscription
/api/developer/v1/workspaces/{workspace_id}/webhook-subscriptions/{subscription_id}Deactivate a grant-scoped destination and stop new deliveries.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"subscription_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id",
"subscription_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"active": {
"type": "boolean",
"const": false
}
},
"required": [
"id",
"active"
],
"additionalProperties": false
}Endpoint'ler / v1
getUsage
/api/developer/v1/workspaces/{workspace_id}/usageRead settled or pending measurements for the authorized payer without double charging.
{
"params": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"workspace_id"
],
"additionalProperties": false
},
"query": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"limit": {
"default": 30,
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
},
"body": null
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"environment": {
"type": "string",
"enum": [
"production",
"sandbox"
]
},
"synthetic": {
"type": "boolean"
},
"items": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"job_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"not_reserved",
"reserved",
"pending_measurement",
"settled",
"released",
"adjusted"
]
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"currency": {
"anyOf": [
{
"type": "string",
"const": "credits"
},
{
"type": "string",
"pattern": "^[A-Z]{3}$"
}
]
},
"pricing_version": {
"type": "string",
"maxLength": 100
},
"usage_receipts": {
"default": [],
"maxItems": 128,
"type": "array",
"items": {
"type": "object",
"properties": {
"receipt_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"attempt_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"provider": {
"type": "string",
"enum": [
"claude",
"codex"
]
},
"model": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"requested_model": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"model_source": {
"type": "string",
"enum": [
"provider_reported",
"execution_requested",
"unknown"
]
},
"auth": {
"type": "string",
"enum": [
"subscription",
"api_key"
]
},
"source": {
"type": "string",
"enum": [
"provider_final",
"provider_partial",
"estimated",
"unknown"
]
},
"unit_kind": {
"type": "string",
"enum": [
"tokens",
"generated_images",
"studio_output"
]
},
"unit_count": {
"type": "number",
"minimum": 0
},
"input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"cached_input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"cache_write_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"output_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reported_cost_usd": {
"type": "string",
"pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,8})?$"
},
"status": {
"type": "string",
"enum": [
"succeeded",
"failed",
"limited",
"cancelled"
]
}
},
"required": [
"receipt_id",
"attempt_id",
"provider",
"model",
"auth",
"source",
"status"
],
"additionalProperties": false
}
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"job_id",
"status",
"amount",
"currency",
"pricing_version",
"usage_receipts",
"created_at"
],
"additionalProperties": false
}
},
"next_cursor": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"required": [
"items",
"next_cursor"
],
"additionalProperties": false
}