> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/datamart-operations/segment-exports.md).

# Segment Exports

Operations related to Segment Exports for exporting all user identifiers belonging to a specific segment. Enables bulk extraction of segment user data to files for external processing (like partner integrations, or data sharing scenarios without using mediarithmics platform capabilities). Exports can include various identifier types (emails, cookies, user accounts, device IDs) based on configuration requirements.

## POST /audience\_segments/{segment\_id}/exports/{export\_id}/action

> Perform action on JobExecution

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Segment Exports","description":"Operations related to Segment Exports for exporting all user identifiers belonging to a specific segment. Enables bulk extraction of segment user data to files for external processing (like partner integrations, or data sharing scenarios without using mediarithmics platform capabilities). Exports can include various identifier types (emails, cookies, user accounts, device IDs) based on configuration requirements."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/audience_segments/{segment_id}/exports/{export_id}/action":{"post":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/NewPublicJobExecutionResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Segment Exports"],"parameters":[{"explode":false,"name":"segment_id","style":"simple","required":true,"in":"path","schema":{"type":"integer","format":"int64"}},{"schema":{"type":"integer","format":"int64"},"required":true,"in":"path","name":"export_id","style":"simple","explode":false}],"summary":"Perform action on JobExecution","operationId":"performAudienceSegmentExportExecutionAction","requestBody":{"description":"The action to perform","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MakeJobExecutionActionResource"}}},"required":true},"description":""}}},"components":{"schemas":{"NewPublicJobExecutionResource":{"allOf":[{"$ref":"#/components/schemas/NewReadOnlyPublicJobExecutionResource"},{"type":"object","properties":{"organisation_id":{"type":"string","readOnly":false},"start_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"job_type":{"type":"string","readOnly":false},"num_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"community_id":{"type":"string","readOnly":true},"completed_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"max_retry_count":{"type":"integer","format":"int32","default":0,"readOnly":false},"parameters":{"type":"string","readOnly":false},"result":{"type":"string","readOnly":false},"duration":{"$ref":"#/components/schemas/Duration"},"cancel_status":{"$ref":"#/components/schemas/CancelStatus"},"is_retryable":{"type":"boolean","default":false,"readOnly":false},"status":{"$ref":"#/components/schemas/JobExecutionPublicStatus"},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"user_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":false},"erroneous_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"retry_count":{"type":"integer","format":"int32","default":0,"readOnly":false},"permalink_uri":{"type":"string","readOnly":false},"debug":{"type":"string","readOnly":false},"external_name":{"type":"string","readOnly":false}},"required":["creation_date","id","is_retryable","job_type","permalink_uri","retry_count","status"]}]},"NewReadOnlyPublicJobExecutionResource":{"type":"object"},"Duration":{"type":"number","description":"a length of time in milliseconds"},"CancelStatus":{"type":"string","enum":["REQUESTED","IN_PROGRESS","CANCELED","ABORTED"],"readOnly":false},"JobExecutionPublicStatus":{"type":"string","enum":["PENDING","RUNNING","SUCCEEDED","FAILED","CANCELED"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]},"MakeJobExecutionActionResource":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/JobExecutionAction"}},"required":["action"]},"JobExecutionAction":{"type":"string","enum":["CANCEL"],"readOnly":false}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /audience\_segments/{segment\_id}/exports/{export\_id}

> Get an audience segment export by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Segment Exports","description":"Operations related to Segment Exports for exporting all user identifiers belonging to a specific segment. Enables bulk extraction of segment user data to files for external processing (like partner integrations, or data sharing scenarios without using mediarithmics platform capabilities). Exports can include various identifier types (emails, cookies, user accounts, device IDs) based on configuration requirements."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/audience_segments/{segment_id}/exports/{export_id}":{"get":{"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/NewPublicJobExecutionResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"getAudienceSegmentExport","summary":"Get an audience segment export by id","tags":["Segment Exports"],"parameters":[{"in":"path","name":"segment_id","required":true,"style":"simple","schema":{"type":"integer","format":"int64"},"explode":false},{"required":true,"in":"path","style":"simple","name":"export_id","explode":false,"schema":{"type":"integer","format":"int64"}}]}}},"components":{"schemas":{"NewPublicJobExecutionResource":{"allOf":[{"$ref":"#/components/schemas/NewReadOnlyPublicJobExecutionResource"},{"type":"object","properties":{"organisation_id":{"type":"string","readOnly":false},"start_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"job_type":{"type":"string","readOnly":false},"num_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"community_id":{"type":"string","readOnly":true},"completed_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"max_retry_count":{"type":"integer","format":"int32","default":0,"readOnly":false},"parameters":{"type":"string","readOnly":false},"result":{"type":"string","readOnly":false},"duration":{"$ref":"#/components/schemas/Duration"},"cancel_status":{"$ref":"#/components/schemas/CancelStatus"},"is_retryable":{"type":"boolean","default":false,"readOnly":false},"status":{"$ref":"#/components/schemas/JobExecutionPublicStatus"},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"user_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":false},"erroneous_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"retry_count":{"type":"integer","format":"int32","default":0,"readOnly":false},"permalink_uri":{"type":"string","readOnly":false},"debug":{"type":"string","readOnly":false},"external_name":{"type":"string","readOnly":false}},"required":["creation_date","id","is_retryable","job_type","permalink_uri","retry_count","status"]}]},"NewReadOnlyPublicJobExecutionResource":{"type":"object"},"Duration":{"type":"number","description":"a length of time in milliseconds"},"CancelStatus":{"type":"string","enum":["REQUESTED","IN_PROGRESS","CANCELED","ABORTED"],"readOnly":false},"JobExecutionPublicStatus":{"type":"string","enum":["PENDING","RUNNING","SUCCEEDED","FAILED","CANCELED"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /audience\_segments/{segment\_id}/exports

> Search the audience segment exports associated with a given audience segment id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Segment Exports","description":"Operations related to Segment Exports for exporting all user identifiers belonging to a specific segment. Enables bulk extraction of segment user data to files for external processing (like partner integrations, or data sharing scenarios without using mediarithmics platform capabilities). Exports can include various identifier types (emails, cookies, user accounts, device IDs) based on configuration requirements."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/audience_segments/{segment_id}/exports":{"get":{"parameters":[{"name":"segment_id","schema":{"type":"integer","format":"int64"},"explode":false,"style":"simple","in":"path","required":true},{"style":"form","required":false,"description":"Status of the export","explode":true,"schema":{"$ref":"#/components/schemas/JobExecutionPublicStatus"},"name":"status","in":"query"},{"required":false,"schema":{"type":"integer","format":"int32"},"in":"query","style":"form","explode":true,"name":"first_result","description":"Offset from which the search must be performed"},{"name":"max_results","style":"form","schema":{"type":"integer","format":"int32"},"explode":true,"in":"query","required":false,"description":"Number of maximum items that shall be return by this search"}],"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"max_results":{"type":"integer"},"count":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NewPublicJobExecutionResource"}},"first_result":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Segment Exports"],"summary":"Search the audience segment exports associated with a given audience segment id","operationId":"getAudienceSegmentExports"}}},"components":{"schemas":{"JobExecutionPublicStatus":{"type":"string","enum":["PENDING","RUNNING","SUCCEEDED","FAILED","CANCELED"],"readOnly":false},"NewPublicJobExecutionResource":{"allOf":[{"$ref":"#/components/schemas/NewReadOnlyPublicJobExecutionResource"},{"type":"object","properties":{"organisation_id":{"type":"string","readOnly":false},"start_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"job_type":{"type":"string","readOnly":false},"num_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"community_id":{"type":"string","readOnly":true},"completed_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"max_retry_count":{"type":"integer","format":"int32","default":0,"readOnly":false},"parameters":{"type":"string","readOnly":false},"result":{"type":"string","readOnly":false},"duration":{"$ref":"#/components/schemas/Duration"},"cancel_status":{"$ref":"#/components/schemas/CancelStatus"},"is_retryable":{"type":"boolean","default":false,"readOnly":false},"status":{"$ref":"#/components/schemas/JobExecutionPublicStatus"},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"user_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":false},"erroneous_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"retry_count":{"type":"integer","format":"int32","default":0,"readOnly":false},"permalink_uri":{"type":"string","readOnly":false},"debug":{"type":"string","readOnly":false},"external_name":{"type":"string","readOnly":false}},"required":["creation_date","id","is_retryable","job_type","permalink_uri","retry_count","status"]}]},"NewReadOnlyPublicJobExecutionResource":{"type":"object"},"Duration":{"type":"number","description":"a length of time in milliseconds"},"CancelStatus":{"type":"string","enum":["REQUESTED","IN_PROGRESS","CANCELED","ABORTED"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /audience\_segments/{segment\_id}/exports

> Create an audience segment export

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Segment Exports","description":"Operations related to Segment Exports for exporting all user identifiers belonging to a specific segment. Enables bulk extraction of segment user data to files for external processing (like partner integrations, or data sharing scenarios without using mediarithmics platform capabilities). Exports can include various identifier types (emails, cookies, user accounts, device IDs) based on configuration requirements."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/audience_segments/{segment_id}/exports":{"post":{"tags":["Segment Exports"],"parameters":[{"in":"path","style":"simple","name":"segment_id","required":true,"schema":{"type":"integer","format":"int64"},"explode":false}],"operationId":"createAudienceSegmentExport","summary":"Create an audience segment export","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/NewPublicJobExecutionResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"requestBody":{"description":"The audience segment export input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceSegmentExportInput"}}},"required":true},"description":""}}},"components":{"schemas":{"NewPublicJobExecutionResource":{"allOf":[{"$ref":"#/components/schemas/NewReadOnlyPublicJobExecutionResource"},{"type":"object","properties":{"organisation_id":{"type":"string","readOnly":false},"start_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"job_type":{"type":"string","readOnly":false},"num_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"community_id":{"type":"string","readOnly":true},"completed_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"max_retry_count":{"type":"integer","format":"int32","default":0,"readOnly":false},"parameters":{"type":"string","readOnly":false},"result":{"type":"string","readOnly":false},"duration":{"$ref":"#/components/schemas/Duration"},"cancel_status":{"$ref":"#/components/schemas/CancelStatus"},"is_retryable":{"type":"boolean","default":false,"readOnly":false},"status":{"$ref":"#/components/schemas/JobExecutionPublicStatus"},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":false},"user_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":false},"erroneous_tasks":{"type":"integer","format":"int64","default":0,"readOnly":false},"retry_count":{"type":"integer","format":"int32","default":0,"readOnly":false},"permalink_uri":{"type":"string","readOnly":false},"debug":{"type":"string","readOnly":false},"external_name":{"type":"string","readOnly":false}},"required":["creation_date","id","is_retryable","job_type","permalink_uri","retry_count","status"]}]},"NewReadOnlyPublicJobExecutionResource":{"type":"object"},"Duration":{"type":"number","description":"a length of time in milliseconds"},"CancelStatus":{"type":"string","enum":["REQUESTED","IN_PROGRESS","CANCELED","ABORTED"],"readOnly":false},"JobExecutionPublicStatus":{"type":"string","enum":["PENDING","RUNNING","SUCCEEDED","FAILED","CANCELED"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]},"AudienceSegmentExportInput":{"allOf":[{"$ref":"#/components/schemas/JobInputParameters"},{"type":"object","properties":{"export_user_identifier":{"$ref":"#/components/schemas/AudienceSegmentExportUserIdentifier"},"mime_type":{"$ref":"#/components/schemas/AudienceSegmentExportMimeType"},"include_prefix":{"type":"boolean","default":false,"readOnly":false}},"required":["export_user_identifier","mime_type"]}]},"JobInputParameters":{"type":"object"},"AudienceSegmentExportUserIdentifier":{"discriminator":{"propertyName":"type","mapping":{"USER_AGENT":"#/components/schemas/AudienceSegmentExportUserAgent","USER_ACCOUNT":"#/components/schemas/AudienceSegmentExportUserAccount","USER_DEVICE_POINT":"#/components/schemas/AudienceSegmentExportUserDevicePoint","USER_EMAIL":"#/components/schemas/AudienceSegmentExportUserEmail","USER_DEVICE_TECHNICAL_ID":"#/components/schemas/AudienceSegmentExportUserDeviceTechnicalId"}},"oneOf":[{"$ref":"#/components/schemas/AudienceSegmentExportUserDevicePoint"},{"$ref":"#/components/schemas/AudienceSegmentExportUserDeviceTechnicalId"},{"$ref":"#/components/schemas/AudienceSegmentExportUserAgent"},{"$ref":"#/components/schemas/AudienceSegmentExportUserEmail"},{"$ref":"#/components/schemas/AudienceSegmentExportUserAccount"}],"properties":{"type":{"type":"string","enum":["USER_DEVICE_POINT","USER_DEVICE_TECHNICAL_ID","USER_AGENT","USER_EMAIL","USER_ACCOUNT"]}},"required":["type"]},"AudienceSegmentExportUserDevicePoint":{"type":"object"},"AudienceSegmentExportUserDeviceTechnicalId":{"type":"object","properties":{"registry_id":{"type":"string","readOnly":false},"registry_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false}}},"AudienceSegmentExportUserAgent":{"type":"object"},"AudienceSegmentExportUserEmail":{"type":"object"},"AudienceSegmentExportUserAccount":{"type":"object","properties":{"compartment_id":{"type":"string","readOnly":false},"compartment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false}}},"AudienceSegmentExportMimeType":{"type":"string","enum":["TEXT_CSV"],"readOnly":false}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/api-reference/datamart-operations/segment-exports.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
