{
"status": "success",
"data": {
"id": "<id of webhook>",
"url": "<https://mywebsite.com/webhook>",
"eventType": "workflowRun.completed",
"workflowId": "<my-workflow-id>"
}
}
事件类型 | 描述 |
---|---|
workflowRun.started | 每当工作流运行开始时发送事件。 |
workflowRun.completed | 每当工作流运行完成时发送事件。 |
workflowRun.failed | 每当工作流运行失败时发送事件。 |
workflowCreditLimit.reached | 当您的工作区达到信用额度时发送事件。 |
curl --location --request POST 'http://dev-cn.your-api-server.com/api/webhook' \
--header 'x-copy-ai-api-key;' \
--header 'content-type: application/json' \
--data-raw '{
"url": "<https://mywebsite.com/webhook>",
"eventType": "workflowRun.completed",
"workflowId": "<my-workflow-id>"
}'
{
"status": "success",
"data": {
"id": "<id of webhook>",
"url": "<https://mywebsite.com/webhook>",
"eventType": "workflowRun.completed",
"workflowId": "<my-workflow-id>"
}
}