修改 Webhook
curl --request POST \
--url https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"webhook_id": "webhook_abc123",
"event_types": [
"doc_parse_completed",
"doc_extract_completed"
]
}
'const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_id: 'webhook_abc123',
event_types: ['doc_parse_completed', 'doc_extract_completed']
})
};
fetch('https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update"
payload = {
"webhook_id": "webhook_abc123",
"event_types": ["doc_parse_completed", "doc_extract_completed"]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_id\": \"webhook_abc123\",\n \"event_types\": [\n \"doc_parse_completed\",\n \"doc_extract_completed\"\n ]\n}")
.asString();const url = 'https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update';
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_id: 'webhook_abc123',
event_types: ['doc_parse_completed', 'doc_extract_completed']
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update"
payload := strings.NewReader("{\n \"webhook_id\": \"webhook_abc123\",\n \"event_types\": [\n \"doc_parse_completed\",\n \"doc_extract_completed\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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))
}using RestSharp;
var options = new RestClientOptions("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
request.AddJsonBody("{\n \"webhook_id\": \"webhook_abc123\",\n \"event_types\": [\n \"doc_parse_completed\",\n \"doc_extract_completed\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update",
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([
'webhook_id' => 'webhook_abc123',
'event_types' => [
'doc_parse_completed',
'doc_extract_completed'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": "<string>",
"message": "<string>",
"tips": "<string>",
"data": {
"webhook_id": "<string>"
}
}{
"detail": [
{
"type": "greater_than",
"loc": [
"query",
"limit"
],
"msg": "Input should be greater than 0",
"input": 0,
"ctx": {
"gt": 0
}
}
]
}Webhook
修改 Webhook
修改回调地址、事件类型或应用范围。省略 app_id 表示不修改应用范围;显式传 null 或空数组会清除范围并改为订阅当前账号下所有应用。
仅传 webhook_id 在后端是合法的空操作。公开合同要求至少提供一个待修改字段;回调地址只应使用由你控制的公网 HTTPS 地址。
POST
/
open
/
agentic_doc_processor
/
{tenant_name}
/
v1
/
webhook
/
update
修改 Webhook
curl --request POST \
--url https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"webhook_id": "webhook_abc123",
"event_types": [
"doc_parse_completed",
"doc_extract_completed"
]
}
'const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_id: 'webhook_abc123',
event_types: ['doc_parse_completed', 'doc_extract_completed']
})
};
fetch('https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update"
payload = {
"webhook_id": "webhook_abc123",
"event_types": ["doc_parse_completed", "doc_extract_completed"]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_id\": \"webhook_abc123\",\n \"event_types\": [\n \"doc_parse_completed\",\n \"doc_extract_completed\"\n ]\n}")
.asString();const url = 'https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update';
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_id: 'webhook_abc123',
event_types: ['doc_parse_completed', 'doc_extract_completed']
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update"
payload := strings.NewReader("{\n \"webhook_id\": \"webhook_abc123\",\n \"event_types\": [\n \"doc_parse_completed\",\n \"doc_extract_completed\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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))
}using RestSharp;
var options = new RestClientOptions("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
request.AddJsonBody("{\n \"webhook_id\": \"webhook_abc123\",\n \"event_types\": [\n \"doc_parse_completed\",\n \"doc_extract_completed\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/update",
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([
'webhook_id' => 'webhook_abc123',
'event_types' => [
'doc_parse_completed',
'doc_extract_completed'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": "<string>",
"message": "<string>",
"tips": "<string>",
"data": {
"webhook_id": "<string>"
}
}{
"detail": [
{
"type": "greater_than",
"loc": [
"query",
"limit"
],
"msg": "Input should be greater than 0",
"input": 0,
"ctx": {
"gt": 0
}
}
]
}授权
生产环境 API Key,可在 ADP 平台的「我的 API」中查看。请确保 API Key 有效且属于生产环境。
路径参数
租户名称,默认 laiye。
请求体
application/json
- Option 1
- Option 2
- Option 3
Minimum string length:
1新的公网 HTTPS 回调地址。
Maximum string length:
512Pattern:
^https://Minimum array length:
1可用选项:
doc_parse_completed, doc_extract_completed, collaboration_start, collaboration_success, collaboration_failed, collaboration_completed, collaboration_timeout 显式 null 或空数组会清空应用范围;省略时保持不变。
Minimum string length:
1