Skip to main content
POST
Test Content API

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

X-MOE-Request-Id
string<uuid>

Client-supplied trace ID (UUID v4). Echoed back in the X-MOE-Request-Id response header and returned unchanged as response_id in the body. When you omit this header, MoEngage generates a 12-character hexadecimal identifier instead. Quote it when contacting MoEngage Support.

On Test Content API, the body field request_id takes precedence: when you send both, response_id echoes request_id and this header is echoed only in the X-MOE-Request-Id response header.

Path Parameters

id
string
required

Content API ID of the saved config to test — a bare 24-character hexadecimal ObjectId, with no resource prefix. Pass it exactly as returned in data[].id from List Content APIs.

Body

application/json

Sample values for the personalization tokens in the saved Content API. Omit the body entirely if the config has no tokens.

A config may reference tokens from more than one namespace. Worked example: a config whose URL is https://api.example.com/v1/weather?q={{UserAttribute['city']}}&units={{UserAttribute['units']}}&event={{EventAttribute['name']}}&event_id={{EventAttribute['id']}} has four tokens across the UserAttribute and EventAttribute namespaces, so the body carries a dynamic_values entry for each — grouped under the namespace each token belongs to.

request_id
string

Client-generated ID for tracing. Returned unchanged as response_id in the response. This field takes precedence over the X-MOE-Request-Id header — when you send both, response_id echoes this value, and the header value is returned only in the X-MOE-Request-Id response header.

Example:

"4c8e1f26-7b93-4d5a-9e08-3a1b6d7c2f45"

dynamic_values
object

Sample values for the personalization tokens in the saved config, keyed by token namespace.

  • The namespace is the part before the square brackets. The attribute name is the quoted string inside them.
  • The object is exactly two levels deep, and every value is a string.
  • The namespaces are not mutually exclusive. Include every namespace the config references.
  • Send one entry per token in the config under test, and nothing else. Tokens may appear in the saved url, params, headers, or body.
Example:

Response

Test execution result (returned for both passing and failing upstream calls)

response_id
string

Unique identifier for this response. Echoes the request_id you sent in the body, returned unchanged. When you omit request_id, it echoes the X-MOE-Request-Id header instead; when you send neither, MoEngage generates a 12-character hexadecimal identifier. Quote it when contacting MoEngage Support.

Example:

"4c8e1f26-7b93-4d5a-9e08-3a1b6d7c2f45"

type
enum<string>

The resource type contained in data. Always content-apis for this endpoint.

Available options:
content-apis
data
object

The outcome of the call MoEngage made to the upstream endpoint.