Warning
This SDK is DEPRECATED
preview- Preview changes to a template⚠️ Deprecated
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.
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->templates->preview(
templateType: '<value>',
slug: '<value>',
requestBody: $requestBody
);
if ($response->object !== null) {
// handle response
}| 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 |
?Operations\PreviewTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\ClerkErrors | 400, 401, 404, 422 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |