Create a User Segment

Create a segment from a file uploaded in the first step (Upload a Segment File).

Unified segments

If your account has migrated to the <a href="https://docs.enterprise.appier.com/docs/segments-getting-started" target="_blank">new segment experience</a>, this endpoint creates a unified segment. Otherwise, this endpoint creates a legacy segment.

Authorization

Send two headers with every request:

  • appId: Your AIQUA app ID.
  • Authorization: Your AIQUA API token, prefixed with the word "Token", for example, Token abc123.
post/qganalyzedata/upload_segment/

Request

  • Base URL
    https://aiqua.appier.com
  • URL
    https://aiqua.appier.com/qganalyzedata/upload_segment/
  • Auth
    API key in header appId and API key in header Authorization

Request body

namestring required

The name to assign to the segment.

descriptionstring

A description for the segment.

filenamestring required

The temporary filename returned in the response from uploading the segment file.

fieldstring required

The field name whose values are present in the uploaded file. For example, email, phoneNo, or user_id.

Example request

{
  "name": "my uploaded segment",
  "description": "This is a bunch of emails",
  "filename": "upload.csv1495733409.41",
  "field": "email"
}

Response

Success

segmentIdstring

The ID of the newly created segment.

Changes

No recorded changes to this operation across all 1 revision of this API.