POST /api/v1/segments/{segment_id}/add_customers

Add people to a manual segment by ID. You are limited to 1000 customer IDs per request.

This endpoint requires people to have id attributes. If your workspace does not use id as an identifier, or you have not assigned people id values, you cannot add people to manual segments using the API. Our user interface does not have this limitation. You can add people to manual segments through the UI when you upload a CSV of people or as a part of a campaign. If you pass an id that does not belong to anybody in your workspace, we'll ignore it.

This endpoint lets you add people to manual segments, but a segment must exist before you can add people to it. You can create and find manual segments using the App API.

NOTE: You cannot add people to data-driven segments using the API. See our documentation on segments for more information about segments.

Servers

Path parameters

Name Type Required Description
segment_id Integer Yes

The identifier for a segment. You can find your segment's ID on its page in the dashboard—go to Segments, select your segment, and find the ID under Usage. Or you can find your segment using the App API.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Query parameters

Name Type Required Description
id_type String No

The type of ids you want to use. All of the values in the ids array must be of this type. If you don't provide this parameter, we assume that the ids array contains id values.

Possible values:

  • "email"
  • "id"
  • "cio_id"

Default value: "id"

Request body fields

Name Type Required Description
ids[] Array Yes

The customer IDs you want to add to the segment.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.