Update a Template
Update an existing email template in SenderWiz by its unique identifier.
🔄 Update a Template
This endpoint allows you to modify the details of a template such as its name, content, or CSS preferences.
🔹 HTTP Request
PUT API-URL/templates/TEMPLATE-UNIQUE-ID
🔸 URL Segments
Segment
Required
Description
TEMPLATE-UNIQUE-ID
Yes
Unique ID of the template to update.
📝 PUT Parameters
Parameter
Type
Required
Description
data
array
Yes
Array with the updated template details.
Refer to the Create Template documentation for full parameter definitions.
🔐 Authorization Header
X-API-KEY: your-api-key-here
💻 PHP Example
// UPDATE A TEMPLATE
$response = $endpoint->update('TEMPLATE-UNIQUE-ID', [
'name' => 'My API template - updated' . $rand,
'content' => file_get_contents(__DIR__ . '/template-example.html'),
//'archive' => file_get_contents(__DIR__ . '/template-example.zip'),
'inline_css' => 'no', // yes|no
]);
// DISPLAY RESPONSE
echo '<hr /><pre>';
print_r($response->body);
echo '</pre>';
📦 Sample JSON Response
{
"status": "success"
}
Last updated