curl --request POST \
--url http://localhost:8000/api/v1/campaigns/drafts/{draft_id}/ad-groups/regenerate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_keywords_per_ad_group": 20,
"min_keywords_per_ad_group": 3
}
'{
"task_id": "<string>",
"status": "in_progress"
}Re-split keywords into ad groups using Gemini AI.
This will delete existing ad groups and create new ones based on the keywords currently in the draft. Runs as a background task.
When from_market_analysis=true, keywords are pulled fresh from the
linked market analysis instead of the draft’s current ad groups.
This recovers keywords lost by deleting ad groups.
curl --request POST \
--url http://localhost:8000/api/v1/campaigns/drafts/{draft_id}/ad-groups/regenerate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_keywords_per_ad_group": 20,
"min_keywords_per_ad_group": 3
}
'{
"task_id": "<string>",
"status": "in_progress"
}The access token received from the authorization server in the OAuth 2.0 flow.
Re-pull selected keywords from the linked market analysis instead of using existing draft keywords