# Send test email by ID

**Summary:** Send a test of an email, identified by its ID, to up to 5 recipients. Recipients are always given as an array.

- Space: [Developers](https://www.subrite.no/developers)
- Source: https://www.subrite.no/developers/email-test-by-id
- Updated: 2026-09-23
- Markdown index: https://www.subrite.no/developers/llms.txt

Send a test email by ID through Subrite.

- **Method:** `POST`
- **Route:** `{baseUrl}/api/v1/communications/:id/email/test`
- **Authorization:** Bearer token (use the M2M token from [Setup](https://www.subrite.no/developers/email-setup?md=true))
- **Body:** see the example below

<a id="example-body"></a>
## Example body

```javascript
{
  "communicationType": "marketing",  // Possible values: "marketing" or "information"
  "name": "coming from external",
  "senderId": 2,  // Use sender ID from Step 2 response
  "consentId": null,
  "segmentId": 1,  // Use segment ID from Step 3 response
  "subject": "email subject",
  "emailPreviewText": "sample",
  "templateId": 1, // Optional
  "emailContent": "<div>hello world</div>",
  "recipients": ["user@example.com", "user@example2.com"] // Always use an array for recipients, even when sending to a single address. Maximum 5 recipients allowed per test email.
}
```

In the example, the `senderId` comes from the step 2 response and the `segmentId` from the step 3 response on the [Setup](https://www.subrite.no/developers/email-setup?md=true) page.

<a id="success-response"></a>
## Success response

```javascript
{
  success: true,
  message: 'Test emails sent successfully',
  id: 12212
}
```
