# Export data Segment

<mark style="color:orange;">`POST`</mark> <mark style="color:red;">`http`</mark>`://api.ants.tech/access/api/segment/export`

## Request

### Body

* `itemTypeId`: Type to define the Customer segment or Visitor segment (`-1003` for Customer segment, -`1007` for Visitor segment)
* `delimiter`
* `columns` <mark style="color:red;">(\*)</mark>: Columns to be retrieved in the file. Please refer to the [API Get BO Attributes](https://docs.antsomi.com/api-guide/endpoint/item-api/get-bo-attributes) to have the list of the available columns.

```json
{
    "itemTypeId": -1003,
    "delimiter": "comma",
    "columns": [
        "name",
        "customer_id",
        "interest_cate",
        "core_test_arr_string",
        "user_email",
        "email_verified",
        "email",
        "user_arr_str",
        "last_updated",
        "address",
        "user_key_values",
        "core_test_vcf"
    ],
    "segmentId": 5293856
}
```

### Headers

| Name                                            | Description             |
| ----------------------------------------------- | ----------------------- |
| Authorization<mark style="color:red;">\*</mark> | Bearer `<ACCESS_TOKEN>` |

## Response

*

{% tabs %}
{% tab title="200: OK The request is succeeded, the server responds with the customer profile" %}

```json
{
  "code": 200,
  "message": "Success",
  "data": {
    "entries": [
      {
        "exportId": 32300010
      }
    ],
    "meta": {
      "total": 1
    }
  },
  "codeMessage": null,
  "duration": "0.252 ms"
}
```

{% endtab %}

{% tab title="403: Forbidden The authorization process is failed, caused by an invalid token, an expired token or a token without the valid scope." %}

```json
{
    "code": 301,
    "message": "Permission denied",
    "data": "You don't have permission to access this request!"
}
```

{% endtab %}
{% endtabs %}
