Ads · Ad Audiences

Update an audience

Updates an audience.

PUThttps://api.pozy.ai/v1/ads/audiences/{audienceId}
Facebook and Instagram, Google Workspace, TikTok, LinkedIn, Pinterest and XupdateAdAudience

Guide: Audiences

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Keys with the ads resource group disabled get 403 resource_group_disabled. Authentication

Path parameters

NameTypeNotes
audienceIdrequiredstring

Request body

application/json, required

  • namestring

    Up to 255 characters.

  • descriptionstring
  • specobject
    31 child fields
    • userOsarray of string

      At least 1 item.

    • userDevicearray of string

      At least 1 item.

    • countriesarray of string
    • regionsarray of string or object

      One of:

      string
      Option 2 (2 fields)
      • keystringrequired
      • namestring
    • citiesarray of string or object

      One of:

      string
      Option 2 (4 fields)
      • keystringrequired
      • namestring
      • radiusnumber
      • distanceUnitstring

        One of mile, kilometer.

    • zipsarray of object
      2 child fields
      • keystringrequired
      • namestring
    • metrosarray of object
      2 child fields
      • keystringrequired
      • namestring
    • countryGroupsarray of string

      Each item: one of africa, asia, europe, north_america, south_america, oceania, central_america, caribbean, eea, euro_area, nafta, mercosur, afta, apec, gcc, cisfta, emerging_markets, itunes_app_store, android_free_store, android_paid_store.

    • customLocationsarray of object
      6 child fields
      • latitudenumberrequired

        -90 to 90.

      • longitudenumberrequired

        -180 to 180.

      • radiusnumberrequired
      • distanceUnitstringrequired

        One of mile, kilometer.

      • namestring
      • addressstring
    • excludedLocationsobject
      8 child fields
      • countriesarray of string
      • countryGroupsarray of string

        Each item: one of africa, asia, europe, north_america, south_america, oceania, central_america, caribbean, eea, euro_area, nafta, mercosur, afta, apec, gcc, cisfta, emerging_markets, itunes_app_store, android_free_store, android_paid_store.

      • regionsarray of object
        2 child fields
        • keystringrequired
        • namestring
      • citiesarray of object
        3 child fields
        • keystringrequired
        • radiusnumber
        • distanceUnitstring

          One of mile, kilometer.

      • zipsarray of object
        2 child fields
        • keystringrequired
        • namestring
      • placesarray of object
        1 child field
        • keystringrequired
      • neighborhoodsarray of object
        1 child field
        • keystringrequired
      • customLocationsarray of object
        6 child fields
        • latitudenumberrequired

          -90 to 90.

        • longitudenumberrequired

          -180 to 180.

        • radiusnumberrequired
        • distanceUnitstringrequired

          One of mile, kilometer.

        • namestring
        • addressstring
    • ageMininteger

      13 to 100.

    • ageMaxinteger

      13 to 100.

    • genderstring

      One of all, male, female.

    • incomeTierstring

      One of top_5, top_10, top_10_25, top_25_50.

    • languagesarray of string
    • interestsarray of object
      2 child fields
      • idstringrequired
      • namestring
    • behaviorsarray of object
      2 child fields
      • idstringrequired
      • namestring
    • workPositionsarray of object
      2 child fields
      • idstringrequired
      • namestring
    • workEmployersarray of object
      2 child fields
      • idstringrequired
      • namestring
    • workIndustriesarray of object
      2 child fields
      • idstringrequired
      • namestring
    • industriesarray of string
    • companySizesarray of string
    • senioritiesarray of string
    • jobFunctionsarray of string
    • skillsarray of string
    • audienceIncludearray of string
    • audienceExcludearray of string
    • communitiesarray of string
    • excludedCommunitiesarray of string
    • conversationKeywordsarray of string
    • excludedConversationKeywordsarray of string

Example

curl -X PUT "https://api.pozy.ai/v1/ads/audiences/6cb6496d2ca0017ff720f51f" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Acme",
  "description": "A short description",
  "spec": {
    "userOs": [
      "string"
    ],
    "userDevice": [
      "string"
    ],
    "countries": [
      "string"
    ]
  }
}'

Response

200 on success

  • audienceobject
  • messagestring
200 response
{
  "audience": {},
  "message": "Hello from Pozy"
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is read-only, scoped to other profiles, or has this resource group disabled.
404not_foundNothing with that id exists in your workspace.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in Ad Audiences