Skip to main content
PATCH
/
v1
/
my
/
templates
/
{id}
Update a template
curl --request PATCH \
  --url https://api.nitrosend.com/v1/my/templates/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "subject": "<string>",
  "body": "<string>",
  "preheader": "<string>",
  "from_name": "<string>",
  "from_email": "jsmith@example.com",
  "reply_to": "jsmith@example.com",
  "design": {
    "sections": [
      {
        "type": "header",
        "props": {},
        "styles": {
          "background_color": "<string>",
          "padding": "<string>",
          "align": "left"
        }
      }
    ],
    "theme": {
      "brand_color": "<string>",
      "bg_color": "<string>",
      "text_color": "<string>",
      "font_body": "<string>",
      "font_heading": "<string>",
      "logo_url": "<string>"
    }
  }
}
'
{
  "id": 123,
  "name": "<string>",
  "flow_id": 123,
  "action_id": 123,
  "subject": "<string>",
  "body": "<string>",
  "preheader": "<string>",
  "from_name": "<string>",
  "from_email": "<string>",
  "reply_to": "<string>",
  "design": {
    "sections": [
      {
        "type": "header",
        "props": {},
        "styles": {
          "background_color": "<string>",
          "padding": "<string>",
          "align": "left"
        }
      }
    ],
    "theme": {
      "brand_color": "<string>",
      "bg_color": "<string>",
      "text_color": "<string>",
      "font_body": "<string>",
      "font_heading": "<string>",
      "logo_url": "<string>"
    }
  },
  "variables": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key (nskey_live_...) or JWT token. API key is checked first; if not found, falls back to Devise JWT authentication.

Path Parameters

id
integer
required

Body

application/json
name
string
subject
string
body
string
preheader
string
from_name
string
from_email
string<email>
reply_to
string<email>
design
object

Email template design document

Response

Updated template

id
integer
name
string | null
flow_id
integer | null
action_id
integer | null
subject
string | null
body
string | null
preheader
string | null
from_name
string | null
from_email
string | null
reply_to
string | null
design
object

Email template design document

variables
object
created_at
string<date-time>
updated_at
string<date-time>