Drafts

Create a draft

Creates a draft for the current user on the given channel. Returns the created draft with status 201.

POST
/v1/drafts

Creates a draft for the current user on the given channel. Returns the created draft with status 201.

x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

channel*"email"

Value in

  • "email"
recipients?array<>|null
content?|null
title?string|null

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/drafts" \  -H "Content-Type: application/json" \  -d '{    "channel": "email"  }'
{  "id": "string",  "organizationId": "string",  "channel": "string",  "recipients": [    {      "contactId": "string",      "email": "string",      "phone": "string",      "name": "string"    }  ],  "content": {    "subject": "string",    "body": "string",    "html": "string",    "ast": {},    "text": "string",    "templateId": "string",    "templateName": "string",    "variables": {      "property1": "string",      "property2": "string"    },    "attachmentIds": [      "string"    ]  },  "title": "string",  "lastEditedAt": "string",  "createdAt": "string",  "createdBy": "string"}