メインコンテンツへスキップ
POST
https://{tenantDomain}/api/v2
/
branding
/
phone
/
templates
Go
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.CreatePhoneTemplateRequestContent{}
    client.Branding.Phone.Templates.Create(
        context.TODO(),
        request,
    )
}
import { ManagementClient } from "auth0";

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

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

url = "https://{tenantDomain}/api/v2/branding/phone/templates"

payload = {
"disabled": False,
"content": {
"syntax": "<string>",
"from": "<string>",
"body": {
"text": "<string>",
"voice": "<string>"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/branding/phone/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'disabled' => false,
'content' => [
'syntax' => '<string>',
'from' => '<string>',
'body' => [
'text' => '<string>',
'voice' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.post("https://{tenantDomain}/api/v2/branding/phone/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"disabled\": false,\n \"content\": {\n \"syntax\": \"<string>\",\n \"from\": \"<string>\",\n \"body\": {\n \"text\": \"<string>\",\n \"voice\": \"<string>\"\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{tenantDomain}/api/v2/branding/phone/templates")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"disabled\": false,\n \"content\": {\n \"syntax\": \"<string>\",\n \"from\": \"<string>\",\n \"body\": {\n \"text\": \"<string>\",\n \"voice\": \"<string>\"\n }\n }\n}"

response = http.request(request)
puts response.read_body
{
  "content": {
    "syntax": "<string>",
    "from": "<string>",
    "body": {
      "text": "<string>",
      "voice": "<string>"
    }
  },
  "disabled": false,
  "id": "<string>",
  "channel": "<string>",
  "customizable": true,
  "tenant": "<string>"
}

承認

Authorization
string
header
必須

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

ボディ

type
enum<string>
利用可能なオプション:
otp_verify,
otp_enroll,
change_password,
blocked_account,
password_breach
Maximum string length: 255
disabled
boolean
デフォルト:false

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

content
object

レスポンス

The phone notification template was created.

content
object
必須
type
enum<string>
必須
利用可能なオプション:
otp_verify,
otp_enroll,
change_password,
blocked_account,
password_breach
Maximum string length: 255
disabled
boolean
デフォルト:false
必須

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