Passer au contenu principal
PATCH
https://{tenantDomain}/api/v2
/
branding
/
phone
/
templates
/
{id}
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Branding.Phone;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Branding.Phone.Templates.UpdateAsync(
            id: "id",
            request: new UpdatePhoneTemplateRequestContent()
        );
    }

}
package example

import (
context "context"

phone "github.com/auth0/go-auth0/management/management/branding/phone"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &phone.UpdatePhoneTemplateRequestContent{}
client.Branding.Phone.Templates.Update(
context.TODO(),
"id",
request,
)
}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.branding.phone.templates.requests.UpdatePhoneTemplateRequestContent;

public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();

client.branding().phone().templates().update(
"id",
UpdatePhoneTemplateRequestContent
.builder()
.build()
);
}
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Branding\Phone\Templates\Requests\UpdatePhoneTemplateRequestContent;

$client = new Management(
token: '<token>',
);
$client->branding->phone->templates->update(
'id',
new UpdatePhoneTemplateRequestContent([]),
);
from auth0.management import ManagementClient

client = ManagementClient(
token="<token>",
)

client.branding.phone.templates.update(
id="id",
)
require "auth0"

client = Auth0::Management.new(token: "<token>")

client.branding.phone.templates.update(id: "id")
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.branding.phone.templates.update("id", {});
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.branding.phone.templates.update("id", {});
}
main();
curl --request PATCH \
--url https://{tenantDomain}/api/v2/branding/phone/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": {
"from": "<string>",
"body": {
"text": "<string>",
"voice": "<string>"
}
},
"disabled": false
}
'
{
  "content": {
    "syntax": "<string>",
    "from": "<string>",
    "body": {
      "text": "<string>",
      "voice": "<string>"
    }
  },
  "disabled": false,
  "id": "<string>",
  "channel": "<string>",
  "customizable": true,
  "tenant": "<string>"
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

id
string
requis
Required string length: 1 - 255

Corps

content
object
disabled
boolean
défaut:false

Whether the template is enabled (false) or disabled (true).

Réponse

The phone notification template was updated.

content
object
requis
type
enum<string>
requis
Options disponibles:
otp_verify,
otp_enroll,
change_password,
blocked_account,
password_breach
Maximum string length: 255
disabled
boolean
défaut:false
requis

Whether the template is enabled (false) or disabled (true).

id
string
Required string length: 1 - 255
channel
string
customizable
boolean
tenant
string
Required string length: 1 - 255