Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 3.67 KB

File metadata and controls

61 lines (39 loc) · 3.67 KB

EmailAndSmsTemplates

(emailAndSmsTemplates)

Overview

Available Operations

  • upsert - Update a template for a given type and slug ⚠️ Deprecated

upsert

Updates the existing template of the given type and slug

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;
use Clerk\Backend\Models\Operations;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build();

$requestBody = new Operations\UpsertTemplateRequestBody();

$response = $sdk->emailAndSmsTemplates->upsert(
    templateType: Operations\UpsertTemplatePathParamTemplateType::Sms,
    slug: '<value>',
    requestBody: $requestBody

);

if ($response->template !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
templateType Operations\UpsertTemplatePathParamTemplateType ✔️ The type of template to update
slug string ✔️ The slug of the template to update
requestBody ?Operations\UpsertTemplateRequestBody N/A

Response

?Operations\UpsertTemplateResponse

Errors

Error Type Status Code Content Type
Errors\ClerkErrors18 400, 401, 402, 403, 404, 422 application/json
Errors\SDKException 4XX, 5XX */*