Create or update a Facebook ad set

http
PUT https://services.leadconnectorhq.com/ad-publishing/facebook/adsets

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Body

NameTypeRequiredExampleDescription
idstringNoadset_123Ad set identifier
locationIdstringYesloc_abc123Account identifier
namestringNoTargeting Group AAd set name
pageIdstringNo123456789Facebook page ID
instagramActorIdstringNoig_123Instagram actor ID
messagingPlatformsstringNoMessaging platforms Possible values: 'WHATSAPP', 'MESSENGER', 'INSTAGRAM_DIRECT'
whatsappNumberstringNo+1234567890WhatsApp phone number
audienceobjectNoTargeting audience configuration including geo-accounts, locales, placements, and custom audiences
budgetobjectNoAd set budget config
conversionLocationstringNowebsiteConversion account
customEventTypestringNoPurchaseCustom event type
pixelIdstringNopx_123Conversion pixel ID
campaignIdstringYescamp_123Parent campaign ID

Responses

200 - Response
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
422 - Unprocessable Entity
json
{}

Example

curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "adset_123",
  "locationId": "loc_abc123",
  "name": "Targeting Group A",
  "pageId": "123456789",
  "instagramActorId": "ig_123",
  "messagingPlatforms": "WHATSAPP",
  "whatsappNumber": "+1234567890",
  "conversionLocation": "website",
  "customEventType": "Purchase",
  "pixelId": "px_123",
  "campaignId": "camp_123"
}'

Last updated October 26, 2026

Was this page helpful?