跳到正文

接收入站事件​

POST
/hooks/{id}

Only active incoming rules accept events. 202 means saved, not executed. Wrong source, inactive rule or key/data conflict returns 409. Edits to execution semantics cancel pending old-revision events. Capacity exhaustion leaves events pending; cooldown skips events in its window. The caller must own the rule. For exec rules, both the calling Key ID and stored authorization Key ID must be allowed, including idempotent retries.

授权​

APIKey

Remote cp-auth key with automation scope; never pass it in the URL. /healthz and CORS preflight are anonymous.

类型
API Key (header: CP-X-API-KEY)

参数​

请求头参数

Idempotency-Key

Optional; at most 200 UTF-8 bytes without surrounding whitespace. Scoped to this rule, valid until receipt retention deletes it. Same key/data returns the original receipt, different data returns 409. Without a key each request creates an event.

类型
string
最大长度
200

请求体​

application/json
JSON
{
  
"additionalProperties": "string"
}

响应​

Success

application/json
JSON
{
  
"id": "string",
  
"trigger_id": "string",
  
"revision": 0,
  
"data": {
  
  
"additionalProperties": "string"
  
},
  
"status": "string",
  
"created_at": "string",
  
"source_type": "string",
  
"occurred_at": "string"
}

试验场​

授权
请求头
主体

示例​