Create a family from a template

Creates a template family containing the specified template and returns the new family with status 201.

POST
/v1/templates/families/from-template/{templateId}

Creates a template family containing the specified template and returns the new family with status 201.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

templateId*string
Match^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$

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.createFamilyFromTemplate({  "templateId": "example",  "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