Samva
Samva
DashboardAPISamva DocumentationQuickstart GuideAuthentication

Api referenceDrafts

Create Draft

POST
/drafts

Authorization

apiKey
X-API-Key<token>

API key for authentication

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://samva.app/api/v1/drafts" \  -H "Content-Type: application/json" \  -d '{    "channel": "email"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  "channel": "string",
  "recipients": [
    {
      "participantId": "9f6624b5-5f99-42b6-899f-30f2b369cbd7",
      "email": "string",
      "phone": "string",
      "whatsappId": "string",
      "name": "string"
    }
  ],
  "content": {
    "subject": "string",
    "body": "string",
    "html": "string",
    "ast": {
      "property1": null,
      "property2": null
    },
    "text": "string",
    "templateId": "string",
    "templateName": "string",
    "variables": {
      "property1": "string",
      "property2": "string"
    },
    "attachmentIds": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ]
  },
  "title": "string",
  "lastEditedAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e"
}
channel*unknown
Value in"email" | "sms" | "whatsapp"
recipients?array<>
content?
title?string