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": "agent@example.com"
}
'{
"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": []
}
}This API changes a flow’s lifecycle state. Requires the campaigns:create_manage permission.
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": "agent@example.com"
}
'{
"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": []
}
}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.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). 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.
Headers
Client-generated UUID v4. Reusing the same key replays the original response instead of re-applying the transition.
Client-supplied trace ID. The server echoes it in the X-MOE-Request-Id response header and in response_id. If you omit it, the server generates one.
Path Parameters
The 24-character ID of the flow. This must be the flow's own ID, not a version ID; passing a version ID returns 400.
^[a-f0-9]{24}$"6a3b09c938da57c8f5838880"
Body
The lifecycle operation to apply. publish is not available in this phase.
pause, resume, stop, retire, archive, unarchive Email of the user performing the action. Recorded in the audit log.
Optional. For lifecycle actions (pause, resume, stop, retire), acts on this version (default: the active version). Rejected for archive / unarchive.
x >= 1Optional if supplied via the X-MOE-Request-Id header; echoed in response_id.