Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 3.18 KB

README.md

File metadata and controls

61 lines (39 loc) · 3.18 KB

Templates

(templates)

Overview

Available Operations

  • preview - Preview changes to a template ⚠️ Deprecated

preview

Returns a preview of a template for a given template_type, slug and body

⚠️ 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\PreviewTemplateRequestBody();

$response = $sdk->templates->preview(
    templateType: '<value>',
    slug: '<value>',
    requestBody: $requestBody

);

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

Parameters

Parameter Type Required Description
templateType string ✔️ The type of template to preview
slug string ✔️ The slug of the template to preview
requestBody ?Operations\PreviewTemplateRequestBody Required parameters

Response

?Operations\PreviewTemplateResponse

Errors

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