Skip to main content

Update Audience

PUT 

/audiences/:id

Update an existing audience list

Updates the membership of an existing Audience by adding new customers or removing existing ones.
Use this endpoint to manage and maintain up-to-date customer's lists, ensuring your audience data stays accurate and organized.

Updates the membership of an existing Audience list:

  • Use the assignMembers array to add new customers (email addresses), with optional profile attributes such as name, tags, location, and purchase history.
  • Use the unAssignMembers array to remove customers by their email addresses.
  • Use customAttributes on a member to set the custom attributes your account has defined, including array-type attributes. Values are returned by GET /v1/audiences/{id}/customers for static audiences; that endpoint returns email addresses only for dynamic (rule-based) audiences.

This endpoint allows you to efficiently maintain and manage your Audience data, keeping customers lists accurate and up to date.

Workflows:

  • If a workflow is associated with the contact list, adding new members will automatically trigger that workflow for the newly added contacts.

Request

Path Parameters

    id uuidrequired

    ID of the Audience to update

Body

required
    assignMembers object[]

    Customers to add in Audience

  • Array [
  • email stringrequired
    firstName string
    lastName string
    source string
    status string

    Possible values: [Subscribed, Unsubscribed, Bounced, Inactive, Spam]

    birthday string
    tags string[]
    currency string
    country string
    province string
    city string
    address1 string
    address2 string
    phone string
    postalCode string
    company string
    lastPurchaseOrder string
    lastPurchasePrice string
    latestOrderId string
    lastPurchaseDate string
    unsubscribedAt string

    This field will be returned if the customer is Unsubscribed. It will be in the ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ).

    customAttributes object

    Values for the custom attributes your account has defined, keyed by the attribute name exactly as you created it — spaces and capitalisation included (Interests, not Interest_list or interests).

    Send each value in the JSON type the attribute was defined with:

    Attribute typeSendExample
    STRINGa string"pro"
    INTEGERa whole number12
    DECIMALa number129.95
    DATEan ISO date or date-time"2026-09-01"
    BOOLEANtrue / falsetrue
    ARRAYa JSON array["cycling", "photography"]

    Prefer a real JSON array for an array attribute — that is the shape the segment builder matches against. A bracketed string such as "[cycling, photography]" is also accepted, for parity with CSV import, and is stored as a proper array.

    Dates must be ISO (2026-09-01, or a full ISO date-time). 09/01/2026 is rejected rather than guessed at, because it is a valid date under both MM/DD/YYYY and DD/MM/YYYY.

    Sending null for an attribute removes it from the contact.

    The request fails with 412 if it names an attribute your account has not defined, or if a value's type does not match the definition; the error message names every offending attribute. Nothing is stored in that case, so a 2xx means every attribute in the payload was saved.

    custom_attributes is accepted as an alias on the way in. Responses always use customAttributes.

    property name* any

    Values for the custom attributes your account has defined, keyed by the attribute name exactly as you created it — spaces and capitalisation included (Interests, not Interest_list or interests).

    Send each value in the JSON type the attribute was defined with:

    | Attribute type | Send | Example | | --- | --- | --- | | STRING | a string | "pro" | | INTEGER | a whole number | 12 | | DECIMAL | a number | 129.95 | | DATE | an ISO date or date-time | "2026-09-01" | | BOOLEAN | true / false | true | | ARRAY | a JSON array | ["cycling", "photography"] |

    Prefer a real JSON array for an array attribute — that is the shape the segment builder matches against. A bracketed string such as "[cycling, photography]" is also accepted, for parity with CSV import, and is stored as a proper array.

    Dates must be ISO (2026-09-01, or a full ISO date-time). 09/01/2026 is rejected rather than guessed at, because it is a valid date under both MM/DD/YYYY and DD/MM/YYYY.

    Sending null for an attribute removes it from the contact.

    The request fails with 412 if it names an attribute your account has not defined, or if a value's type does not match the definition; the error message names every offending attribute. Nothing is stored in that case, so a 2xx means every attribute in the payload was saved.

    custom_attributes is accepted as an alias on the way in. Responses always use customAttributes.

  • ]
  • unAssignMembers string[]

    Email of the customers to be removed

Responses

Successful operation

Loading...