listmonk unofficial
POST/campaigns/{id}/test

Send a test campaign message

Submits a test campaign message to selected subscribers. Provide the campaign identifier and a request body with the test message configuration; the body can use JSON or form-encoded data.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 10 body fields
idintegerrequired
The integer identifier of the campaign to send a test message for.

Test message configuration supplied as JSON or form-encoded data.

namestringoptional
The test campaign name.
subjectstringoptional
The subject line for the test message.
listsarray<number>optional
Array of numeric list identifiers to send the test message to.
from_emailstringoptional
The sender email address for the test message.
content_typestringoptional
The content type of the test message.
messengerstringoptional
The messenger configuration for the test message.
typestringoptional
The campaign type.
tagsarray<string>optional
Array of string tags associated with the test message.
send_laterbooleanoptional
Whether to schedule the test message for later.
send_atobjectoptional
Scheduling data for the test message, including `headers` and a numeric `template_id`.

1 status code
200Returns a boolean indicating the result of the campaign test operation.
databooleanoptional

Error handling

The id path parameter must identify the campaign to test. When using JSON, lists must contain numbers, tags must contain strings, and send_later must be a boolean; the form-encoded template_id, if supplied, must be an integer.