Developers
API reference

Create a campaign

POST
/workspaces/{workspace_id}/campaigns

Creates a draft campaign from a newsletter and optional segment.

AuthorizationBearer <token>

A scoped fd_test_ or fd_live_ server credential.

In: header

Path Parameters

workspace_id*string

Opaque workspace identifier.

Match^ws_

Header Parameters

Idempotency-Key?string

Stable key identifying this logical mutation for safe retries.

Length8 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/workspaces/ws_01JEXAMPLE/campaigns" \  -H "Content-Type: application/json" \  -d '{    "subject": "string",    "newsletter_id": "string"  }'
{  "data": {    "id": "cmp_01JEXAMPLE",    "object": "campaign",    "subject": "string",    "preheader": "string",    "status": "draft",    "newsletter_id": "string",    "segment_id": "string",    "scheduled_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}