You are here

public function EmailTemplates::patch in Auth0 Single Sign On 8.2

Patch an email template by name. This will update only the email template data fields provided (see HTTP PATCH). See docs @link below for valid names, fields, and possible responses. Required scope: "update:email_templates"

@link https://auth0.com/docs/api/management/v2#!/Email_Templates/patch_email_t...

Parameters

string $templateName - the email template name to patch (see constants defined for this class).:

array $data - an array of data to update.:

Return value

array - updated data for the template name provided.

Throws

\Exception - if a 200 response was not returned from the API.

File

vendor/auth0/auth0-php/src/API/Management/EmailTemplates.php, line 107

Class

EmailTemplates
Class EmailTemplates. Handles requests to the Email Templates endpoint of the v2 Management API.

Namespace

Auth0\SDK\API\Management

Code

public function patch($templateName, $data) {
  return $this->apiClient
    ->method('patch')
    ->addPath('email-templates', $templateName)
    ->withBody(json_encode($data))
    ->call();
}