Create Email Draft

Create a draft that carries only the copy — subject and an HTML message. It appears in Communication → Email → Drafts so a human can pick the recipients and send it. The draft cannot be sent through the API; sending stays a human action in the CRM.

Example Request:
curl "https://<your-agency>.smartmatchapp.com/api3/email/drafts/" \
    -u <token>: \
    -X POST \
    -d "subject=Product update — August" \
    -d "message=<p>Here is what shipped this month.</p>"
Request Parameters:

subject: Required. The draft subject line.

message: Required. The draft body. HTML is supported and sanitized on the same path as the CRM compose modal.

scope: (Optional) agency (default) or personal. agency puts the draft on the shared Drafts tab; a personal draft is only visible to the token user.

cc / bcc: (Optional) Comma-separated email addresses.

campaign_id / template_id: (Optional) Must belong to the same agency; a foreign or missing id is rejected with a 400.

recipient_single_ids: (Optional) IDs of non-archived clients in the agency.

recipient_emails: (Optional) Ad-hoc recipient email addresses.

Example Success Response:
{
    "id": 12
}
Base Request:

Method: POST

Authentication: Basic Authentication. Requires a valid <token> passed.

Rate Limits:

10 requests within 10 seconds

Error Responses:
400 Bad Request

This error occurs if subject or message is missing, or a campaign_id/template_id/recipient is invalid or from another agency.
Possible errors: "this field is required", "select a valid choice"

401 Unauthorized

This error occurs when the <token> is missing, invalid, or the API access is disabled.

Possible errors: "not authenticated" or "token is disabled" or "Agency API is disabled"

405 Method Not Allowed

This error occurs if an HTTP method other than POST is used.
Possible errors: "wrong method"

429 Too Many Requests

This error occurs when the client has sent too many requests in a given amount of time, leading to rate limiting by the server.

Possible errors: "too many requests"

500 Server Error

Possible errors: "Internal server error"