ShawDocs
API Reference

Email Studio

Create, inspect, and update Email Studio drafts, import email remixes, and publish directly to connected Klaviyo accounts.

Download spec

List Email Studio drafts

GET
/api/email-studio/drafts

Authorization

headerAuthorizationBearer <sk_…>

A personal API key created in Settings → Developers. Send it as Authorization: Bearer sk_….

Header Parameters

X-Shaw-Tenant?string

The organization to act for (an id from GET /api/me). Defaults to the key's pinned organization, else your first organization. You must be a member of it.

Response Body

Success. The body is JSON.

response?unknownapplication/json
Example Request
curl -X GET 'https://shaw.ai/api/email-studio/drafts'
Example Response
null
GET
/api/email-studio/drafts/{draftId}

Authorization

headerAuthorizationBearer <sk_…>

A personal API key created in Settings → Developers. Send it as Authorization: Bearer sk_….

Path Parameters

draftId*string

Email draft id.

Header Parameters

X-Shaw-Tenant?string

The organization to act for (an id from GET /api/me). Defaults to the key's pinned organization, else your first organization. You must be a member of it.

Response Body

Success. The body is JSON.

response?unknownapplication/json
Example Request
curl -X GET 'https://shaw.ai/api/email-studio/drafts/string'
Example Response
null
DELETE
/api/email-studio/drafts/{draftId}

Authorization

headerAuthorizationBearer <sk_…>

A personal API key created in Settings → Developers. Send it as Authorization: Bearer sk_….

Path Parameters

draftId*string

Email draft id.

Header Parameters

X-Shaw-Tenant?string

The organization to act for (an id from GET /api/me). Defaults to the key's pinned organization, else your first organization. You must be a member of it.

Response Body

Success. The body is JSON.

response?unknownapplication/json
Example Request
curl -X DELETE 'https://shaw.ai/api/email-studio/drafts/string'
Example Response
null
PUT
/api/email-studio/drafts/{draftId}

Authorization

headerAuthorizationBearer <sk_…>

A personal API key created in Settings → Developers. Send it as Authorization: Bearer sk_….

Path Parameters

draftId*string

Email draft id (1-64 alphanumeric, dash, or underscore characters).

Header Parameters

X-Shaw-Tenant?string

The organization to act for (an id from GET /api/me). Defaults to the key's pinned organization, else your first organization. You must be a member of it.

Request Body

application/json
  1. body
document*

Structured EmailDocument payload (title, subject, sections, etc.).

Response Body

Success. The body is JSON.

response?unknownapplication/json
Example Request
curl -X PUT 'https://shaw.ai/api/email-studio/drafts/string' \  -H 'Content-Type: application/json' \  -d '{  "document": {}}'
Example Response
null
POST
/api/email-studio/import-remix

Authorization

headerAuthorizationBearer <sk_…>

A personal API key created in Settings → Developers. Send it as Authorization: Bearer sk_….

Header Parameters

X-Shaw-Tenant?string

The organization to act for (an id from GET /api/me). Defaults to the key's pinned organization, else your first organization. You must be a member of it.

Request Body

application/json
  1. body
remixId*string

Email remix id (rmx_...) to convert into an Email Studio draft.

Response Body

Success. The body is JSON.

response?unknownapplication/json
Example Request
curl -X POST 'https://shaw.ai/api/email-studio/import-remix' \  -H 'Content-Type: application/json' \  -d '{  "remixId": "string"}'
Example Response
null
POST
/api/email-studio/klaviyo/publish

Authorization

headerAuthorizationBearer <sk_…>

A personal API key created in Settings → Developers. Send it as Authorization: Bearer sk_….

Header Parameters

X-Shaw-Tenant?string

The organization to act for (an id from GET /api/me). Defaults to the key's pinned organization, else your first organization. You must be a member of it.

Request Body

application/json
  1. body
audienceId?string

Klaviyo list or segment id when mode is campaign_draft.

document?

EmailDocument payload; omitted if publishing an existing draftId.

draftId?string

Saved Email Studio draft id to publish.

fromEmail?string

Sender email override.

fromLabel?string

Sender display name override.

mode*string

Publish a reusable Klaviyo template or a campaign draft.

Value in"template""campaign_draft"
replyToEmail?string

Reply-to email override.

templateName?string

Template name in Klaviyo.

Response Body

Success. The body is JSON.

response?unknownapplication/json
Example Request
curl -X POST 'https://shaw.ai/api/email-studio/klaviyo/publish' \  -H 'Content-Type: application/json' \  -d '{  "mode": "template"}'
Example Response
null
POST
/api/email-studio/klaviyo/publish-template

Authorization

headerAuthorizationBearer <sk_…>

A personal API key created in Settings → Developers. Send it as Authorization: Bearer sk_….

Header Parameters

X-Shaw-Tenant?string

The organization to act for (an id from GET /api/me). Defaults to the key's pinned organization, else your first organization. You must be a member of it.

Request Body

application/json
  1. body
audienceId?string

Klaviyo list or segment id when mode is campaign_draft.

excludedAudienceIds?array<unknown>

Optional list of Klaviyo list or segment ids to exclude from a campaign draft.

existingKlaviyoTemplateId?string

Optional existing Klaviyo template id to update in place.

fromEmail?string

Sender email override.

fromLabel?string

Sender display name override.

mode?string

Publish a reusable Klaviyo CODE template or a Klaviyo draft campaign (defaults to template).

Value in"template""campaign_draft"
previewText?string

Optional inbox preview / preheader text.

replyToEmail?string

Reply-to email override.

slug?string

Library email template slug (e.g. aesop/email-welcome), if templateId is omitted.

subject?string

Optional email subject line override.

templateId?string

Library email template id (tpl_...) from search_templates.

templateName?string

Template name in Klaviyo.

useSmartSending?boolean

Whether Klaviyo Smart Sending is enabled (default true).

version?string

Optional template version id (YYYY-MM-DD).

Response Body

Success. The body is JSON.

response?unknownapplication/json
Example Request
curl -X POST 'https://shaw.ai/api/email-studio/klaviyo/publish-template' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
null