ConnectHookReceivedPayload connect.hook.received@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
connect
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/connect.hook.received.v1.json

connect.hook.received v1 (OpenVibe Connect, CON-15, ADR-057 decision 7): a webhook reached a share's hook at https://connect.openvibe.website/h/<hook_id>. Connect keeps the request's body and headers by reference (hook_bodies, 7 days) and publishes only this pointer; Events keeps the event and retries Connect's own subscription for up to seven days, so the request reaches the person's computer when it is back. No body, header or address is in the event. Envelope: subject { type: connect.hook, id: <hook_id> }, visibility internal, priority important, actor service:connect.

Fields

FieldTypeRequiredDescriptionConstraints
hook_idstringyes
  • pattern ^hk_[0-9A-HJKMNP-TV-Z]{26}$
share_idstringyes
  • pattern ^shr_[0-9A-HJKMNP-TV-Z]{26}$
body_refstringyesConnect's own reference to the stored request; meaningless elsewhere.
  • pattern ^hb_[A-Za-z0-9_-]{16,64}$
methodenumyes
  • one of "POST", "PUT", "PATCH"
sizeintegeryes
  • minimum 0
  • maximum 1048576
content_typestring | null
  • maxLength 200
received_atstringyes
  • format date-time

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: github-push
{
  "hook_id": "hk_01K9ZZZZZZZZZZZZZZZZZZZZZZ",
  "share_id": "shr_01K9ZZZZZZZZZZZZZZZZZZZZZZ",
  "body_ref": "hb_Q2xhc3NpY0hvb2tCb2R5UmVm",
  "method": "POST",
  "size": 7421,
  "content_type": "application/json",
  "received_at": "2026-11-03T01:00:00.000Z"
}
Rejected: with-body
{
  "hook_id": "hk_01K9ZZZZZZZZZZZZZZZZZZZZZZ",
  "share_id": "shr_01K9ZZZZZZZZZZZZZZZZZZZZZZ",
  "body_ref": "hb_Q2xhc3NpY0hvb2tCb2R5UmVm",
  "method": "POST",
  "size": 12,
  "received_at": "2026-11-03T01:00:00.000Z",
  "body": "{\"secret\":1}"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('connect.hook.received@1', value);   // { valid, errors: [{ path, message }] }