---
title: "Upload a Segment File"
method: POST
path: "/qganalyzedata/upload-segment-file/"
---

# Upload a Segment File

`POST /qganalyzedata/upload-segment-file/`

## Request

- Base URL: `https://aiqua.appier.com`
- URL: `https://aiqua.appier.com/qganalyzedata/upload-segment-file/`
- Auth: API key in header `appId` and API key in header `Authorization`

Upload a file to use as the source for a mapped user list segment. This is the first of two steps to create a segment; use the returned `filename` in the second step ([Create a User Segment](ref:create-a-user-segment)).

### File requirements

- The supported encoding is UTF-8 without BOM.
- The file must have one value on each line without any spaces, tabs, or commas.
- The maximum file size is 100 MB.

### 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`.

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The file to upload as the segment source. See the file requirements above.

## Response `200`

Success

- object
  - `filename` string: The temporary filename created on the server for this upload. Use this in the second step to create the segment.

---

[API](https://skmtc.dev/appier/apis/create-a-segment-by-mapping-with-user-list.md) - [All operations](https://skmtc.dev/appier/apis/create-a-segment-by-mapping-with-user-list/llms.txt) - [OpenAPI document](https://skmtc.dev/appier/apis/create-a-segment-by-mapping-with-user-list/revisions/d3c24befc0ab?raw)
