# Segmentation

Segmentation resources of the Mailjet Email API.

## Contact Filter List

 - [GET /v3/REST/contactfilter](https://dev.mailjet.com/openapi/openapi-mailjet/segmentation/get_v3_contactfilter.md): Retrieve a list of all segments and details on their configuration. Segments can be applied on contact lists when you send your campaigns. Segmentation is done based on additional data saved for contacts via /contactmetadata and/or based on contact activity (or lack thereof).

## Create Contact Filter

 - [POST /v3/REST/contactfilter](https://dev.mailjet.com/openapi/openapi-mailjet/segmentation/post_v3_contactfilter.md): Create a new segmentation formula to be applied on contact lists when you send your campaigns. Segmentation can be done based on additional data saved for contacts via /contactmetadata and/or based on contact activity (or lack thereof). The properties used in Expression must already exist on your account - create them first with POST /v3/REST/contactmetadata, otherwise the request fails with Unknown identifier.

## Contact Filter by ID

 - [GET /v3/REST/contactfilter/{contactfilter_ID}](https://dev.mailjet.com/openapi/openapi-mailjet/segmentation/get_v3_contactfilter_id.md): Retrieve configuration details for a specific segment. Segments can be applied on contact lists when you send your campaigns. Segmentation is done based on additional data saved for contacts via /contactmetadata  and/or based on contact activity (or lack thereof). To obtain a valid contactfilter_ID, first call GET /v3/REST/contactfilter to list your segments.

## Update Contact Filter

 - [PUT /v3/REST/contactfilter/{contactfilter_ID}](https://dev.mailjet.com/openapi/openapi-mailjet/segmentation/put_v3_contactfilter_id.md): Update an existing segment. Segments can be applied on contact lists when you send your campaigns. Segmentation is done based on additional data saved for contacts via /contactmetadata  and/or based on contact activity (or lack thereof).

Only segments with deleted status can be updated via the API. Deleted segments can be updated to unused.
 To obtain a valid contactfilter_ID, first call GET /v3/REST/contactfilter to list your segments.

## Delete Contact Filter

 - [DELETE /v3/REST/contactfilter/{contactfilter_ID}](https://dev.mailjet.com/openapi/openapi-mailjet/segmentation/delete_v3_contactfilter_id.md): Delete an existing segment. Segments can be applied on contact lists when you send your campaigns. Segmentation is done based on additional data saved for contacts via /contactmetadata  and/or based on contact activity (or lack thereof).

The deletion is a soft one and a deleted segment can later be reinstated by changing its Status via a PUT request.

