import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const response = await client.adGroups.duplicate('id');
console.log(response.data);curl --request POST \
--url https://api.whop.com/api/v1/ad_groups/{id}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"count": 123,
"preserve_engagement": true,
"target_ad_campaign_id": "<string>"
}
'import requests
url = "https://api.whop.com/api/v1/ad_groups/{id}/duplicate"
payload = {
"count": 123,
"preserve_engagement": True,
"target_ad_campaign_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/ad_groups/{id}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'count' => 123,
'preserve_engagement' => true,
'target_ad_campaign_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.whop.com/api/v1/ad_groups/{id}/duplicate"
payload := strings.NewReader("{\n \"count\": 123,\n \"preserve_engagement\": true,\n \"target_ad_campaign_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.whop.com/api/v1/ad_groups/{id}/duplicate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"count\": 123,\n \"preserve_engagement\": true,\n \"target_ad_campaign_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/ad_groups/{id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"count\": 123,\n \"preserve_engagement\": true,\n \"target_ad_campaign_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"ad_campaign": {
"id": "<string>"
},
"added_to_cart_value": 123,
"added_to_carts": 123,
"audiences": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"bid_type": "minimum_cost",
"budget_amount": 123,
"budget_type": "daily",
"click_through_rate": 123,
"clicks": 123,
"completed_registration_value": 123,
"completed_registrations": 123,
"contact_value": 123,
"contacts": 123,
"conversion_location": "website",
"cost_per_added_to_cart": 123,
"cost_per_click": 123,
"cost_per_completed_registration": 123,
"cost_per_contact": 123,
"cost_per_lead": 123,
"cost_per_mille": 123,
"cost_per_purchase": 123,
"cost_per_result": 123,
"cost_per_schedule": 123,
"cost_per_submitted_application": 123,
"cost_per_unique_click": 123,
"cost_per_viewed_content": 123,
"created_at": "<string>",
"custom_conversions": 123,
"custom_event_counts": {},
"custom_event_values": {},
"delivery_status": "all_ads_rejected",
"demographics": {
"automatic": true,
"gender": "all",
"maximum_age": 123,
"minimum_age": 123
},
"desired_cost_per_result": 123,
"detailed_targeting": {
"behaviors": [
{
"id": "<string>",
"name": "<string>"
}
],
"demographics": [
{
"id": "<string>",
"type": "life_events",
"name": "<string>"
}
],
"interests": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"devices": {
"operating_systems": [
{
"os": "ios",
"minimum_version": "<string>"
}
],
"platforms": [
"mobile"
]
},
"dynamic_creative": true,
"ends_at": "<string>",
"frequency": 123,
"frequency_cap": {
"maximum_impressions": 123,
"per_days": 123
},
"id": "<string>",
"impressions": 123,
"issues": [
{
"id": "<string>",
"message": "<string>",
"resource_id": "<string>",
"resource_type": "ad_campaign"
}
],
"languages": [
"<string>"
],
"lead_value": 123,
"leads": 123,
"message_apps": [
"messenger"
],
"minimum_daily_spend": 123,
"optimization_goal": "conversions",
"placements": [
{
"platform": "<string>",
"positions": [
"<string>"
]
}
],
"purchase_value": 123,
"purchases": 123,
"reach": 123,
"regions": {
"exclude": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": [
"<string>"
],
"country_groups": [
"<string>"
],
"custom_locations": [
{
"distance_unit": "mile",
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": [
"<string>"
],
"zips": [
"<string>"
]
},
"include": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": [
"<string>"
],
"country_groups": [
"<string>"
],
"custom_locations": [
{
"distance_unit": "mile",
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": [
"<string>"
],
"zips": [
"<string>"
]
}
},
"result_event": "purchase",
"result_event_name": "<string>",
"results": 123,
"return_on_ad_spend": 123,
"schedule_value": 123,
"schedules": 123,
"spend": 123,
"spend_currency": "<string>",
"starts_at": "<string>",
"status": "active",
"submitted_application_value": 123,
"submitted_applications": 123,
"title": "<string>",
"unique_click_through_rate": 123,
"unique_clicks": 123,
"updated_at": "<string>",
"viewed_content_value": 123,
"viewed_contents": 123
}
]
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}Duplicate an Ad Group
Creates copies of the ad group in duplicating status and returns them — into its own campaign, or into target_ad_campaign_id (which must belong to the same account and be compatible with the ad group’s targeting and goals); each copy transitions to its final status (matching the source’s active/paused state) once duplication completes. Poll each returned ad group until it leaves duplicating — a copy that could not be completed is deleted and returns 404.
import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const response = await client.adGroups.duplicate('id');
console.log(response.data);curl --request POST \
--url https://api.whop.com/api/v1/ad_groups/{id}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"count": 123,
"preserve_engagement": true,
"target_ad_campaign_id": "<string>"
}
'import requests
url = "https://api.whop.com/api/v1/ad_groups/{id}/duplicate"
payload = {
"count": 123,
"preserve_engagement": True,
"target_ad_campaign_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/ad_groups/{id}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'count' => 123,
'preserve_engagement' => true,
'target_ad_campaign_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.whop.com/api/v1/ad_groups/{id}/duplicate"
payload := strings.NewReader("{\n \"count\": 123,\n \"preserve_engagement\": true,\n \"target_ad_campaign_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.whop.com/api/v1/ad_groups/{id}/duplicate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"count\": 123,\n \"preserve_engagement\": true,\n \"target_ad_campaign_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/ad_groups/{id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"count\": 123,\n \"preserve_engagement\": true,\n \"target_ad_campaign_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"ad_campaign": {
"id": "<string>"
},
"added_to_cart_value": 123,
"added_to_carts": 123,
"audiences": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"bid_type": "minimum_cost",
"budget_amount": 123,
"budget_type": "daily",
"click_through_rate": 123,
"clicks": 123,
"completed_registration_value": 123,
"completed_registrations": 123,
"contact_value": 123,
"contacts": 123,
"conversion_location": "website",
"cost_per_added_to_cart": 123,
"cost_per_click": 123,
"cost_per_completed_registration": 123,
"cost_per_contact": 123,
"cost_per_lead": 123,
"cost_per_mille": 123,
"cost_per_purchase": 123,
"cost_per_result": 123,
"cost_per_schedule": 123,
"cost_per_submitted_application": 123,
"cost_per_unique_click": 123,
"cost_per_viewed_content": 123,
"created_at": "<string>",
"custom_conversions": 123,
"custom_event_counts": {},
"custom_event_values": {},
"delivery_status": "all_ads_rejected",
"demographics": {
"automatic": true,
"gender": "all",
"maximum_age": 123,
"minimum_age": 123
},
"desired_cost_per_result": 123,
"detailed_targeting": {
"behaviors": [
{
"id": "<string>",
"name": "<string>"
}
],
"demographics": [
{
"id": "<string>",
"type": "life_events",
"name": "<string>"
}
],
"interests": [
{
"id": "<string>",
"name": "<string>"
}
]
},
"devices": {
"operating_systems": [
{
"os": "ios",
"minimum_version": "<string>"
}
],
"platforms": [
"mobile"
]
},
"dynamic_creative": true,
"ends_at": "<string>",
"frequency": 123,
"frequency_cap": {
"maximum_impressions": 123,
"per_days": 123
},
"id": "<string>",
"impressions": 123,
"issues": [
{
"id": "<string>",
"message": "<string>",
"resource_id": "<string>",
"resource_type": "ad_campaign"
}
],
"languages": [
"<string>"
],
"lead_value": 123,
"leads": 123,
"message_apps": [
"messenger"
],
"minimum_daily_spend": 123,
"optimization_goal": "conversions",
"placements": [
{
"platform": "<string>",
"positions": [
"<string>"
]
}
],
"purchase_value": 123,
"purchases": 123,
"reach": 123,
"regions": {
"exclude": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": [
"<string>"
],
"country_groups": [
"<string>"
],
"custom_locations": [
{
"distance_unit": "mile",
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": [
"<string>"
],
"zips": [
"<string>"
]
},
"include": {
"cities": [
{
"key": "<string>",
"name": "<string>"
}
],
"countries": [
"<string>"
],
"country_groups": [
"<string>"
],
"custom_locations": [
{
"distance_unit": "mile",
"latitude": 123,
"longitude": 123,
"radius": 123,
"name": "<string>"
}
],
"regions": [
"<string>"
],
"zips": [
"<string>"
]
}
},
"result_event": "purchase",
"result_event_name": "<string>",
"results": 123,
"return_on_ad_spend": 123,
"schedule_value": 123,
"schedules": 123,
"spend": 123,
"spend_currency": "<string>",
"starts_at": "<string>",
"status": "active",
"submitted_application_value": 123,
"submitted_applications": 123,
"title": "<string>",
"unique_click_through_rate": 123,
"unique_clicks": 123,
"updated_at": "<string>",
"viewed_content_value": 123,
"viewed_contents": 123
}
]
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>"
}
}Authorizations
A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
Headers
A unique key that makes this request safe to retry. See Idempotent requests.
255"d9105228-4a08-46b1-8b91-42fed586d383"
Pins the request to a dated API version.
"2026-07-20"
Path Parameters
The ad group ID.
Body
Response
ad group duplication started
Show child attributes
Show child attributes

