# Segments
In marketing, a segment is a container that groups profiles (usually people) who share one or more common characteristics. In Treasure Data, the parent segment is your total population of people, accounts, or other type of collection and can be both existing and potential customers.
You create segments to divide the population into subgroups of consumers based on some type of shared characteristics. Segments and subsegments enable more specific targeting for your marketing campaigns.
_Treasure Data is making an effort to use more inclusive language in its product, content, and customer solutions. As we gradually make the move to replace insensitive language beginning in our UI, you may continue to see parent segments in the UI, for example, referenced as master segment in portions of Treasure Data APIs._
## Retrieve list of segments
- [GET /audiences/{audienceId}/segments](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_index.md): Retrieve a list of segments.
## Create new segment
- [POST /audiences/{audienceId}/segments](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_create.md): Create a new segment.
## Retrieve list of segments in a folder
- [GET /audiences/{audienceId}/folders/{folderId}/segments](https://td-public.redocly.app/apis/audience_api_v1/segments/segment_folders_segments.md): Retrieve a list of segments in a folder.
## Retrieve SQL from segment rule
- [POST /audiences/{audienceId}/segments/query](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_query.md): Retrieve a SQL from a segment rule.
## Retrieve number of profiles based on set of segment rules
- [POST /audiences/{audienceId}/segments/queries](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_new_query.md): Retrieve the number of profiles produced by a set of segment rules.
## Retrieve segment by ID
- [GET /audiences/{audienceId}/segments/{segmentId}](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_show.md): Retrieve a segment based on its identifier.
## Update segment
- [PUT /audiences/{audienceId}/segments/{segmentId}](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_update.md): Update a segment.
## Delete segment (legacy)
- [DELETE /audiences/{audienceId}/segments/{segmentId}](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_delete.md): Delete a segment. _This endpoint is for Audience Studio legacy. For the latest Audience Studio, contact your Customer Success Representative._
## Retrieve status of query
- [GET /audiences/{audienceId}/segments/queries/{queryId}](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_query_status.md): Retrieve the status of a query.
## Kill current running query of segment
- [POST /audiences/{audienceId}/segments/queries/{queryId}/kill](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_kill_query.md): Kill the current running query associated with the segment.
## Retrieve profiles of query
- [GET /audiences/{audienceId}/segments/queries/{queryId}/customers](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_index_query_customers.md): Retrieve the profiles of a query.
## Retrieve population statistics of segment
- [GET /audiences/{audienceId}/segments/{segmentId}/statistics](https://td-public.redocly.app/apis/audience_api_v1/segments/segments_statistics.md): Retrieve the population history of the segment. The history is returned per day and those days are calculated in the timezone of the audience. Note that funnel_stage kind doesn't have statistics via this endpoint.
## Create segment
- [POST /entities/segments](https://td-public.redocly.app/apis/audience_api_v1/segments/paths/~1entities~1segments/post.md): Create a new segment.
## Retrieve segment by ID
- [GET /entities/segments/{id}](https://td-public.redocly.app/apis/audience_api_v1/segments/paths/~1entities~1segments~1%7Bid%7D/get.md): Retrieve a segment by ID.
## Update segment
- [PATCH /entities/segments/{id}](https://td-public.redocly.app/apis/audience_api_v1/segments/paths/~1entities~1segments~1%7Bid%7D/patch.md): Update a segment.
## Delete segment
- [DELETE /entities/segments/{id}](https://td-public.redocly.app/apis/audience_api_v1/segments/paths/~1entities~1segments~1%7Bid%7D/delete.md): Delete a segment.