Skip to main content
PUT
/
global-control-group
/
users
curl --request PUT \
  --url https://api-{dc}.moengage.com/core-services/v1/global-control-group/users \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'MOE-APPKEY: <moe-appkey>' \
  --data '
{
  "request_id": "{{request_id}}",
  "file_url": "https://example.csv",
  "action_type": "add",
  "updated_by": "[email protected]"
}
'
{
  "error": {
    "code": "400 Bad Request",
    "message": "request_id key is mandatory field",
    "target": "request_id",
    "details": [
      {
        "target": "request_id",
        "message": "request_id key is mandatory field"
      }
    ],
    "request_id": "11"
  }
}

Documentation Index

Fetch the complete documentation index at: https://moengage.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Rate Limit

The rate limit is 10 RPM.
  • One file-processing request must complete before the next API call is accepted.
  • Currently, only publicly accessible Amazon S3 URLs are supported for file_url.
  • The Global Control Group must already be initialized with the Upload Users option before this API can be used. This API does not support the Random allocation option.
  • When the GCG base is successfully updated, subsequent runs of existing campaigns use the updated list.
  • Once file processing is completed, an email is sent to the user identified by updated_by summarizing the number of users successfully processed, the number of users that failed, and the possible reasons.

Authorizations

Authorization
string
header
required

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 Campaign report/Business events/Custom templates/Catalog API/Inform Report tile.

For more information on authentication and getting your credentials, refer here.

Headers

MOE-APPKEY
string
required

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).

Body

application/json

Request to add or remove users from the Global Control Group (GCG).

request_id
string
required

Unique identifier of the request to update the Global Control Group.

Example:

"{{request_id}}"

file_url
string<uri>
required

Publicly accessible URL of the CSV file for processing. The file must contain a single column named uid followed by the respective user IDs in new rows. The file must be under 300 MB and downloadable without authentication.

Note: Currently, only publicly accessible Amazon S3 URLs are supported.

Example:

"https://example.csv"

action_type
enum<string>
required

The operation to perform on users in the Global Control Group.

Available options:
add,
remove
updated_by
string<email>
required

The email ID of the user initiating the update.

Response

No Content - The request was processed successfully. There is no response body.