# Upsert ad campaign group

PUT https://services.leadconnectorhq.com/ad-publishing/linkedin/ads

Create or update a LinkedIn ad campaign group with campaigns and ads

## 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 |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "2021-07-28"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/ad-publishing/linkedin/ads": {
      "put": {
        "summary": "Upsert ad campaign group",
        "operationId": "upsertAdCampaignGroup",
        "description": "Create or update a LinkedIn ad campaign group with campaigns and ads",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2021-07-28"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdCampaignGroupDataDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved campaign group, same shape as GET /linkedin/ads/{adId}",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkedInCampaignGroupDTO"
                }
              }
            }
          },
          "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": {
      "AdCampaignGroupDataDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Internal ID",
            "example": "cg_abc123"
          },
          "locationId": {
            "type": "string",
            "description": "Location ID",
            "example": "loc_abc123"
          },
          "budget": {
            "description": "Campaign group budget",
            "example": {
              "budgetType": "DAILY",
              "amount": 10000
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "budgetType": {
                    "type": "string",
                    "description": "Budget cadence",
                    "enum": [
                      "DAILY",
                      "LIFETIME"
                    ],
                    "example": "DAILY"
                  },
                  "amount": {
                    "type": "number",
                    "description": "Budget amount in the account currency",
                    "example": 30
                  },
                  "scheduleStartDate": {
                    "type": "string",
                    "description": "Schedule start",
                    "example": "2026-08-18T07:40:10.110Z"
                  },
                  "scheduleEndDate": {
                    "type": "string",
                    "description": "Schedule end",
                    "example": "2026-09-17T07:40:10.110Z"
                  }
                },
                "required": [
                  "budgetType",
                  "amount"
                ],
                "title": "LinkedInBudgetDTO"
              }
            ]
          },
          "adCampaigns": {
            "description": "Child ad campaigns",
            "example": [
              {
                "name": "Campaign 1",
                "publishingStatus": "PUBLISHED"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Internal campaign identifier",
                  "example": "camp_abc123"
                },
                "locale": {
                  "description": "Campaign locale",
                  "example": {
                    "country": "US",
                    "language": "en"
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string",
                          "description": "Country code",
                          "example": "US"
                        },
                        "language": {
                          "type": "string",
                          "description": "Language code",
                          "example": "en"
                        }
                      },
                      "required": [
                        "country",
                        "language"
                      ],
                      "title": "LocaleDTO"
                    }
                  ]
                },
                "name": {
                  "type": "string",
                  "description": "Campaign name",
                  "example": "Q1 Lead Gen Campaign"
                },
                "publishingStatus": {
                  "type": "string",
                  "description": "Publishing status",
                  "enum": [
                    "DRAFT",
                    "SCHEDULED",
                    "PUBLISHED",
                    "PUBLISHING",
                    "FAILED",
                    "IN_REVIEW",
                    "PAUSED",
                    "ARCHIVED",
                    "WITH_ISSUES",
                    "REJECTED"
                  ],
                  "example": "PUBLISHED"
                },
                "mediaType": {
                  "type": "string",
                  "description": "Creative media type for the campaign",
                  "enum": [
                    "STANDARD_UPDATE",
                    "SINGLE_VIDEO",
                    "CAROUSEL"
                  ],
                  "example": "STANDARD_UPDATE"
                },
                "audience": {
                  "description": "Campaign audience targeting",
                  "example": {
                    "geoLocations": [
                      {
                        "name": "United States",
                        "urn": "urn:li:geo:103644278",
                        "facetUrn": "urn:li:adTargetingFacet:locations",
                        "selectionType": "include"
                      }
                    ],
                    "targetAudience": {
                      "include": [
                        [
                          {
                            "urn": "urn:li:skill:1",
                            "name": "JavaScript",
                            "categoryName": "Skill",
                            "facet": "urn:li:adTargetingFacet:skills"
                          }
                        ]
                      ],
                      "exclude": [
                        {
                          "facet": "urn:li:adTargetingFacet:staffCountRanges",
                          "values": [
                            "urn:li:staffCountRange:SIZE_1"
                          ]
                        }
                      ]
                    }
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "geoLocations": {
                          "description": "Geographic location targets",
                          "example": [
                            {
                              "name": "India",
                              "urn": "urn:li:geo:102713980",
                              "facetUrn": "urn:li:adTargetingFacet:locations",
                              "selectionType": "include"
                            }
                          ],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Location display name",
                                "example": "India"
                              },
                              "urn": {
                                "type": "string",
                                "description": "Location URN",
                                "example": "urn:li:geo:12321321"
                              },
                              "facetUrn": {
                                "type": "string",
                                "description": "Facet URN",
                                "example": "urn:li:adTargetingFacet:locations"
                              },
                              "selectionType": {
                                "type": "string",
                                "description": "Selection type",
                                "example": "include",
                                "enum": [
                                  "include",
                                  "exclude"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "urn",
                              "facetUrn",
                              "selectionType"
                            ],
                            "title": "GeoLocationDTO"
                          }
                        },
                        "targetAudience": {
                          "description": "Target audience attribute selections",
                          "example": {
                            "include": [
                              [
                                {
                                  "urn": "urn:li:geo:103644278",
                                  "name": "United States",
                                  "categoryName": "Location",
                                  "facet": "urn:li:adTargetingFacet:locations"
                                }
                              ]
                            ],
                            "exclude": [
                              [
                                {
                                  "urn": "urn:li:skill:1",
                                  "name": "JavaScript",
                                  "categoryName": "Skill",
                                  "facet": "urn:li:adTargetingFacet:skills"
                                }
                              ]
                            ]
                          },
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "include": {
                                  "type": "array",
                                  "description": "Included targeting attributes (groups of ANDed attributes, ORed together)",
                                  "items": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "urn": {
                                          "type": "string",
                                          "description": "Targeting attribute URN",
                                          "example": "urn:li:geo:103644278"
                                        },
                                        "name": {
                                          "type": "string",
                                          "description": "Display name",
                                          "example": "United States"
                                        },
                                        "categoryName": {
                                          "type": "string",
                                          "description": "Category name",
                                          "example": "Location"
                                        },
                                        "facet": {
                                          "type": "string",
                                          "description": "Facet identifier",
                                          "example": "urn:li:adTargetingFacet:locations"
                                        }
                                      },
                                      "required": [
                                        "urn",
                                        "name",
                                        "categoryName",
                                        "facet"
                                      ],
                                      "title": "SelectedAttributeDTO"
                                    }
                                  },
                                  "example": [
                                    [
                                      {
                                        "urn": "urn:li:geo:103644278",
                                        "name": "United States",
                                        "categoryName": "Location",
                                        "facet": "urn:li:adTargetingFacet:locations"
                                      }
                                    ]
                                  ]
                                },
                                "exclude": {
                                  "type": "array",
                                  "description": "Excluded targeting attributes. Same nested-array shape as `include` — outer entries are AND-ed, inner entries are OR-ed. Omit or send an empty array when nothing is excluded.",
                                  "items": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "urn": {
                                          "type": "string",
                                          "description": "Targeting attribute URN",
                                          "example": "urn:li:geo:103644278"
                                        },
                                        "name": {
                                          "type": "string",
                                          "description": "Display name",
                                          "example": "United States"
                                        },
                                        "categoryName": {
                                          "type": "string",
                                          "description": "Category name",
                                          "example": "Location"
                                        },
                                        "facet": {
                                          "type": "string",
                                          "description": "Facet identifier",
                                          "example": "urn:li:adTargetingFacet:locations"
                                        }
                                      },
                                      "required": [
                                        "urn",
                                        "name",
                                        "categoryName",
                                        "facet"
                                      ],
                                      "title": "SelectedAttributeDTO"
                                    }
                                  },
                                  "example": [
                                    [
                                      {
                                        "urn": "urn:li:skill:1",
                                        "name": "JavaScript",
                                        "categoryName": "Skill",
                                        "facet": "urn:li:adTargetingFacet:skills"
                                      }
                                    ]
                                  ]
                                }
                              },
                              "title": "TargetAudienceDTO"
                            }
                          ]
                        }
                      },
                      "title": "AudienceDTO"
                    }
                  ]
                },
                "unitCost": {
                  "description": "Bid unit cost",
                  "example": {
                    "amount": 500
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "number",
                          "description": "Bid amount (major currency units)",
                          "example": 5
                        }
                      },
                      "required": [
                        "amount"
                      ],
                      "title": "UnitCostDTO"
                    }
                  ]
                },
                "campaignType": {
                  "type": "string",
                  "description": "LinkedIn campaign type",
                  "example": "SPONSORED_UPDATES"
                },
                "adCampaignGroupId": {
                  "type": "string",
                  "description": "Parent campaign group identifier",
                  "example": "cg_abc123"
                },
                "adCampaignId": {
                  "type": "string",
                  "description": "LinkedIn campaign resource ID",
                  "example": "123456789"
                },
                "ads": {
                  "description": "Ads in the campaign",
                  "example": [
                    {
                      "name": "Ad 1",
                      "headline": "Your next career move"
                    }
                  ],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Ad identifier",
                        "example": "6a840c7b1c2e6acf77b1d2a8"
                      },
                      "name": {
                        "type": "string",
                        "description": "Ad name",
                        "example": "Ad 1"
                      },
                      "adCampaignId": {
                        "type": "string",
                        "description": "Parent ad campaign id",
                        "example": "6a840c7b1c2e6acf77b1d2a5"
                      },
                      "adCampaignGroupId": {
                        "type": "string",
                        "description": "Parent campaign group id",
                        "example": "6a840c5a1c2e6acf77b1d258"
                      },
                      "adId": {
                        "type": "string",
                        "description": "LinkedIn ad id, set once published",
                        "example": "1554451156"
                      },
                      "publishingStatus": {
                        "type": "string",
                        "description": "Publishing status",
                        "example": "FAILED"
                      },
                      "linkedInError": {
                        "type": "string",
                        "description": "Rejection or publish error from LinkedIn. Empty string when there is none.",
                        "example": ""
                      },
                      "introductoryText": {
                        "type": "string",
                        "description": "Body copy above the creative",
                        "example": "Grow your pipeline this quarter"
                      },
                      "description": {
                        "type": "string",
                        "description": "Ad description",
                        "example": ""
                      },
                      "destinationUrl": {
                        "type": "string",
                        "description": "Click destination",
                        "example": "https://example.com"
                      },
                      "destinationFormId": {
                        "type": "string",
                        "description": "Lead form id when the ad routes to a form instead of a URL",
                        "example": ""
                      },
                      "callToActionLabel": {
                        "type": "string",
                        "description": "Call-to-action button label",
                        "example": "APPLY"
                      },
                      "contentReferenceString": {
                        "type": "string",
                        "description": "URN of the underlying LinkedIn share, set once published",
                        "example": "urn:li:share:7495384246371512320"
                      },
                      "media": {
                        "description": "Creative media",
                        "example": [
                          {
                            "type": "image",
                            "src": "https://staging.files.leadconnectorhq.com/file/abc/def.png",
                            "name": "creative.png",
                            "headline": "Try it free",
                            "destinationUrl": "example.com",
                            "fileSizeBytes": 1066210,
                            "urn": "urn:li:image:D5610AQEjSUtmzK0rjw",
                            "_id": "6a840c881c2e6acf77b1d3c9"
                          }
                        ],
                        "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.png"
                            },
                            "name": {
                              "type": "string",
                              "description": "Original file name",
                              "example": "creative.png"
                            },
                            "headline": {
                              "type": "string",
                              "description": "Headline shown with this media",
                              "example": "Try it free"
                            },
                            "destinationUrl": {
                              "type": "string",
                              "description": "Click destination for this media",
                              "example": "example.com"
                            },
                            "fileSizeBytes": {
                              "type": "number",
                              "description": "File size in bytes",
                              "example": 1066210
                            },
                            "urn": {
                              "type": "string",
                              "description": "LinkedIn media URN, set once the asset has been uploaded. Observed present on reads but absent from the upsert response, which also returns a new `_id` for the same media — the subdocument appears to be replaced on save.",
                              "example": "urn:li:image:D5610AQEjSUtmzK0rjw"
                            },
                            "_id": {
                              "type": "string",
                              "description": "Mongo subdocument id. Note `_id`, not `id` — the transform applies to the top-level document only.",
                              "example": "6a840c881c2e6acf77b1d3c9"
                            }
                          },
                          "required": [
                            "type",
                            "src",
                            "name"
                          ],
                          "title": "LinkedInAdMediaDTO"
                        }
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "Created at",
                        "example": "2026-08-18T07:40:43.385Z"
                      },
                      "updatedAt": {
                        "type": "string",
                        "description": "Updated at",
                        "example": "2026-08-18T07:45:04.624Z"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "adCampaignId",
                      "adCampaignGroupId",
                      "publishingStatus",
                      "linkedInError",
                      "introductoryText",
                      "description",
                      "destinationUrl",
                      "destinationFormId",
                      "callToActionLabel",
                      "media",
                      "createdAt",
                      "updatedAt"
                    ],
                    "title": "LinkedInAdDTO"
                  }
                },
                "linkedInError": {
                  "type": "string",
                  "description": "LinkedIn API error message",
                  "example": "Bid below minimum"
                },
                "meta": {
                  "type": "object",
                  "description": "Additional campaign metadata",
                  "example": {}
                }
              },
              "title": "AdCampaignDTO"
            }
          },
          "adBudgetOptimization": {
            "type": "string",
            "description": "Ad budget optimization mode",
            "enum": [
              "MAXIMUM_DELIVERY",
              "COST_CAP"
            ],
            "example": "MAXIMUM_DELIVERY"
          },
          "objectiveType": {
            "type": "string",
            "description": "Campaign group objective",
            "enum": [
              "LEAD_GENERATION",
              "WEBSITE_VISIT"
            ],
            "example": "LEAD_GENERATION"
          },
          "name": {
            "type": "string",
            "description": "Campaign group name",
            "example": "Q1 Lead Gen"
          },
          "adCampaignGroupId": {
            "type": "string",
            "description": "LinkedIn campaign group resource ID",
            "example": "123456789"
          },
          "publishingStatus": {
            "type": "string",
            "description": "Publishing status",
            "enum": [
              "DRAFT",
              "SCHEDULED",
              "PUBLISHED",
              "PUBLISHING",
              "FAILED",
              "IN_REVIEW",
              "PAUSED",
              "ARCHIVED",
              "WITH_ISSUES",
              "REJECTED"
            ],
            "example": "PUBLISHED"
          },
          "linkedInAdAccountId": {
            "type": "string",
            "description": "LinkedIn ad account identifier",
            "example": "12345678"
          },
          "unpublishedChanges": {
            "type": "boolean",
            "description": "Whether the campaign group has unpublished changes",
            "example": false
          },
          "meta": {
            "type": "object",
            "description": "Additional metadata",
            "example": {}
          },
          "linkedInError": {
            "type": "string",
            "description": "LinkedIn API error message",
            "example": "Budget below minimum"
          },
          "customValueMappings": {
            "type": "object",
            "description": "User-provided overrides for custom_values merge tags used in ad copy",
            "example": {
              "{{ custom_values.pet_name }}": "Fluffy"
            }
          }
        },
        "required": [
          "locationId"
        ],
        "title": "AdCampaignGroupDataDTO"
      },
      "LinkedInCampaignGroupDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Campaign group identifier",
            "example": "6a840c5a1c2e6acf77b1d258"
          },
          "name": {
            "type": "string",
            "description": "Campaign group name",
            "example": "Q3 demand generation"
          },
          "locationId": {
            "type": "string",
            "description": "Location identifier",
            "example": "fRMewNQIxSyZ5R4nQyit"
          },
          "linkedInAdAccountId": {
            "type": "string",
            "description": "LinkedIn ad account id the group belongs to",
            "example": "556129919"
          },
          "adCampaignGroupId": {
            "type": "string",
            "description": "LinkedIn campaign group id, set once published",
            "example": "1192521246"
          },
          "publishingStatus": {
            "type": "string",
            "description": "Publishing status",
            "example": "PAUSED"
          },
          "linkedInError": {
            "type": "string",
            "description": "Publish or review error from LinkedIn. Empty string when there is none.",
            "example": ""
          },
          "objectiveType": {
            "type": "string",
            "description": "Campaign objective",
            "enum": [
              "LEAD_GENERATION",
              "WEBSITE_VISIT"
            ],
            "example": "WEBSITE_VISIT"
          },
          "adBudgetOptimization": {
            "type": "string",
            "description": "Budget optimisation mode",
            "enum": [
              "MAXIMUM_DELIVERY",
              "COST_CAP"
            ],
            "example": "MAXIMUM_DELIVERY"
          },
          "budget": {
            "description": "Budget configuration",
            "example": {
              "budgetType": "DAILY",
              "amount": 30,
              "scheduleStartDate": "2026-08-18T07:40:10.110Z",
              "scheduleEndDate": "2026-09-17T07:40:10.110Z"
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "budgetType": {
                    "type": "string",
                    "description": "Budget cadence",
                    "enum": [
                      "DAILY",
                      "LIFETIME"
                    ],
                    "example": "DAILY"
                  },
                  "amount": {
                    "type": "number",
                    "description": "Budget amount in the account currency",
                    "example": 30
                  },
                  "scheduleStartDate": {
                    "type": "string",
                    "description": "Schedule start",
                    "example": "2026-08-18T07:40:10.110Z"
                  },
                  "scheduleEndDate": {
                    "type": "string",
                    "description": "Schedule end",
                    "example": "2026-09-17T07:40:10.110Z"
                  }
                },
                "required": [
                  "budgetType",
                  "amount"
                ],
                "title": "LinkedInBudgetDTO"
              }
            ]
          },
          "adCampaigns": {
            "description": "Ad campaigns with their ads",
            "example": [
              {
                "id": "6a840c7b1c2e6acf77b1d2a5",
                "name": "Ad set 1",
                "adCampaignGroupId": "6a840c5a1c2e6acf77b1d258",
                "adCampaignId": "869320926",
                "publishingStatus": "PAUSED",
                "linkedInError": "",
                "campaignType": "SPONSORED_UPDATES",
                "mediaType": "STANDARD_UPDATE",
                "locale": {
                  "country": "US",
                  "language": "en"
                },
                "unitCost": {
                  "amount": 1
                },
                "audience": {
                  "geoLocations": [
                    {
                      "name": "Mumbai, Maharashtra, India",
                      "urn": "urn:li:geo:106164952",
                      "facetUrn": "urn:li:adTargetingFacet:locations",
                      "selectionType": "include"
                    }
                  ],
                  "targetAudience": {
                    "include": [
                      {
                        "facet": "urn:li:adTargetingFacet:locations",
                        "values": [
                          "urn:li:geo:106164952"
                        ]
                      }
                    ],
                    "exclude": [
                      {
                        "facet": "urn:li:adTargetingFacet:staffCountRanges",
                        "values": [
                          "urn:li:staffCountRange:SIZE_1"
                        ]
                      }
                    ]
                  }
                },
                "ads": [
                  {
                    "id": "6a840c7b1c2e6acf77b1d2a8",
                    "name": "Ad 1",
                    "adCampaignId": "6a840c7b1c2e6acf77b1d2a5",
                    "adCampaignGroupId": "6a840c5a1c2e6acf77b1d258",
                    "adId": "1554451156",
                    "publishingStatus": "FAILED",
                    "linkedInError": "",
                    "introductoryText": "Grow your pipeline this quarter",
                    "description": "",
                    "destinationUrl": "https://example.com",
                    "destinationFormId": "",
                    "callToActionLabel": "APPLY",
                    "contentReferenceString": "urn:li:share:7495384246371512320",
                    "media": [
                      {
                        "type": "image",
                        "src": "https://staging.files.leadconnectorhq.com/file/abc/def.png",
                        "name": "creative.png",
                        "headline": "Try it free",
                        "destinationUrl": "example.com",
                        "fileSizeBytes": 1066210,
                        "urn": "urn:li:image:D5610AQEjSUtmzK0rjw",
                        "_id": "6a840c881c2e6acf77b1d3c9"
                      }
                    ],
                    "createdAt": "2026-08-18T07:40:43.385Z",
                    "updatedAt": "2026-08-18T07:45:04.624Z"
                  }
                ],
                "createdAt": "2026-08-18T07:40:43.369Z",
                "updatedAt": "2026-08-18T07:45:04.746Z"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Ad campaign identifier",
                  "example": "6a840c7b1c2e6acf77b1d2a5"
                },
                "name": {
                  "type": "string",
                  "description": "Ad campaign name",
                  "example": "Ad set 1"
                },
                "adCampaignGroupId": {
                  "type": "string",
                  "description": "Parent campaign group id",
                  "example": "6a840c5a1c2e6acf77b1d258"
                },
                "adCampaignId": {
                  "type": "string",
                  "description": "LinkedIn campaign id, set once published",
                  "example": "869320926"
                },
                "publishingStatus": {
                  "type": "string",
                  "description": "Publishing status",
                  "example": "PAUSED"
                },
                "linkedInError": {
                  "type": "string",
                  "description": "Publish error from LinkedIn. Empty string when there is none.",
                  "example": ""
                },
                "campaignType": {
                  "type": "string",
                  "description": "Campaign type",
                  "enum": [
                    "SPONSORED_UPDATES"
                  ],
                  "example": "SPONSORED_UPDATES"
                },
                "mediaType": {
                  "type": "string",
                  "description": "Creative format",
                  "enum": [
                    "STANDARD_UPDATE",
                    "CAROUSEL",
                    "SINGLE_VIDEO"
                  ],
                  "example": "STANDARD_UPDATE"
                },
                "locale": {
                  "description": "Campaign locale",
                  "example": {
                    "country": "US",
                    "language": "en"
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string",
                          "description": "Two-letter country code",
                          "example": "US"
                        },
                        "language": {
                          "type": "string",
                          "description": "Two-letter language code",
                          "example": "en"
                        }
                      },
                      "required": [
                        "country",
                        "language"
                      ],
                      "title": "LinkedInLocaleDTO"
                    }
                  ]
                },
                "unitCost": {
                  "description": "Bid configuration",
                  "example": {
                    "amount": 1
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "number",
                          "description": "Bid amount in the account currency",
                          "example": 1
                        }
                      },
                      "required": [
                        "amount"
                      ],
                      "title": "LinkedInUnitCostDTO"
                    }
                  ]
                },
                "audience": {
                  "description": "Targeting",
                  "example": {
                    "geoLocations": [
                      {
                        "name": "Mumbai, Maharashtra, India",
                        "urn": "urn:li:geo:106164952",
                        "facetUrn": "urn:li:adTargetingFacet:locations",
                        "selectionType": "include"
                      }
                    ],
                    "targetAudience": {
                      "include": [
                        {
                          "facet": "urn:li:adTargetingFacet:locations",
                          "values": [
                            "urn:li:geo:106164952"
                          ]
                        }
                      ],
                      "exclude": [
                        {
                          "facet": "urn:li:adTargetingFacet:staffCountRanges",
                          "values": [
                            "urn:li:staffCountRange:SIZE_1"
                          ]
                        }
                      ]
                    }
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "geoLocations": {
                          "description": "Geographic targeting",
                          "example": [
                            {
                              "name": "Mumbai, Maharashtra, India",
                              "urn": "urn:li:geo:106164952",
                              "facetUrn": "urn:li:adTargetingFacet:locations",
                              "selectionType": "include"
                            }
                          ],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Display name",
                                "example": "Mumbai, Maharashtra, India"
                              },
                              "urn": {
                                "type": "string",
                                "description": "Entity URN. The scheme depends on the facet being searched.",
                                "example": "urn:li:geo:106164952"
                              },
                              "facetUrn": {
                                "type": "string",
                                "description": "Facet the entity belongs to",
                                "example": "urn:li:adTargetingFacet:locations"
                              },
                              "selectionType": {
                                "type": "string",
                                "description": "Whether the location is targeted or excluded",
                                "enum": [
                                  "include",
                                  "exclude"
                                ],
                                "example": "include"
                              }
                            },
                            "required": [
                              "name",
                              "urn",
                              "facetUrn",
                              "selectionType"
                            ],
                            "title": "LinkedInGeoLocationDTO"
                          }
                        },
                        "targetAudience": {
                          "type": "object",
                          "description": "Attribute targeting, as nested include/exclude arrays",
                          "additionalProperties": true,
                          "example": {
                            "include": [
                              {
                                "facet": "urn:li:adTargetingFacet:locations",
                                "values": [
                                  "urn:li:geo:106164952"
                                ]
                              }
                            ],
                            "exclude": [
                              {
                                "facet": "urn:li:adTargetingFacet:staffCountRanges",
                                "values": [
                                  "urn:li:staffCountRange:SIZE_1"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "geoLocations"
                      ],
                      "title": "LinkedInCampaignAudienceDTO"
                    }
                  ]
                },
                "ads": {
                  "description": "Ads in this campaign",
                  "example": [
                    {
                      "id": "6a840c7b1c2e6acf77b1d2a8",
                      "name": "Ad 1",
                      "adCampaignId": "6a840c7b1c2e6acf77b1d2a5",
                      "adCampaignGroupId": "6a840c5a1c2e6acf77b1d258",
                      "adId": "1554451156",
                      "publishingStatus": "FAILED",
                      "linkedInError": "",
                      "introductoryText": "Grow your pipeline this quarter",
                      "description": "",
                      "destinationUrl": "https://example.com",
                      "destinationFormId": "",
                      "callToActionLabel": "APPLY",
                      "contentReferenceString": "urn:li:share:7495384246371512320",
                      "media": [
                        {
                          "type": "image",
                          "src": "https://staging.files.leadconnectorhq.com/file/abc/def.png",
                          "name": "creative.png",
                          "headline": "Try it free",
                          "destinationUrl": "example.com",
                          "fileSizeBytes": 1066210,
                          "urn": "urn:li:image:D5610AQEjSUtmzK0rjw",
                          "_id": "6a840c881c2e6acf77b1d3c9"
                        }
                      ],
                      "createdAt": "2026-08-18T07:40:43.385Z",
                      "updatedAt": "2026-08-18T07:45:04.624Z"
                    }
                  ],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Ad identifier",
                        "example": "6a840c7b1c2e6acf77b1d2a8"
                      },
                      "name": {
                        "type": "string",
                        "description": "Ad name",
                        "example": "Ad 1"
                      },
                      "adCampaignId": {
                        "type": "string",
                        "description": "Parent ad campaign id",
                        "example": "6a840c7b1c2e6acf77b1d2a5"
                      },
                      "adCampaignGroupId": {
                        "type": "string",
                        "description": "Parent campaign group id",
                        "example": "6a840c5a1c2e6acf77b1d258"
                      },
                      "adId": {
                        "type": "string",
                        "description": "LinkedIn ad id, set once published",
                        "example": "1554451156"
                      },
                      "publishingStatus": {
                        "type": "string",
                        "description": "Publishing status",
                        "example": "FAILED"
                      },
                      "linkedInError": {
                        "type": "string",
                        "description": "Rejection or publish error from LinkedIn. Empty string when there is none.",
                        "example": ""
                      },
                      "introductoryText": {
                        "type": "string",
                        "description": "Body copy above the creative",
                        "example": "Grow your pipeline this quarter"
                      },
                      "description": {
                        "type": "string",
                        "description": "Ad description",
                        "example": ""
                      },
                      "destinationUrl": {
                        "type": "string",
                        "description": "Click destination",
                        "example": "https://example.com"
                      },
                      "destinationFormId": {
                        "type": "string",
                        "description": "Lead form id when the ad routes to a form instead of a URL",
                        "example": ""
                      },
                      "callToActionLabel": {
                        "type": "string",
                        "description": "Call-to-action button label",
                        "example": "APPLY"
                      },
                      "contentReferenceString": {
                        "type": "string",
                        "description": "URN of the underlying LinkedIn share, set once published",
                        "example": "urn:li:share:7495384246371512320"
                      },
                      "media": {
                        "description": "Creative media",
                        "example": [
                          {
                            "type": "image",
                            "src": "https://staging.files.leadconnectorhq.com/file/abc/def.png",
                            "name": "creative.png",
                            "headline": "Try it free",
                            "destinationUrl": "example.com",
                            "fileSizeBytes": 1066210,
                            "urn": "urn:li:image:D5610AQEjSUtmzK0rjw",
                            "_id": "6a840c881c2e6acf77b1d3c9"
                          }
                        ],
                        "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.png"
                            },
                            "name": {
                              "type": "string",
                              "description": "Original file name",
                              "example": "creative.png"
                            },
                            "headline": {
                              "type": "string",
                              "description": "Headline shown with this media",
                              "example": "Try it free"
                            },
                            "destinationUrl": {
                              "type": "string",
                              "description": "Click destination for this media",
                              "example": "example.com"
                            },
                            "fileSizeBytes": {
                              "type": "number",
                              "description": "File size in bytes",
                              "example": 1066210
                            },
                            "urn": {
                              "type": "string",
                              "description": "LinkedIn media URN, set once the asset has been uploaded. Observed present on reads but absent from the upsert response, which also returns a new `_id` for the same media — the subdocument appears to be replaced on save.",
                              "example": "urn:li:image:D5610AQEjSUtmzK0rjw"
                            },
                            "_id": {
                              "type": "string",
                              "description": "Mongo subdocument id. Note `_id`, not `id` — the transform applies to the top-level document only.",
                              "example": "6a840c881c2e6acf77b1d3c9"
                            }
                          },
                          "required": [
                            "type",
                            "src",
                            "name"
                          ],
                          "title": "LinkedInAdMediaDTO"
                        }
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "Created at",
                        "example": "2026-08-18T07:40:43.385Z"
                      },
                      "updatedAt": {
                        "type": "string",
                        "description": "Updated at",
                        "example": "2026-08-18T07:45:04.624Z"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "adCampaignId",
                      "adCampaignGroupId",
                      "publishingStatus",
                      "linkedInError",
                      "introductoryText",
                      "description",
                      "destinationUrl",
                      "destinationFormId",
                      "callToActionLabel",
                      "media",
                      "createdAt",
                      "updatedAt"
                    ],
                    "title": "LinkedInAdDTO"
                  }
                },
                "createdAt": {
                  "type": "string",
                  "description": "Created at",
                  "example": "2026-08-18T07:40:43.369Z"
                },
                "updatedAt": {
                  "type": "string",
                  "description": "Updated at",
                  "example": "2026-08-18T07:45:04.746Z"
                }
              },
              "required": [
                "id",
                "name",
                "adCampaignGroupId",
                "publishingStatus",
                "linkedInError",
                "campaignType",
                "mediaType",
                "locale",
                "audience",
                "ads",
                "createdAt",
                "updatedAt"
              ],
              "title": "LinkedInAdCampaignDTO"
            }
          },
          "meta": {
            "description": "Ancillary metadata",
            "example": {
              "evaluate": "{\"opportunityScore\":60,\"confidence\":\"High\",\"band\":\"Medium\",\"categories\":[],\"fixItems\":[]}"
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "evaluate": {
                    "type": "string",
                    "description": "Opportunity-score result, stored as a JSON **string** rather than an object — parse before use. Present only after the campaign group has been evaluated.",
                    "example": "{\"opportunityScore\":60,\"confidence\":\"High\",\"band\":\"Medium\",\"categories\":[],\"fixItems\":[]}"
                  }
                },
                "title": "LinkedInCampaignGroupMetaDTO"
              }
            ]
          },
          "unpublishedChanges": {
            "type": "boolean",
            "description": "Whether the group has edits not yet published. Absent on reads that have never been edited; set by the upsert.",
            "example": true
          },
          "createdBy": {
            "type": "string",
            "description": "User who created the group",
            "example": "uPy3hdVIuuNlbWOpBYGw"
          },
          "updatedBy": {
            "type": "string",
            "description": "User who last updated the group",
            "example": "uPy3hdVIuuNlbWOpBYGw"
          },
          "createdAt": {
            "type": "string",
            "description": "Created at",
            "example": "2026-08-18T07:40:10.354Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "Updated at",
            "example": "2026-08-18T07:45:04.812Z"
          }
        },
        "required": [
          "id",
          "name",
          "locationId",
          "linkedInAdAccountId",
          "publishingStatus",
          "linkedInError",
          "objectiveType",
          "budget",
          "adCampaigns",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt"
        ],
        "title": "LinkedInCampaignGroupDTO"
      },
      "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 PUT 'https://services.leadconnectorhq.com/ad-publishing/linkedin/ads' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "id": "cg_abc123",
  "locationId": "loc_abc123",
  "budget": {
    "budgetType": "DAILY",
    "amount": 10000
  },
  "adCampaigns": [
    {
      "name": "Campaign 1",
      "publishingStatus": "PUBLISHED"
    }
  ],
  "adBudgetOptimization": "MAXIMUM_DELIVERY",
  "objectiveType": "LEAD_GENERATION",
  "name": "Q1 Lead Gen",
  "adCampaignGroupId": "123456789",
  "publishingStatus": "PUBLISHED",
  "linkedInAdAccountId": "12345678",
  "unpublishedChanges": false,
  "meta": {},
  "linkedInError": "Budget below minimum",
  "customValueMappings": {
    "{{ custom_values.pet_name }}": "Fluffy"
  }
}'
```

**Node.js**

```javascript
const options = {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: '2021-07-28',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "id": "cg_abc123",
      "locationId": "loc_abc123",
      "budget": {
        "budgetType": "DAILY",
        "amount": 10000
      },
      "adCampaigns": [
        {
          "name": "Campaign 1",
          "publishingStatus": "PUBLISHED"
        }
      ],
      "adBudgetOptimization": "MAXIMUM_DELIVERY",
      "objectiveType": "LEAD_GENERATION",
      "name": "Q1 Lead Gen",
      "adCampaignGroupId": "123456789",
      "publishingStatus": "PUBLISHED",
      "linkedInAdAccountId": "12345678",
      "unpublishedChanges": false,
      "meta": {},
      "linkedInError": "Budget below minimum",
      "customValueMappings": {
        "{{ custom_values.pet_name }}": "Fluffy"
      }
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/ads', 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/linkedin/ads"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "2021-07-28"
}

