차단 번호
차단 번호 일괄 생성
한 요청으로 차단 번호 규칙을 최대 500건까지 생성합니다. 각 번호는 독립적으로 처리되며, 실패 항목은 성공 항목을 되돌리지 않고 results에 보고됩니다. 중복 규칙은 skipped로 반환되며, 기존 규칙 교체는 지원하지 않습니다.
POST
/
blocked-numbers
/
bulk
차단 번호 일괄 생성
curl --request POST \
--url https://client-api.tryvox.co/v3/blocked-numbers/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"numbers": [
"<string>"
],
"specific_organization_telephone_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"direction": "both",
"memo": "<string>",
"is_active": true
}
'import requests
url = "https://client-api.tryvox.co/v3/blocked-numbers/bulk"
payload = {
"numbers": ["<string>"],
"specific_organization_telephone_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"direction": "both",
"memo": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
numbers: ['<string>'],
specific_organization_telephone_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
direction: 'both',
memo: '<string>',
is_active: true
})
};
fetch('https://client-api.tryvox.co/v3/blocked-numbers/bulk', 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/bulk",
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([
'numbers' => [
'<string>'
],
'specific_organization_telephone_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'direction' => 'both',
'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/bulk"
payload := strings.NewReader("{\n \"numbers\": [\n \"<string>\"\n ],\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"direction\": \"both\",\n \"memo\": \"<string>\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://client-api.tryvox.co/v3/blocked-numbers/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"numbers\": [\n \"<string>\"\n ],\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"direction\": \"both\",\n \"memo\": \"<string>\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/blocked-numbers/bulk")
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 \"numbers\": [\n \"<string>\"\n ],\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"direction\": \"both\",\n \"memo\": \"<string>\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"input_number": "<string>",
"normalized_number": "<string>",
"blocked_number": {
"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>"
},
"reason": "<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> 형식으로 보냅니다.
Body
application/json
일괄 생성할 번호와 공통 규칙 설정입니다.
차단할 전화번호 목록입니다. 한 요청에 최대 500건까지 지정할 수 있습니다.
Required array length:
1 - 500 elements모든 입력 번호에 공통으로 적용할 차단 범위입니다.
Available options:
global, specific scope가 'specific'일 때 규칙이 적용되는 보유 전화번호 ID 목록입니다. 'global'이면 빈 배열입니다.
모든 입력 번호에 공통으로 적용할 통화 방향입니다. inbound는 수신, outbound는 발신, both는 양방향입니다.
Available options:
inbound, outbound, both 모든 생성 규칙에 공통으로 적용할 메모입니다. 최대 500자.
Maximum string length:
500생성된 규칙을 현재 차단 판정에 적용할지 여부입니다.
Response
성공 응답
입력 번호별 독립 처리 결과입니다.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
차단 번호 일괄 생성
curl --request POST \
--url https://client-api.tryvox.co/v3/blocked-numbers/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"numbers": [
"<string>"
],
"specific_organization_telephone_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"direction": "both",
"memo": "<string>",
"is_active": true
}
'import requests
url = "https://client-api.tryvox.co/v3/blocked-numbers/bulk"
payload = {
"numbers": ["<string>"],
"specific_organization_telephone_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"direction": "both",
"memo": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
numbers: ['<string>'],
specific_organization_telephone_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
direction: 'both',
memo: '<string>',
is_active: true
})
};
fetch('https://client-api.tryvox.co/v3/blocked-numbers/bulk', 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/bulk",
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([
'numbers' => [
'<string>'
],
'specific_organization_telephone_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'direction' => 'both',
'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/bulk"
payload := strings.NewReader("{\n \"numbers\": [\n \"<string>\"\n ],\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"direction\": \"both\",\n \"memo\": \"<string>\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://client-api.tryvox.co/v3/blocked-numbers/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"numbers\": [\n \"<string>\"\n ],\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"direction\": \"both\",\n \"memo\": \"<string>\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/blocked-numbers/bulk")
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 \"numbers\": [\n \"<string>\"\n ],\n \"specific_organization_telephone_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"direction\": \"both\",\n \"memo\": \"<string>\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"input_number": "<string>",
"normalized_number": "<string>",
"blocked_number": {
"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>"
},
"reason": "<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": {}
}
}