> 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-management/standard-segment-builders.md).

# Standard Segment Builders

Operations related to **Standard Segment Builders**, the Datamart-linked resources that provide the fastest and easiest way to create segments without requiring OTQL expertise. They leverage **Audience Features** to enable business users to build complex segments with **live insights** and **dynamic dashboards**, using intuitive selectors instead of query syntax.

Relevant documentation:

* [Standard Segment Builder](https://userguides.mediarithmics.io/audience/segment-builders/standard-segment-builder)

## GET /datamarts/{datamart\_id}/standard\_segment\_builders

> Fetch an stadrad segment builder

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Standard Segment Builders","description":"Operations related to **Standard Segment Builders**, the Datamart-linked resources that provide the fastest and easiest way to create segments without requiring OTQL expertise. They leverage **Audience Features** to enable business users to build complex segments with **live insights** and **dynamic dashboards**, using intuitive selectors instead of query syntax.\n\nRelevant documentation:\n- [Standard Segment Builder](https://userguides.mediarithmics.io/audience/segment-builders/standard-segment-builder)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/standard_segment_builders":{"get":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"count":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"max_results":{"type":"integer"},"first_result":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/StandardSegmentBuilderResource"}}},"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"}},"summary":"Fetch an stadrad segment builder","description":"","tags":["Standard Segment Builders"],"operationId":"findStandardSegmentBuilders","parameters":[{"required":true,"name":"datamart_id","in":"path","style":"simple","schema":{"type":"string"},"explode":false},{"name":"name","description":"The name of the standard segment builder","schema":{"type":"string"},"in":"query","required":false,"explode":true,"style":"form"},{"explode":true,"name":"id","style":"form","schema":{"type":"string"},"in":"query","description":"The id of the standard segment builder","required":false},{"in":"query","style":"form","required":false,"description":"The AudienceFeatures that are by default in the standard segment builder","explode":true,"name":"initial_audience_feature_id","schema":{"type":"array","items":{"type":"string"}}},{"description":"Offset from which the search must be performed","schema":{"type":"integer","format":"int32"},"in":"query","explode":true,"required":false,"name":"first_result","style":"form"},{"description":"Number of maximum items that may be returned by this search","explode":true,"style":"form","required":false,"in":"query","schema":{"type":"integer","format":"int32"},"name":"max_results"}]}}},"components":{"schemas":{"StandardSegmentBuilderResource":{"type":"object","properties":{"initial_audience_feature_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["creation_date","datamart_id","id","name"]},"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 /datamarts/{datamart\_id}/standard\_segment\_builders

> Create a standard segment builder

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Standard Segment Builders","description":"Operations related to **Standard Segment Builders**, the Datamart-linked resources that provide the fastest and easiest way to create segments without requiring OTQL expertise. They leverage **Audience Features** to enable business users to build complex segments with **live insights** and **dynamic dashboards**, using intuitive selectors instead of query syntax.\n\nRelevant documentation:\n- [Standard Segment Builder](https://userguides.mediarithmics.io/audience/segment-builders/standard-segment-builder)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/standard_segment_builders":{"post":{"description":"","operationId":"createStandardSegmentBuilder","summary":"Create a standard segment builder","parameters":[{"in":"path","name":"datamart_id","schema":{"type":"string"},"explode":false,"required":true,"style":"simple"}],"requestBody":{"description":"The standard segment builder to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardSegmentBuilderResource"}}},"required":true},"tags":["Standard Segment Builders"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/StandardSegmentBuilderResource"}},"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"}}}}},"components":{"schemas":{"StandardSegmentBuilderResource":{"type":"object","properties":{"initial_audience_feature_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["creation_date","datamart_id","id","name"]},"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 /datamarts/{datamart\_id}/standard\_segment\_builders/{standard\_segment\_builder\_id}

> Get standard segment builder by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Standard Segment Builders","description":"Operations related to **Standard Segment Builders**, the Datamart-linked resources that provide the fastest and easiest way to create segments without requiring OTQL expertise. They leverage **Audience Features** to enable business users to build complex segments with **live insights** and **dynamic dashboards**, using intuitive selectors instead of query syntax.\n\nRelevant documentation:\n- [Standard Segment Builder](https://userguides.mediarithmics.io/audience/segment-builders/standard-segment-builder)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/standard_segment_builders/{standard_segment_builder_id}":{"get":{"operationId":"getStandardSegmentBuilder","summary":"Get standard segment builder by id","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/StandardSegmentBuilderResource"}},"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":["Standard Segment Builders"],"parameters":[{"explode":false,"schema":{"type":"string"},"style":"simple","in":"path","name":"datamart_id","required":true},{"in":"path","style":"simple","explode":false,"required":true,"schema":{"type":"string"},"name":"standard_segment_builder_id"}],"description":""}}},"components":{"schemas":{"StandardSegmentBuilderResource":{"type":"object","properties":{"initial_audience_feature_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["creation_date","datamart_id","id","name"]},"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"}}}}}}}
```

## PUT /datamarts/{datamart\_id}/standard\_segment\_builders/{standard\_segment\_builder\_id}

> Update standard segment builder

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Standard Segment Builders","description":"Operations related to **Standard Segment Builders**, the Datamart-linked resources that provide the fastest and easiest way to create segments without requiring OTQL expertise. They leverage **Audience Features** to enable business users to build complex segments with **live insights** and **dynamic dashboards**, using intuitive selectors instead of query syntax.\n\nRelevant documentation:\n- [Standard Segment Builder](https://userguides.mediarithmics.io/audience/segment-builders/standard-segment-builder)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/standard_segment_builders/{standard_segment_builder_id}":{"put":{"parameters":[{"required":true,"name":"datamart_id","explode":false,"in":"path","style":"simple","schema":{"type":"string"}},{"explode":false,"schema":{"type":"string"},"style":"simple","in":"path","name":"standard_segment_builder_id","required":true}],"operationId":"updateStandardSegmentBuilder","requestBody":{"description":"The standard segment builder to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardSegmentBuilderResource"}}},"required":true},"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/StandardSegmentBuilderResource"}},"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":["Standard Segment Builders"],"summary":"Update standard segment builder","description":""}}},"components":{"schemas":{"StandardSegmentBuilderResource":{"type":"object","properties":{"initial_audience_feature_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["creation_date","datamart_id","id","name"]},"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"}}}}}}}
```

## DELETE /datamarts/{datamart\_id}/standard\_segment\_builders/{standard\_segment\_builder\_id}

> Delete standard segment builder

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Standard Segment Builders","description":"Operations related to **Standard Segment Builders**, the Datamart-linked resources that provide the fastest and easiest way to create segments without requiring OTQL expertise. They leverage **Audience Features** to enable business users to build complex segments with **live insights** and **dynamic dashboards**, using intuitive selectors instead of query syntax.\n\nRelevant documentation:\n- [Standard Segment Builder](https://userguides.mediarithmics.io/audience/segment-builders/standard-segment-builder)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/standard_segment_builders/{standard_segment_builder_id}":{"delete":{"responses":{"200":{"$ref":"#/components/responses/simple"},"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"}},"summary":"Delete standard segment builder","parameters":[{"name":"datamart_id","in":"path","explode":false,"required":true,"style":"simple","schema":{"type":"string"}},{"explode":false,"schema":{"type":"string"},"name":"standard_segment_builder_id","in":"path","style":"simple","required":true}],"operationId":"deleteStandardSegmentBuilder","tags":["Standard Segment Builders"],"description":""}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"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"]}}}}
```


---

# 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-management/standard-segment-builders.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.
