Admin/Create Template
POST /v1/admin/templates

Create Template

Create the template at the provider (via nexus), scoped to the given connector, and reflect it into core. Returns the created template.

Base URL https://api.{cluster}.{platform}.voiger.io
Request · cURL
curl -X POST https://api.{cluster}.{platform}.voiger.io/v1/admin/templates \
  -H "Cookie: sid=$VOIGER_SESSION" \
  -H "x-workspace-code: your-workspace-code" \
  -H "x-csrf-token: $CSRF_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
       "connector_id": "1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809",
       "name": "parcel_shipped",
       "language": "en_US",
       "category": "UTILITY",
       "components": [
         {
           "type": "BODY",
           "text": "Hi {{1}}, your parcel {{2}} has shipped.",
           "example": {
             "body_text": [
               [
                 "Sam",
                 "A-1024"
               ]
             ]
           }
         },
         {
           "type": "FOOTER",
           "text": "Reply STOP to unsubscribe"
         },
         {
           "type": "BUTTONS",
           "buttons": [
             {
               "type": "QUICK_REPLY",
               "text": "Contact support"
             }
           ]
         }
       ],
       "variables": [
         {
           "key": "1",
           "name": "customer_name"
         }
       ]
     }'

Parameters

x-workspace-code string required in header
x-csrf-token string required in header

Response

template▾
object A message template, one row per business number (connector) it can be sent from. Provider ids are internal (`meta`); `variables` is the admin's placeholder→variable mapping and survives a sync.
id
string
connector_id
string The business number (connector) this template can be sent from.
channel
string The connector's channel, copied onto the template row.
name
string
language
string
category
string | null
status
string | null Provider review status, e.g. APPROVED, PENDING, REJECTED.
components
array The provider's template components (header/body/buttons), as the provider holds them. Read back verbatim and deliberately not constrained here: a template synced from the provider may carry shapes `CreateTemplate` would refuse, because it could have been created outside core.
variables▾
array The admin's placeholder→variable mapping for this row.
key
string
name
string
updated_at
string