payload = {
    "id": "cg_abc123",
    "locationId": "loc_abc123",
    "budget": {
        "budgetType": "DAILY",
        "amount": 10000
    },
    "adCampaigns": [
        {
            "name": "Campaign 1",
            "publishingStatus": "PUBLISHED"
        }
    ],
    "adBudgetOptimization": "MAXIMUM_DELIVERY",
    "objectiveType": "LEAD_GENERATION",
    "name": "Q1 Lead Gen",
    "adCampaignGroupId": "123456789",
    "publishingStatus": "PUBLISHED",
    "linkedInAdAccountId": "12345678",
    "unpublishedChanges": false,
    "meta": {},
    "linkedInError": "Budget below minimum",
    "customValueMappings": {
        "{{ custom_values.pet_name }}": "Fluffy"
    }
}

response = requests.put(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/linkedin/ads',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: 2021-07-28',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "id": "cg_abc123",
  "locationId": "loc_abc123",
  "budget": {
    "budgetType": "DAILY",
    "amount": 10000
  },
  "adCampaigns": [
    {
      "name": "Campaign 1",
      "publishingStatus": "PUBLISHED"
    }
  ],
  "adBudgetOptimization": "MAXIMUM_DELIVERY",
  "objectiveType": "LEAD_GENERATION",
  "name": "Q1 Lead Gen",
  "adCampaignGroupId": "123456789",
  "publishingStatus": "PUBLISHED",
  "linkedInAdAccountId": "12345678",
  "unpublishedChanges": false,
  "meta": {},
  "linkedInError": "Budget below minimum",
  "customValueMappings": {
    "{{ custom_values.pet_name }}": "Fluffy"
  }
}',
]);

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

