Skip to content

API reference

Email

Read campaigns, segments, and who gets no marketing email, and keep drafts. Sending stays in the dashboard.

List email campaigns

GET/api/v1/email/campaigns

The shop’s email campaigns, newest first: drafts, ones sending, and ones sent, with how many went out, were delivered, and bounced.

Scope
email:read
MCP tool
email_campaigns_list
Changes data
No

Parameters

NameTypeDescription
limitquery · optionalintegerResults per page, 1-1001-100default 25
cursorquery · optionalstringThe `next_cursor` from the previous page

Request

curl "https://3commerce.com/api/v1/email/campaigns" \
  -H "Authorization: Bearer 3c_live_…"

Response

200 OK
{
  "data": [
    {
      "id": "1e3a5c7e-9b1d-4f3a-8c5e-7a9c1e3b5d70",
      "subject": "The winter knits are in",
      "preview_text": "Merino, cashmere, and a beanie to match.",
      "body": "Our warmest pieces are back.",
      "product_ids": [],
      "segment": "repeat",
      "status": "draft",
      "recipients": 0,
      "sent": 0,
      "delivered": 0,
      "bounced": 0,
      "created_at": "2026-11-26T10:00:00.000Z",
      "sent_at": null
    }
  ],
  "next_cursor": null
}

Get an email campaign

GET/api/v1/email/campaigns/{id}

One campaign with its content and delivery counts.

Scope
email:read
MCP tool
email_campaigns_get
Changes data
No

Parameters

NameTypeDescription
idpath · requiredstring (uuid)The resource id

Request

curl "https://3commerce.com/api/v1/email/campaigns/6f1c2a4e-8b3d-4c5e-9a7f-1d2e3f4a5b6c" \
  -H "Authorization: Bearer 3c_live_…"

Response

200 OK
{
  "id": "1e3a5c7e-9b1d-4f3a-8c5e-7a9c1e3b5d70",
  "subject": "The winter knits are in",
  "preview_text": "Merino, cashmere, and a beanie to match.",
  "body": "Our warmest pieces are back.",
  "product_ids": [],
  "segment": "repeat",
  "status": "draft",
  "recipients": 0,
  "sent": 0,
  "delivered": 0,
  "bounced": 0,
  "created_at": "2026-11-26T10:00:00.000Z",
  "sent_at": null
}

Create a draft campaign

POST/api/v1/email/campaigns

Saves a new draft. Sending stays in the dashboard, where a member reviews it and confirms the audience, so the API never emails your customers in bulk.

Scope
email:write
MCP tool
email_campaigns_create
Changes data
Yes
Idempotency-Key
Accepted

Parameters

NameTypeDescription
subjectbody · requiredstringThe subject line1-120 chars
preview_textbody · optionalstringThe line an inbox shows after the subjectmax 150 charsdefault ""
bodybody · requiredstringThe email, in plain text with blank lines between paragraphs1-5000 chars
product_idsbody · optionalarray of string (uuid)Products to featuremax 4 itemsdefault []
segmentbody · optionalenum or nullThe customer segment it goes to, or null for everyone who opted inone of new, repeat, lapsed, high-value, opted-indefault null

Request

curl -X POST "https://3commerce.com/api/v1/email/campaigns" \
  -H "Authorization: Bearer 3c_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "subject": "Example subject",
  "body": "Thanks for your order, it ships tomorrow."
}'

Response

201 Created
{
  "id": "1e3a5c7e-9b1d-4f3a-8c5e-7a9c1e3b5d70",
  "subject": "The winter knits are in",
  "preview_text": "Merino, cashmere, and a beanie to match.",
  "body": "Our warmest pieces are back.",
  "product_ids": [],
  "segment": "repeat",
  "status": "draft",
  "recipients": 0,
  "sent": 0,
  "delivered": 0,
  "bounced": 0,
  "created_at": "2026-11-26T10:00:00.000Z",
  "sent_at": null
}

Update a draft campaign

PATCH/api/v1/email/campaigns/{id}

Changes the fields you send on a draft and keeps the rest. A campaign already sent is 409 `invalid_status`.

Scope
email:write
MCP tool
email_campaigns_update
Changes data
Yes

Parameters

NameTypeDescription
idpath · requiredstring (uuid)The resource id
subjectbody · optionalstringThe subject line1-120 chars
preview_textbody · optionalstringThe line an inbox shows after the subjectmax 150 chars
bodybody · optionalstringThe email, in plain text with blank lines between paragraphs1-5000 chars
product_idsbody · optionalarray of string (uuid)Products to featuremax 4 items
segmentbody · optionalenum or nullThe customer segment it goes to, or null for everyone who opted inone of new, repeat, lapsed, high-value, opted-in

Request

curl -X PATCH "https://3commerce.com/api/v1/email/campaigns/6f1c2a4e-8b3d-4c5e-9a7f-1d2e3f4a5b6c" \
  -H "Authorization: Bearer 3c_live_…" \
  -H "Content-Type: application/json" \
  -d '{}'

Response

200 OK
{
  "id": "1e3a5c7e-9b1d-4f3a-8c5e-7a9c1e3b5d70",
  "subject": "The winter knits are in",
  "preview_text": "Merino, cashmere, and a beanie to match.",
  "body": "Our warmest pieces are back.",
  "product_ids": [],
  "segment": "repeat",
  "status": "draft",
  "recipients": 0,
  "sent": 0,
  "delivered": 0,
  "bounced": 0,
  "created_at": "2026-11-26T10:00:00.000Z",
  "sent_at": null
}

Delete a draft campaign

DELETE/api/v1/email/campaigns/{id}

Deletes a draft. A campaign that went out stays, for its counts: deleting one is 409 `invalid_status`.

Scope
email:write
MCP tool
email_campaigns_delete
Changes data
Yes

Parameters

NameTypeDescription
idpath · requiredstring (uuid)The resource id

Request

curl -X DELETE "https://3commerce.com/api/v1/email/campaigns/6f1c2a4e-8b3d-4c5e-9a7f-1d2e3f4a5b6c" \
  -H "Authorization: Bearer 3c_live_…"

Response

200 OK
{
  "id": "1e3a5c7e-9b1d-4f3a-8c5e-7a9c1e3b5d70",
  "deleted": true
}

List customer segments

GET/api/v1/email/segments

Every customer segment a campaign can target, with how many addresses it would reach now: opted in, less every suppressed address. `all` is the whole audience, followers included.

Scope
email:read
MCP tool
email_segments
Changes data
No

Parameters

No parameters.

Request

curl "https://3commerce.com/api/v1/email/segments" \
  -H "Authorization: Bearer 3c_live_…"

Response

200 OK
{
  "all": 412,
  "data": [
    {
      "key": "repeat",
      "label": "Repeat",
      "description": "2 or more orders",
      "audience": 96
    }
  ]
}

List suppressed contacts

GET/api/v1/email/suppressions

Your customers and followers who get no marketing email, newest first, and why: they unsubscribed, their address bounced, or they reported spam. 1 list spans every shop, so an unsubscribe anywhere stops your campaigns too.

Scope
email:read
MCP tool
email_suppressions
Changes data
No

Parameters

NameTypeDescription
limitquery · optionalintegerResults per page, 1-1001-100default 25
cursorquery · optionalstringThe `next_cursor` from the previous page

Request

curl "https://3commerce.com/api/v1/email/suppressions" \
  -H "Authorization: Bearer 3c_live_…"

Response

200 OK
{
  "data": [
    {
      "email": "lee@example.com",
      "reason": "unsubscribed",
      "since": "2026-10-12T08:00:00.000Z"
    }
  ]
}