Rename a template family
Changes a template family's name and returns the updated family. Use this endpoint to rename a template family through the Samva email API.
PATCH
Changes a template family's name and returns the updated family.
apiKeyheader
x-api-key<token>id*stringMatch
^tfam_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
name*stringLength
1 <= lengthTemplateFamily
application/json- response
id*TemplateFamilyIdMatch
^tfam_[0-9a-hjkmnp-tv-z]{16,24}$name*stringmembers*array<>createdAt*stringupdatedAt*stringimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.templates.renameFamily({ "id": "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"}