Skip to main content
Create, read, update, and manage email campaigns using the API. Browse available email templates to use as starting points.

Goal

By the end of this guide you will be able to list campaigns, retrieve campaign details, create new campaigns, update campaign settings, duplicate campaigns, delete campaigns, and browse email templates.

Prerequisites

  • An API key with campaigns:write scope (for full CRUD) or campaigns:read scope (for read-only access)
  • Your API base URL (found on the Settings > API Keys page)
  • At least one contact list and a verified sending domain (for creating campaigns)
Important: Scheduling, sending, canceling, and test-sending campaigns is not available via API key. Use the Benchmark Email web application for those actions. API keys can prepare campaigns (create, configure, assign recipients) that are then sent manually from the UI.

Steps

1. List campaigns

Retrieve campaigns with optional filtering by status, pagination, and sorting.
Response (200 OK):
Query parameters:

2. Get a campaign by ID

Response (200 OK):

3. Create a campaign

Create a new draft campaign. At minimum, provide a name. Other fields like subject, from address, and body can be set during creation or added later via update.
Response (200 OK):
Campaign fields:

4. Update a campaign

Update an existing draft campaign. Include the __v version field for optimistic concurrency control.
Response (200 OK):

5. Duplicate a campaign

Create a copy of an existing campaign. Useful for creating variations or reusing a previous campaign as a template.
Response (200 OK):
The duplicated campaign starts in draft status regardless of the original campaign’s status.

6. Delete a campaign

Response (204 No Content): Empty body.

7. Browse email templates

List available email templates to use as starting points for your campaigns. Templates are read-only via API key.
Response (200 OK):
Get a specific template by ID:
You can also list template categories:

Common Errors

Next Steps