# Duplicate ad

POST https://services.leadconnectorhq.com/ad-publishing/facebook/ads/{adId}/duplicate

Duplicate an existing Facebook ad

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `adPublishing.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `adId` | string | Yes | Ad identifier |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/ad-publishing/facebook/ads/{adId}/duplicate": {
      "post": {
        "summary": "Duplicate ad",
        "operationId": "duplicateAd",
        "description": "Duplicate an existing Facebook ad",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          },
          {
            "name": "adId",
            "required": true,
            "in": "path",
            "description": "Ad identifier",
            "schema": {
              "example": "507f1f77bcf86cd799439013",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocationIdBodyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The duplicated ad, as a new draft",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacebookAdDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": [
              "adPublishing.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "LocationIdBodyDTO": {
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "description": "Location identifier",
            "example": "HChooFuiyPpVYzeJ4HMe"
          }
        },
        "required": [
          "locationId"
        ],
        "title": "LocationIdBodyDTO"
      },
      "FacebookAdDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Ad identifier",
            "example": "6a323f3f4454921db1498ce1"
          },
          "name": {
            "type": "string",
            "description": "Ad name",
            "example": "Ad 1"
          },
          "campaignId": {
            "type": "string",
            "description": "Parent campaign id",
            "example": "6a323f3e4454921db1498ccf"
          },
          "adsetId": {
            "type": "string",
            "description": "Parent ad set id",
            "example": "6a323f3f4454921db1498cd8"
          },
          "fbAdId": {
            "type": "string",
            "description": "Facebook ad id, set once published",
            "example": "120250378908850122"
          },
          "publishingStatus": {
            "type": "string",
            "description": "Publishing status. On a published entity this is not the state you asked for but the `effective_status` Meta reports, mapped back — a pause or resume re-reads it live, so an ad awaiting review comes back `IN_REVIEW` rather than `PAUSED` or `PUBLISHED`. Any effective status this service does not recognise also maps to `IN_REVIEW`.",
            "enum": [
              "DRAFT",
              "SCHEDULED",
              "PUBLISHING",
              "PUBLISHED",
              "PAUSED",
              "IN_REVIEW",
              "WITH_ISSUES",
              "REJECTED",
              "ARCHIVED",
              "FAILED"
            ],
            "example": "PUBLISHED"
          },
          "fbError": {
            "type": "string",
            "description": "Publish error from Facebook. `null` on reads when there is none.",
            "example": null,
            "nullable": true
          },
          "mediaType": {
            "type": "string",
            "description": "Creative format",
            "example": "SINGLE"
          },
          "cta": {
            "type": "string",
            "description": "Call-to-action button",
            "example": "GET_OFFER"
          },
          "multiAdvertiserAds": {
            "type": "boolean",
            "description": "Whether multi-advertiser ads are enabled",
            "example": true
          },
          "primaryTexts": {
            "description": "Primary text variants. Used by SINGLE image and video ads.",
            "example": [
              {
                "text": "Book a free demo",
                "_id": "6a3245204454921db1499735"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "description": "Variant text. May be an empty string for an unused slot.",
                  "example": "Book a free demo"
                },
                "_id": {
                  "type": "string",
                  "description": "Mongo subdocument id. Note `_id`, not `id` — the transform applies to the top-level document only.",
                  "example": "6a3245204454921db1499735"
                }
              },
              "required": [
                "text"
              ],
              "title": "FacebookAdTextVariantDTO"
            }
          },
          "headlines": {
            "description": "Headline variants",
            "example": [
              {
                "text": "Book a free demo",
                "_id": "6a3245204454921db1499735"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "description": "Variant text. May be an empty string for an unused slot.",
                  "example": "Book a free demo"
                },
                "_id": {
                  "type": "string",
                  "description": "Mongo subdocument id. Note `_id`, not `id` — the transform applies to the top-level document only.",
                  "example": "6a3245204454921db1499735"
                }
              },
              "required": [
                "text"
              ],
              "title": "FacebookAdTextVariantDTO"
            }
          },
          "descriptions": {
            "description": "Description variants",
            "example": [
              {
                "text": "Book a free demo",
                "_id": "6a3245204454921db1499735"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "description": "Variant text. May be an empty string for an unused slot.",
                  "example": "Book a free demo"
                },
                "_id": {
                  "type": "string",
                  "description": "Mongo subdocument id. Note `_id`, not `id` — the transform applies to the top-level document only.",
                  "example": "6a3245204454921db1499735"
                }
              },
              "required": [
                "text"
              ],
              "title": "FacebookAdTextVariantDTO"
            }
          },
          "primaryText": {
            "type": "string",
            "description": "Single primary text. Carried alongside `primaryTexts`, mirroring its first entry.",
            "example": "Get an instant estimate"
          },
          "headline": {
            "type": "string",
            "description": "Single headline. Used by carousel ads; mirrors the first `headlines` entry otherwise.",
            "example": "Free home valuation"
          },
          "description": {
            "type": "string",
            "description": "Single description",
            "example": "Fast and hassle-free"
          },
          "media": {
            "description": "Creative media",
            "example": [
              {
                "type": "image",
                "src": "https://staging.files.leadconnectorhq.com/file/abc/def.jpeg",
                "name": "creative.jpeg",
                "_id": "6a859661867e604d24f4d73d"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Media kind",
                  "example": "image"
                },
                "src": {
                  "type": "string",
                  "description": "Source URL of the uploaded file",
                  "example": "https://staging.files.leadconnectorhq.com/file/abc/def.jpeg"
                },
                "name": {
                  "type": "string",
                  "description": "Original file name",
                  "example": "creative.jpeg"
                },
                "_id": {
                  "type": "string",
                  "description": "Mongo subdocument id",
                  "example": "6a859661867e604d24f4d73d"
                }
              },
              "required": [
                "type",
                "src",
                "name"
              ],
              "title": "FacebookAdMediaDTO"
            }
          },
          "destinationFormId": {
            "type": "string",
            "description": "Instant form the ad routes to, when the conversion location is on-ad",
            "example": "36267736432839880"
          },
          "destinationLink": {
            "type": "string",
            "description": "Click destination. `null` when the ad routes to an instant form instead.",
            "example": null,
            "nullable": true
          },
          "unpublishedChanges": {
            "type": "boolean",
            "description": "Whether the ad has edits not yet published",
            "example": false
          },
          "createdAt": {
            "type": "string",
            "description": "Created at",
            "example": "2026-06-17T06:31:27.661Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "Updated at",
            "example": "2026-08-19T11:45:39.340Z"
          }
        },
        "required": [
          "id",
          "name",
          "campaignId",
          "adsetId",
          "publishingStatus",
          "mediaType",
          "multiAdvertiserAds",
          "primaryTexts",
          "headlines",
          "descriptions",
          "media",
          "createdAt",
          "updatedAt"
        ],
        "title": "FacebookAdDTO"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      },
      "InternalServerErrorDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "HTTP status code for an unexpected server error",
            "example": 500
          },
          "message": {
            "type": "string",
            "description": "Error message describing the server failure",
            "example": "Internal Server Error"
          }
        },
        "title": "InternalServerErrorDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/<adId>/duplicate' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```

**Node.js**

```javascript
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "locationId": "HChooFuiyPpVYzeJ4HMe"
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/ads/<adId>/duplicate', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/ad-publishing/facebook/ads/{adId}/duplicate"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

payload = {
    "locationId": "HChooFuiyPpVYzeJ4HMe"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/<adId>/duplicate',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "locationId": "HChooFuiyPpVYzeJ4HMe"
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .post("https://services.leadconnectorhq.com/ad-publishing/facebook/ads/<adId>/duplicate")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"locationId\":\"HChooFuiyPpVYzeJ4HMe\"}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/ad-publishing/facebook/ads/<adId>/duplicate"
  payload := strings.NewReader(`{
  "locationId": "HChooFuiyPpVYzeJ4HMe"
}`)
  req, _ := http.NewRequest("POST", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/ad-publishing/facebook/ads/<adId>/duplicate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "locationId": "HChooFuiyPpVYzeJ4HMe"
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "locationId": "HChooFuiyPpVYzeJ4HMe"
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/<adId>/duplicate' -Method 'POST' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
