차단 번호 수정
차단 번호 규칙의 일부 필드를 수정합니다. 생략한 필드는 유지되고, memo처럼 null을 허용하는 필드는 null로 보내 비울 수 있습니다.
curl --request PATCH \
--url https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"number": "<string>",
"specific_organization_telephone_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"memo": "<string>",
"is_active": true
}
'import requests
url = "https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}"
payload = {
"number": "<string>",
"specific_organization_telephone_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"memo": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '<string>',
specific_organization_telephone_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
memo: '<string>',
is_active: true
})
};
fetch('https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'number' => '<string>',
'specific_organization_telephone_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'memo' => '<string>',
'is_active' => true
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}"
payload := strings.NewReader("{\n \"number\": \"<string>\",\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"memo\": \"<string>\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"<string>\",\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"memo\": \"<string>\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"<string>\",\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"memo\": \"<string>\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"is_active": true,
"created_at": 123,
"updated_at": 123,
"specific_organization_telephone_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"memo": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": {
"resource": "agent"
}
}
}{
"error": {
"code": "CONFLICT",
"message": "The requested operation conflicts with current state.",
"details": {
"current_status": "draft"
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 5,
"window_seconds": 1
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}Authorizations
조직 API 키를 Authorization: Bearer <token> 형식으로 보냅니다.
Path Parameters
Body
차단 번호 규칙에서 수정할 필드입니다.
차단할 전화번호입니다. 하이픈 없는 숫자 문자열로 정규화되어 저장·반환됩니다.
1 - 32차단 규칙의 적용 범위입니다.
global, specific scope가 'specific'일 때 규칙이 적용되는 보유 전화번호 ID 목록입니다. 'global'이면 빈 배열입니다.
차단할 통화 방향입니다. inbound는 수신, outbound는 발신, both는 양방향입니다.
inbound, outbound, both 규칙에 대한 메모입니다. 최대 500자.
500현재 차단 판정에 적용되는지 여부입니다. 비활성이면 목록에는 남지만 판정에서 제외됩니다.
Response
성공 응답
차단 규칙 ID입니다.
차단 번호를 등록한 조직 ID입니다.
차단할 전화번호입니다. 하이픈 없는 숫자 문자열로 정규화되어 저장·반환됩니다.
차단 규칙의 적용 범위입니다.
global, specific 차단할 통화 방향입니다. inbound는 수신, outbound는 발신, both는 양방향입니다.
inbound, outbound, both 현재 차단 판정에 적용되는지 여부입니다. 비활성이면 목록에는 남지만 판정에서 제외됩니다.
리소스 생성 시각입니다. unix milliseconds 형식입니다.
리소스 마지막 수정 시각입니다. unix milliseconds 형식입니다.
scope가 'specific'일 때 규칙이 적용되는 보유 전화번호 ID 목록입니다. 'global'이면 빈 배열입니다.
규칙에 대한 메모입니다. 최대 500자.
Was this page helpful?
curl --request PATCH \
--url https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"number": "<string>",
"specific_organization_telephone_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"memo": "<string>",
"is_active": true
}
'import requests
url = "https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}"
payload = {
"number": "<string>",
"specific_organization_telephone_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"memo": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '<string>',
specific_organization_telephone_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
memo: '<string>',
is_active: true
})
};
fetch('https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'number' => '<string>',
'specific_organization_telephone_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'memo' => '<string>',
'is_active' => true
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}"
payload := strings.NewReader("{\n \"number\": \"<string>\",\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"memo\": \"<string>\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"<string>\",\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"memo\": \"<string>\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/blocked-numbers/{blocked_number_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"<string>\",\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"memo\": \"<string>\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"is_active": true,
"created_at": 123,
"updated_at": 123,
"specific_organization_telephone_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"memo": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": {
"resource": "agent"
}
}
}{
"error": {
"code": "CONFLICT",
"message": "The requested operation conflicts with current state.",
"details": {
"current_status": "draft"
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 5,
"window_seconds": 1
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}