# POST: 유저 프로필 추출

<mark style="color:green;">`POST`</mark> `api/v1/export/userprofile`

적재되어있는 유저 프로필을 추출할 수 있는 API 입니다.

## **쿼리 파라미터**

<table><thead><tr><th width="210">이름</th><th>필수값 여부<select><option value="xBw0HvmJduZN" label="선택" color="blue"></option><option value="VBuJ6ubzjfbi" label="필수" color="blue"></option></select></th><th>타입</th><th>설명</th></tr></thead><tbody><tr><td><code>service_id</code></td><td><span data-option="VBuJ6ubzjfbi">필수</span></td><td>String</td><td>서비스 ID</td></tr></tbody></table>

## **헤더**

<table><thead><tr><th>필드명</th><th>필수값 여부<select><option value="3Gw9yCGdnldk" label="필수" color="blue"></option><option value="mVPQehiUZOei" label="선택" color="blue"></option></select></th><th>타입</th><th>값</th><th>설명</th></tr></thead><tbody><tr><td><code>Content-Type</code></td><td><span data-option="3Gw9yCGdnldk">필수</span></td><td>String</td><td><code>application/json</code></td><td>-</td></tr><tr><td><code>Authorization</code></td><td><span data-option="3Gw9yCGdnldk">필수</span></td><td>String</td><td><code>Bearer your-auth-token</code></td><td>API 인증 토큰</td></tr></tbody></table>

## **요청 본문**

{% hint style="danger" %}
현재 식별 속성에 대한 추출은 외부ID(`df_external_id`) 만 지원합니다. `identities_condition_type` 의 값이 `all` 이더라도, 외부ID (`df_external_id`) 만 추출됩니다.
{% endhint %}

<table><thead><tr><th>필드명</th><th>필수값 여부<select><option value="xBw0HvmJduZN" label="선택" color="blue"></option><option value="VBuJ6ubzjfbi" label="필수" color="blue"></option></select></th><th>타입</th><th>설명</th></tr></thead><tbody><tr><td><code>properties</code></td><td><span data-option="xBw0HvmJduZN">선택</span></td><td>List of String</td><td>필터링 대상 유저 속성명 리스트, 값이 존재하지 않을 경우 모든 유저 속성 추출</td></tr><tr><td><code>properties_condition_type</code></td><td><span data-option="VBuJ6ubzjfbi">필수</span></td><td>String</td><td><p>필터링 연산자, 아래 값을 지원합니다.</p><p><code>all</code> : 전체 유저 속성,</p><p><code>include</code> : <code>properties</code>의 유저 속성만 포함,</p><p><code>exclude</code> : <code>properties</code>의 유저 속성 제외</p></td></tr><tr><td><code>identities</code></td><td><span data-option="xBw0HvmJduZN">선택</span></td><td>List of String</td><td>필터링 대상 식별 속성명 리스트, 값이 존재하지 않을 경우 모든 식별 속성 추출</td></tr><tr><td><code>identities_condition_type</code></td><td><span data-option="xBw0HvmJduZN">선택</span></td><td>String</td><td><p>필터링 연산자, 아래 값을 지원합니다. 기본값은 <code>include</code>입니다.</p><p><code>all</code> : 전체 식별 속성,</p><p><code>include</code> : <code>identities</code>의 식별 속성만 포함,</p><p><code>exclude</code> : <code>identities</code>의 식별 속성 제외</p></td></tr><tr><td><code>audience</code></td><td><span data-option="xBw0HvmJduZN">선택</span></td><td>String</td><td>추출하고자 하는 유저가 포함된 오디언스ID, 값이 존재하지 않을 경우 모든 유저에 대해 추출</td></tr></tbody></table>

## **응답**

유저 프로필 추출의 응답은 `,` 로 구분되는 헤더가 포함된 csv 포맷입니다. 첫번째 줄이 헤더이고, 두번째 줄부터 추출된 데이터입니다. 아래의 표는 주요 헤더에 대한 설명입니다.

통합ID의 경우 `properties`, `properties_condition_type`, `identities`, `identities_condition_type` 에 상관없이 응답에 항상 포함됩니다.&#x20;

유저 프로필 속성에 대한 자세한 내용은 [표준 유저 프로필 속성 목록](https://github.com/IGAWorksDev/dfn-v2-developer-reference-gitbook/blob/main/user_guide/ko/begin-to-use-dfinery/event-and-property/README.md#undefined-7) 을 참고하시면 됩니다.

{% hint style="danger" %}
현재 식별 속성에 대한 추출은 외부ID(`df_external_id`) 만 지원합니다. `identities_condition_type` 의 값이 `all` 이더라도, 외부ID (`df_external_id`) 만 추출됩니다.
{% endhint %}

| 필드명                                  | 구분            | 설명                                       |
| ------------------------------------ | ------------- | ---------------------------------------- |
| `df_unified_id`                      | 통합ID          | 통합ID                                     |
| `${your-identity-property-key}`      | 식별 속성         | 식별 속성                                    |
| `${your-standard-user-property-key}` | 표준 유저 프로필 속성  | 표준 유저 프로필 속성, Datetime 타입의 경우 서비스 타임존 기준 |
| `${your-custom-user-property-key}`   | 커스텀 유저 프로필 속성 | 커스텀유저 프로필 속성, Datetime 타입의 경우 서비스 타임존 기준 |

## 요청 예시

```sh
curl -L \
  -X POST \
  -H 'Authorization: Bearer ${your-export-api-token}' \
  -H 'Content-Type: application/json' \
  'https://openapi.dfinery.ai/api/v1/export/userprofile?service_id=${your-service-id}' \
  -d '{
    "audience": "nwh3nu",
    "properties_condition_type": "exclude",
    "properties": [
        "df_birth"
    ],
    "identities": ["df_external_id"],
    "identities_condition_type": "include"
}'
```

## 응답 예시

### 성공 응답

```
custom_user_datetime,df_gender,df_kakao_ads_optin,df_membership,df_push_ads_optin,df_push_night_ads_optin,df_push_optin,df_sms_ads_optin,df_unified_id,scenario_list_string
,Male,false,,true,false,true,false,ZCUyK5F,"[""1"",""2""]"
,,false,,false,false,false,false,xrx4ib2,null
,,false,,false,false,true,false,BWCExSV,null
,,false,,false,false,false,false,uZFjOE3,null
```

### 실패 응답

자세한 내용은 [상세 응답](/api-guide/api/export-api/response.md) 참고하시면 됩니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dfinery.ai/api-guide/api/export-api/export/post-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
