curl --request PATCH \
--url https://api-{dc}.moengage.com/v5/flows/{flow_id}/status \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"action": "pause",
"updated_by": "[email protected]"
}
'{
"response_id": "abc-200",
"type": "flow",
"data": {
"flow_id": "69f1de84f9e401a2d7d9a931",
"status": "PAUSED"
}
}{
"response_id": "abc-101",
"error": {
"code": "VALIDATION_FAILED",
"target": "request",
"message": "One or more request parameters failed validation.",
"details": [
{
"target": "request",
"message": "Check the request parameters and try again."
}
]
}
}{
"response_id": "abc-101",
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing credentials.",
"details": []
}
}{
"response_id": "abc-450",
"error": {
"code": "FORBIDDEN",
"target": "permission",
"message": "You do not have the required permission for this operation.",
"details": [
{
"target": "permission",
"message": "Required permission: campaigns:create_manage"
}
]
}
}{
"response_id": "abc-100",
"error": {
"code": "NOT_FOUND",
"target": "flow",
"message": "Flow not found.",
"details": [
{
"target": "flow_id",
"message": "Flow not found."
}
]
}
}{
"response_id": "abc-409",
"error": {
"code": "BAD_REQUEST",
"target": "action",
"message": "Cannot resume a flow that is not paused.",
"details": []
}
}{
"response_id": "abc-101",
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded for app key.",
"details": []
}
}{
"response_id": "abc-101",
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": []
}
}Update Flow Status
This API changes a flow’s lifecycle state. Requires the campaigns:create_manage permission.
PATCH
/
v5
/
flows
/
{flow_id}
/
status
curl --request PATCH \
--url https://api-{dc}.moengage.com/v5/flows/{flow_id}/status \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"action": "pause",
"updated_by": "[email protected]"
}
'{
"response_id": "abc-200",
"type": "flow",
"data": {
"flow_id": "69f1de84f9e401a2d7d9a931",
"status": "PAUSED"
}
}{
"response_id": "abc-101",
"error": {
"code": "VALIDATION_FAILED",
"target": "request",
"message": "One or more request parameters failed validation.",
"details": [
{
"target": "request",
"message": "Check the request parameters and try again."
}
]
}
}{
"response_id": "abc-101",
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing credentials.",
"details": []
}
}{
"response_id": "abc-450",
"error": {
"code": "FORBIDDEN",
"target": "permission",
"message": "You do not have the required permission for this operation.",
"details": [
{
"target": "permission",
"message": "Required permission: campaigns:create_manage"
}
]
}
}{
"response_id": "abc-100",
"error": {
"code": "NOT_FOUND",
"target": "flow",
"message": "Flow not found.",
"details": [
{
"target": "flow_id",
"message": "Flow not found."
}
]
}
}{
"response_id": "abc-409",
"error": {
"code": "BAD_REQUEST",
"target": "action",
"message": "Cannot resume a flow that is not paused.",
"details": []
}
}{
"response_id": "abc-101",
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded for app key.",
"details": []
}
}{
"response_id": "abc-101",
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": []
}
}Lifecycle actions (
pause, resume, stop, retire) accept an optional version_no and act on that
version (default: the active version). archive / unarchive apply to the whole flow and reject a version_no.
| Action | Allowed from | Result |
|---|---|---|
pause | ACTIVE, SCHEDULED | PAUSED |
resume | PAUSED | ACTIVE |
stop | ACTIVE, SCHEDULED, PAUSED, RETIRED | STOPPED |
retire | ACTIVE, PAUSED | RETIRED |
archive | PAUSED, STOPPED, COMPLETED (and not already archived) | sets archived=true |
unarchive | any archived flow | sets archived=false |
Rate Limits
The rate limits are at the workspace level. A maximum of 10 requests per second, 100 requests per minute, and 6,000 requests per hour are allowed per workspace.承認
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). Find it in the MoEngage dashboard at Settings > Account > API keys.
- Password: Use an API key from Settings > Account > API keys.
Refer to API Key Dashboard for details on creating and managing API keys.
ヘッダー
パスパラメータ
ボディ
application/json