Create a template family

Creates an empty template family with the supplied name and returns it with status 201.

POST
/v1/templates/families

Creates an empty template family with the supplied name and returns it with status 201.

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
name*string
Length1 <= length

Response Body

Success

application/json
  1. response
id*TemplateFamilyId
Match^tfam_[0-9a-hjkmnp-tv-z]{16,24}$
name*string
members*array<>
createdAt*string
updatedAt*string
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.templates.createFamily({  "name": "example"});
Example Response
{  "id": "string",  "name": "string",  "members": [    {      "id": "string",      "name": "string",      "slug": "string",      "channel": "sms",      "status": "draft",      "isActive": true,      "createdAt": "string",      "updatedAt": "string"    }  ],  "createdAt": "string",  "updatedAt": "string"}

Related documentation