curl --request POST \
--url https://api.shareofmodel.ai/v1/organizations/{organization_id}/workspaces/{workspace_id}/campaign_optimizations \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "311ee332-4594-4549-a8c4-df7f21f67751",
"organization_id": "804daa6c-8c04-4e95-a6c6-1ad37296815b",
"platform_integration_id": "42b25fbd-02e0-4252-a75d-3632b8d80a86",
"analysis_id": "8b4b3b1b-0b3b-4b3b-8b3b-0b3b4b3b8b3b",
"platform": "google_ads",
"campaign": {
"customer_id": "9088979976/9088979976",
"asset_group_ids": [
"6574388623"
],
"asset_group_info": {
"6574388623": {
"name": "Asset Group : Test Campaign (PMAX)"
}
}
},
"name": "Google Ads Campaign Optimization",
"language": "en",
"promotion_type": "Product"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "google_ads",
"campaign": "<unknown>",
"name": "<string>",
"analysis": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"language": "ar"
}Create a new campaign optimization. Required permission: write:analysis.
Top-level optional field (Google Ads only):
promotion_type (optional): Optimisation intent. Values:
Product, Service, Brand (case-insensitive). Stored as
campaign.intent (lowercase). Ignored for TikTok.Google Ads enrichment: On creation, Jarvis fetches live
metadata from Google Ads for each asset group and stores it in
campaign.asset_group_info (ad strength, status, search themes
count, campaign name). The client only needs to send
asset_group_info with name; the backend fills the rest.
Campaign Field Structure (campaign JSON)
The campaign field is a free-form JSON object whose structure depends on the platform.
Google Ads (PMax):
{
"customer_id": "1447066043/8965287694",
"asset_group_ids": ["6476435676", "6481074503"],
"intent": "product",
"asset_group_info": {
"6476435676": {
"name": "Animalerie",
"ad_strength": "POOR",
"ad_strength_score": 10,
"ad_strength_max": 25,
"search_themes_count": 0,
"campaign_name": "PMax: IKOM - Smart Shopping CSS",
"status": "ENABLED"
}
}
}
Fields:
customer_id (string): Google Ads customer ID, format "manager_id/account_id" or "account_id".asset_group_ids (string[]): Asset group IDs selected for optimization.intent (string, optional): Optimization intent
(product, service, brand). Set from promotion_type.asset_group_info (object): Mapping of asset group ID to
metadata. Enriched with live Google Ads data at creation:
name (string): Asset group name.ad_strength (string): Google Ads enum — EXCELLENT,
GOOD, AVERAGE, POOR, PENDING, UNKNOWN,
UNSPECIFIED, NO_ADS.ad_strength_score (int): Numeric score — EXCELLENT=25, GOOD=20, AVERAGE=15, POOR=10, all others=0.ad_strength_max (int): Always 25 (max possible score).search_themes_count (int): Number of search theme signals currently on the asset group in Google Ads.campaign_name (string): Parent PMax campaign name.status (string): Asset group status — ENABLED, PAUSED, REMOVED, etc.Use POST .../refresh to re-fetch asset_group_info from Google Ads without re-running the optimization pipeline.
TikTok:
{
"advertiser_id": "7052316759499587586",
"campaign_id": "1850667377518002",
"ad_group_ids": ["1850939823278113", "1850667437045906"]
}
Fields:
advertiser_id (string): TikTok advertiser account ID.campaign_id (string): TikTok campaign ID.ad_group_ids (string[]): Ad group IDs to optimize (non-empty).TikTok campaign objects do not include asset_group_info or enrichment fields.
curl --request POST \
--url https://api.shareofmodel.ai/v1/organizations/{organization_id}/workspaces/{workspace_id}/campaign_optimizations \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "311ee332-4594-4549-a8c4-df7f21f67751",
"organization_id": "804daa6c-8c04-4e95-a6c6-1ad37296815b",
"platform_integration_id": "42b25fbd-02e0-4252-a75d-3632b8d80a86",
"analysis_id": "8b4b3b1b-0b3b-4b3b-8b3b-0b3b4b3b8b3b",
"platform": "google_ads",
"campaign": {
"customer_id": "9088979976/9088979976",
"asset_group_ids": [
"6574388623"
],
"asset_group_info": {
"6574388623": {
"name": "Asset Group : Test Campaign (PMAX)"
}
}
},
"name": "Google Ads Campaign Optimization",
"language": "en",
"promotion_type": "Product"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "google_ads",
"campaign": "<unknown>",
"name": "<string>",
"analysis": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"language": "ar"
}Documentation Index
Fetch the complete documentation index at: https://docs.shareofmodel.ai/llms.txt
Use this file to discover all available pages before exploring further.
csv, json google_ads - google adstiktok - tiktokgoogle_ads, tiktok Show child attributes
ar - arda - dade - deen - enes - eseu - eufi - fifil - filfr - frhe - hehi - hihu - huid - idit - itja - jako - konl - nlpl - plpt - ptro - rosv - svth - thtr - trur - urvi - vizh - zhzh-TW - zh TWar, da, de, en, es, eu, fi, fil, fr, he, hi, hu, id, it, ja, ko, nl, pl, pt, ro, sv, th, tr, ur, vi, zh, zh-TW Optimisation intent. Only used for Google Ads (PMax); ignored for other platforms. Allowed values: Product, Service, Brand. Stored as campaign.intent (lowercase).
Product - ProductService - ServiceBrand - BrandProduct, Service, Brand, null The created campaign optimization.
google_ads - google adstiktok - tiktokgoogle_ads, tiktok 255pending - pendingin_progress - in progresscompleted - completedfailed - failedsuggestions_applied - suggestions appliedpending, in_progress, completed, failed, suggestions_applied ar - arda - dade - deen - enes - eseu - eufi - fifil - filfr - frhe - hehi - hihu - huid - idit - itja - jako - konl - nlpl - plpt - ptro - rosv - svth - thtr - trur - urvi - vizh - zhzh-TW - zh TWar, da, de, en, es, eu, fi, fil, fr, he, hi, hu, id, it, ja, ko, nl, pl, pt, ro, sv, th, tr, ur, vi, zh, zh-TW,