**Java**

```java
HttpResponse<String> response = Unirest
  .put("https://services.leadconnectorhq.com/ad-publishing/linkedin/ads")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "2021-07-28")
  .header("Content-Type", "application/json")
  .body("{\"id\":\"cg_abc123\",\"locationId\":\"loc_abc123\",\"budget\":{\"budgetType\":\"DAILY\",\"amount\":10000},\"adCampaigns\":[{\"name\":\"Campaign 1\",\"publishingStatus\":\"PUBLISHED\"}],\"adBudgetOptimization\":\"MAXIMUM_DELIVERY\",\"objectiveType\":\"LEAD_GENERATION\",\"name\":\"Q1 Lead Gen\",\"adCampaignGroupId\":\"123456789\",\"publishingStatus\":\"PUBLISHED\",\"linkedInAdAccountId\":\"12345678\",\"unpublishedChanges\":false,\"meta\":{},\"linkedInError\":\"Budget below minimum\",\"customValueMappings\":{\"{{ custom_values.pet_name }}\":\"Fluffy\"}}")
  .asString();
```

**Go**

```go
package main

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

func main() {
  url := "https://services.leadconnectorhq.com/ad-publishing/linkedin/ads"
  payload := strings.NewReader(`{
  "id": "cg_abc123",
  "locationId": "loc_abc123",
  "budget": {
    "budgetType": "DAILY",
    "amount": 10000
  },
  "adCampaigns": [
    {
      "name": "Campaign 1",
      "publishingStatus": "PUBLISHED"
    }
  ],
  "adBudgetOptimization": "MAXIMUM_DELIVERY",
  "objectiveType": "LEAD_GENERATION",
  "name": "Q1 Lead Gen",
  "adCampaignGroupId": "123456789",
  "publishingStatus": "PUBLISHED",
  "linkedInAdAccountId": "12345678",
  "unpublishedChanges": false,
  "meta": {},
  "linkedInError": "Budget below minimum",
  "customValueMappings": {
    "{{ custom_values.pet_name }}": "Fluffy"
  }
}`)
  req, _ := http.NewRequest("PUT", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "2021-07-28")

  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/linkedin/ads")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "2021-07-28"
request["Content-Type"] = "application/json"
request.body = '{
  "id": "cg_abc123",
  "locationId": "loc_abc123",
  "budget": {
    "budgetType": "DAILY",
    "amount": 10000
  },
  "adCampaigns": [
    {
      "name": "Campaign 1",
      "publishingStatus": "PUBLISHED"
    }
  ],
  "adBudgetOptimization": "MAXIMUM_DELIVERY",
  "objectiveType": "LEAD_GENERATION",
  "name": "Q1 Lead Gen",
  "adCampaignGroupId": "123456789",
  "publishingStatus": "PUBLISHED",
  "linkedInAdAccountId": "12345678",
  "unpublishedChanges": false,
  "meta": {},
  "linkedInError": "Budget below minimum",
  "customValueMappings": {
    "{{ custom_values.pet_name }}": "Fluffy"
  }
}'

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

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "2021-07-28"
}

$body = '{
  "id": "cg_abc123",
  "locationId": "loc_abc123",
  "budget": {
    "budgetType": "DAILY",
    "amount": 10000
  },
  "adCampaigns": [
    {
      "name": "Campaign 1",
      "publishingStatus": "PUBLISHED"
    }
  ],
  "adBudgetOptimization": "MAXIMUM_DELIVERY",
  "objectiveType": "LEAD_GENERATION",
  "name": "Q1 Lead Gen",
  "adCampaignGroupId": "123456789",
  "publishingStatus": "PUBLISHED",
  "linkedInAdAccountId": "12345678",
  "unpublishedChanges": false,
  "meta": {},
  "linkedInError": "Budget below minimum",
  "customValueMappings": {
    "{{ custom_values.pet_name }}": "Fluffy"
  }
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/ad-publishing/linkedin/ads' -Method 'PUT' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
