Update Template
Rename an existing template.
Endpoint
PATCH https://api.campaignlark.com/v1/templates/:id
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | required | The template ID. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | The new template name (1–255 characters). |
Sample Request
PATCH https://api.campaignlark.com/v1/templates/1
Content-Type: application/json
{
"name": "Updated Welcome Email"
}
Response
Success — 200 OK
Returns the updated template object (see Template Object).
Errors
| Status | Message | Cause |
|---|---|---|
400 | Please provide a valid template ID. | id path param is missing or not a number. |
400 | Invalid request body. | Request body could not be parsed. |
400 | Please provide a name for this template. | name is empty or whitespace. |
400 | Template name must not exceed 255 characters. | name exceeds 255 characters. |
400 | We could not find the template you are looking for. | Template not found. |