Skip to main content
PUT
/
templates
/
{id}
Update template
curl --request PUT \
  --url https://api-message.nativehub.live/api/v1/templates/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Updated OTP Template",
  "body": "Hi {{name}}, your verification code is {{otp}}."
}
'
{
  "id": "d0e1f2a3-b4c5-6789-de01-234567890123",
  "tenant_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "name": "OTP Template",
  "body": "Dear {{name}}, your OTP is {{otp}}. Valid for {{validity}} minutes.",
  "variables": {
    "name": "string",
    "otp": "string",
    "validity": "number"
  },
  "status": "active",
  "created_at": "2026-01-20T14:00:00Z",
  "updated_at": "2026-02-05T16:45:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Template ID

Body

application/json
name
string
body
string
variables
object

Response

Template updated successfully

id
string<uuid>
tenant_id
string<uuid>
name
string
body
string
variables
object
status
string
created_at
string<date-time>
updated_at
string<date-time>