Get Segment by ID
curl --request GET \
--url https://api-{dc}.moengage.com/v3/custom-segments/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'MOE-APPKEY: <moe-appkey>'{
"data": {
"name": "active-users-segment",
"id": "6388a97a02adb9071ca84ce9",
"created_time": "2022-12-01T13:17:46.409000",
"updated_time": "2022-12-01T13:17:46.450000",
"type": "ELASTIC_SEARCH",
"source": "API",
"description": "Subscription Status is active (case insensitive)",
"included_filters": {
"filter_operator": "and",
"filters": [
{
"filter_type": "user_attributes",
"name": "Subscription Status",
"data_type": "string",
"operator": "in",
"value": [
"active"
],
"negate": false,
"case_sensitive": false
}
]
},
"excluded_filters": {
"filter_operator": "and",
"filters": [
{
"filter_type": "user_attributes",
"name": "is_test_user",
"data_type": "bool",
"operator": "is",
"value": true,
"negate": false
}
]
}
},
"response_id": "WYanfieM",
"type": "custom_segment"
}Get Segment by ID
This API fetches a specific segment (File or Filter) by its ID.
GET
/
v3
/
custom-segments
/
{id}
Get Segment by ID
curl --request GET \
--url https://api-{dc}.moengage.com/v3/custom-segments/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'MOE-APPKEY: <moe-appkey>'{
"data": {
"name": "active-users-segment",
"id": "6388a97a02adb9071ca84ce9",
"created_time": "2022-12-01T13:17:46.409000",
"updated_time": "2022-12-01T13:17:46.450000",
"type": "ELASTIC_SEARCH",
"source": "API",
"description": "Subscription Status is active (case insensitive)",
"included_filters": {
"filter_operator": "and",
"filters": [
{
"filter_type": "user_attributes",
"name": "Subscription Status",
"data_type": "string",
"operator": "in",
"value": [
"active"
],
"negate": false,
"case_sensitive": false
}
]
},
"excluded_filters": {
"filter_operator": "and",
"filters": [
{
"filter_type": "user_attributes",
"name": "is_test_user",
"data_type": "bool",
"operator": "is",
"value": true,
"negate": false
}
]
}
},
"response_id": "WYanfieM",
"type": "custom_segment"
}This API endpoint does not currently support Team-level scoping. All segments generated using this call will be assigned to the Default Team automatically.
Rate Limit
The rate limit is 100 requests/minute, 1000 requests/hour, and 4000 requests/day.承認
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.
ヘッダー
This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
You can send MOE-DBNAME with your database name instead of this header. The request must include one of the two.
レスポンス
Successful retrieval of the segment. Returns the segment details including its filter definition and metadata.