Unarchive Segment
curl --request PATCH \
--url https://api-{dc}.moengage.com/v2/custom-segments/unarchive \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "custom_segment_unique_name"
}
'{
"message": "Successfully unarchived the custom segment",
"success": true,
"cs_name": "custom_segment_unique_name"
}{
"title": "Invalid Request",
"description": "<message>"
}{
"title": "Authentication required",
"description": "<message>"
}{
"title": "Entity Not Found",
"description": "Segment not found with the given name: <custom_segment_unique_name>"
}{
"title": "Internal Server Error"
}Unarchive Segment
This API unarchives an existing segment, making it active again.
PATCH
/
v2
/
custom-segments
/
unarchive
Unarchive Segment
curl --request PATCH \
--url https://api-{dc}.moengage.com/v2/custom-segments/unarchive \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "custom_segment_unique_name"
}
'{
"message": "Successfully unarchived the custom segment",
"success": true,
"cs_name": "custom_segment_unique_name"
}{
"title": "Invalid Request",
"description": "<message>"
}{
"title": "Authentication required",
"description": "<message>"
}{
"title": "Entity Not Found",
"description": "Segment not found with the given name: <custom_segment_unique_name>"
}{
"title": "Internal Server Error"
}Authorizations
Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.
- Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
- Password: Use your API Key, which you can find within the Data tile.
For more information on authentication and getting your credentials, refer here.
Body
application/json
The name of the segment to be unarchived.
Schema for requests that only require the segment name.
The name of the segment.
Was this page helpful?