---
title: "Test a campaign"
slug: "test-a-campaign"
abstract: "Describes the request and response details of this Sitecore Send API endpoint to test a draft campaign."
---
# Test a campaign

`POST /campaigns/{CampaignID}/send_test.{Format}`

Tests and previews a draft campaign by sending it to a list of email addresses.

## Request

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| Accept | header | string | true | Determines the expected format and data type to retrieve the response data.Value: application/json |
| CampaignID | path | string | true | The ID of the draft campaign that you want to test. |
| Format | path | string | true | The supported file format for getting a response.Possible values: json and xml. |
| apikey | query | string | true | The API key of your account. |
| TestEmails | body | array | true | A list of email addresses that you want to use to send your test campaign. Use a comma (,) to separate up to a maximum of five email addresses. |

```http
POST https://{hostname}/v3/campaigns/{CampaignID}/send\_test.{Format}?apikey=

Request body:
{
  "TestEmails": \[
    "email1@email.com",
    "email2@email.com"
  \]
}
```

```curl
curl --include \\
     --request POST \\
     --header "Content-Type: application/json" \\
     --header "Accept: application/json" \\
     --data-raw '{
       "TestEmails": \[
         "email1@email.com",
         "email2@email.com"
       \]
     }' \\
     'https://{hostname}/v3/campaigns/{CampaignID}/send\_test.{Format}?apikey='
```

## Response

| Status | Description | Headers | Schema |
| --- | --- | --- | --- |
| 200 OK | The request is successful. | Content-Type:application/jsonAccept:application/json | N/A |

```json
{
  "Code": 0,
  "Error": null,
  "Context": null
}
```

-   `Code` - the response code. This is `0` if successful.
    
-   `Error` - the response error message. This is `null` if successful.
    
-   `Context` - this is `null` if successful.