웹훅 생성 (v3)
curl --request POST \
--url https://api.bizmori.com/api/v3/orders/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhook",
"subscribedEvents": [],
"name": "<string>",
"isTest": true
}
'import requests
url = "https://api.bizmori.com/api/v3/orders/webhooks"
payload = {
"url": "https://example.com/webhook",
"subscribedEvents": [],
"name": "<string>",
"isTest": 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({
url: 'https://example.com/webhook',
subscribedEvents: [],
name: '<string>',
isTest: true
})
};
fetch('https://api.bizmori.com/api/v3/orders/webhooks', 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://api.bizmori.com/api/v3/orders/webhooks",
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([
'url' => 'https://example.com/webhook',
'subscribedEvents' => [
],
'name' => '<string>',
'isTest' => 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://api.bizmori.com/api/v3/orders/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhook\",\n \"subscribedEvents\": [],\n \"name\": \"<string>\",\n \"isTest\": 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://api.bizmori.com/api/v3/orders/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/webhook\",\n \"subscribedEvents\": [],\n \"name\": \"<string>\",\n \"isTest\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bizmori.com/api/v3/orders/webhooks")
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 \"url\": \"https://example.com/webhook\",\n \"subscribedEvents\": [],\n \"name\": \"<string>\",\n \"isTest\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"webhookId": 123,
"name": "<string>",
"url": "<string>",
"secret": "<string>",
"isTest": true,
"isActive": true,
"subscribedEvents": [
"<string>"
],
"lastSentAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"code": "AUTH_NOT_AUTHENTICATED"
}Webhooks
웹훅 생성 (v3)
비어 있지 않고 중복이 없는 subscribedEvents 목록으로 웹훅을 등록합니다. 지원 값은 event-types에서 조회하세요. 테스트 키는 isTest=true로 강제되며 false를 명시하면 AUTH_FORBIDDEN입니다. 등록 응답에 서명 secret이 포함됩니다. 안전하게 보관하세요. 상세 조회에서도 확인할 수 있습니다.
POST
/
api
/
v3
/
orders
/
webhooks
웹훅 생성 (v3)
curl --request POST \
--url https://api.bizmori.com/api/v3/orders/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhook",
"subscribedEvents": [],
"name": "<string>",
"isTest": true
}
'import requests
url = "https://api.bizmori.com/api/v3/orders/webhooks"
payload = {
"url": "https://example.com/webhook",
"subscribedEvents": [],
"name": "<string>",
"isTest": 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({
url: 'https://example.com/webhook',
subscribedEvents: [],
name: '<string>',
isTest: true
})
};
fetch('https://api.bizmori.com/api/v3/orders/webhooks', 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://api.bizmori.com/api/v3/orders/webhooks",
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([
'url' => 'https://example.com/webhook',
'subscribedEvents' => [
],
'name' => '<string>',
'isTest' => 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://api.bizmori.com/api/v3/orders/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhook\",\n \"subscribedEvents\": [],\n \"name\": \"<string>\",\n \"isTest\": 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://api.bizmori.com/api/v3/orders/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/webhook\",\n \"subscribedEvents\": [],\n \"name\": \"<string>\",\n \"isTest\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bizmori.com/api/v3/orders/webhooks")
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 \"url\": \"https://example.com/webhook\",\n \"subscribedEvents\": [],\n \"name\": \"<string>\",\n \"isTest\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"webhookId": 123,
"name": "<string>",
"url": "<string>",
"secret": "<string>",
"isTest": true,
"isActive": true,
"subscribedEvents": [
"<string>"
],
"lastSentAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"code": "AUTH_NOT_AUTHENTICATED"
}curl -X POST "$CONTENTCARE_API_BASE_URL/api/v3/orders/webhooks" \
-H "Authorization: Bearer $CONTENTCARE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"ContentCare webhook","url":"https://your-server.com/webhook","subscribedEvents":["order.watermarkEmbed.completed","order.watermarkEmbed.failed"]}'
const response = await fetch(`${process.env.CONTENTCARE_API_BASE_URL}/api/v3/orders/webhooks`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CONTENTCARE_API_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "ContentCare webhook",
url: "https://your-server.com/webhook",
subscribedEvents: ["order.watermarkEmbed.completed", "order.watermarkEmbed.failed"],
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const webhook = await response.json(); // signing secret: webhook.data.secret
import os
import requests
response = requests.post(
f"{os.environ['CONTENTCARE_API_BASE_URL']}/api/v3/orders/webhooks",
headers={"Authorization": f"Bearer {os.environ['CONTENTCARE_API_TOKEN']}"},
json={
"name": "ContentCare webhook",
"url": "https://your-server.com/webhook",
"subscribedEvents": ["order.watermarkEmbed.completed", "order.watermarkEmbed.failed"],
},
timeout=30,
)
response.raise_for_status()
webhook = response.json() # signing secret: webhook["data"]["secret"]
인증
본문
application/json
필수이며 비어 있거나 중복된 이벤트는 허용하지 않습니다.
Minimum array length:
1사용 가능한 옵션:
order.antiAi.completed, order.antiAi.failed, order.watermarkEmbed.completed, order.watermarkEmbed.failed, order.watermarkExtract.completed, order.watermarkExtract.failed, order.aiDetection.completed, order.aiDetection.failed