Skip to contentDevelopersPrezly website
Campaigns

Send a test for a draft campaign

Send a real test email to the selected test addresses.

Personal tokens are not supported for this endpoint. Use an integration API key. Your account must also have access to the requested data. Authentication

Read the guide

POST
/campaigns/{id}/test

Personal access tokens are not supported for this endpoint. Use an integration API key with the required permissions.

Authorization

API_key
headerAuthorizationBearer <token>

Bearer authentication using an integration API key, or a personal access token only where the operation explicitly supports it. Every listed personal-token scope is required; owner permissions and newsroom access still apply.

Path Parameters

id*number

Campaign ID

Request Body

application/json
  1. body
email_addresses*array<>

Response Body

Accepted

application/json
  1. response

Such responses are returned when the request was validated and understood, but is too large to fulfill within the response timeout. In that case a background job is pushed and a 202 Accepted response is generated containing Job ID. Job ID can be used with Jobs API to check status for.

status*"accepted"
Value in"accepted"
progress*

Background Job Reference object

Example Request
curl -X POST 'https://api.prezly.com/v2/campaigns/0/test' \  -H 'Content-Type: application/json' \  -d '{  "email_addresses": [    "user@example.com"  ]}'
Example Response202
{  "status": "accepted",  "progress": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "links": [      "http://example.com"    ]  }}