S
Samva
S
Samva
DashboardAPISamva DocumentationQuickstart GuideAuthentication

API Reference

Email Management

Conversation Management

Configuration

Approve TemplateCreate TemplateGet TemplateList TemplatesRemove TemplateRender TemplateUpdate Template

Analytics & Operations

OpenAPI Specification
API ReferenceTemplates

Create Template

POST
/templates

Authorization

apiKey
X-API-Key<token>

API key for authentication

In: header

Request Body

application/json

name*string
slug*string
description?string|null
category?unknown|null
supportedChannels*array<string>
content*
variableSchema?
compliance?
usageCount?integer
Range-2147483648 <= value <= 2147483647
lastUsedAt?string|null
lastUsedBy?string|null
performance?
isActive?boolean
isDefault?boolean
version?integer
Range-2147483648 <= value <= 2147483647
previousVersionId?string|null
createdBy?string|null
lastModifiedBy?string|null

Response Body

application/json

curl -X POST "https://samva.app/api/v1/templates" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "slug": "string",    "supportedChannels": [      "string"    ],    "content": {}  }'
{
  "id": "string",
  "organizationId": "string",
  "name": "string",
  "slug": "string",
  "description": "string",
  "category": "string",
  "supportedChannels": [
    "string"
  ],
  "content": {
    "property1": null,
    "property2": null
  },
  "variableSchema": [
    {}
  ],
  "compliance": {
    "property1": null,
    "property2": null
  },
  "usageCount": 0,
  "lastUsedAt": "2019-08-24T14:15:22Z",
  "isActive": true,
  "isDefault": true,
  "version": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Approve Template

Previous Page

Get Template

Next Page

curl -X POST "https://samva.app/api/v1/templates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "slug": "string",
    "supportedChannels": [
      "string"
    ],
    "content": {}
  }'