{
  "schemaVersion": 1,
  "snapshotDate": "2026-10-23",
  "slug": "reference-hubspot-codec-webhook-events-item-encode",
  "title": "Encode HubSpot Webhook Events Item",
  "section": "Library asset reference",
  "description": "encode HubSpot Webhook Events Item Pure functional codec; no external request, secret lookup or state mutation. Object codecs preserve unknown fields through a named remainder; collision is rejected. Lists preserve item/rest/index/count; em",
  "kind": "node",
  "url": "/wiki/reference-hubspot-codec-webhook-events-item-encode/",
  "markdown": "/wiki/reference-hubspot-codec-webhook-events-item-encode/index.md",
  "json": "/wiki/reference-hubspot-codec-webhook-events-item-encode/index.json",
  "headings": [
    {
      "id": "audited-socket-contract-21-october-2026",
      "title": "Audited socket contract (21 October 2026)",
      "depth": 2
    },
    {
      "id": "catalog-identity",
      "title": "Catalog identity",
      "depth": 2
    },
    {
      "id": "inputs",
      "title": "Inputs",
      "depth": 2
    },
    {
      "id": "outputs",
      "title": "Outputs",
      "depth": 2
    },
    {
      "id": "configuration-schema",
      "title": "Configuration schema",
      "depth": 2
    },
    {
      "id": "source-and-installed-versions",
      "title": "Source and installed versions",
      "depth": 2
    }
  ],
  "sources": [
    "../OpenNodeFlow-Library/work/catalog-all.mjs",
    "../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs",
    "../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs",
    "shared/seed.ts",
    "shared/storage-library.ts",
    "shared/variable-library.ts",
    "shared/control-flow.ts",
    "shared/remote-routes.ts",
    "server/runtime-library.ts",
    "shared/error-library.ts",
    "shared/storage-model.ts",
    "shared/builtin-documentation.ts"
  ],
  "family": "hubspot",
  "contract": {
    "key": "hubspot.codec.webhook.events.item.encode",
    "slug": "hubspot-codec-webhook-events-item-encode",
    "name": "Encode HubSpot Webhook Events Item",
    "kind": "node",
    "family": "hubspot",
    "packId": null,
    "category": "HubSpot",
    "description": "",
    "inputs": [
      {
        "id": "exec",
        "name": "Execute",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "eventId",
        "name": "eventId",
        "type": "@hubspot.type.webhook.events.item.eventid",
        "typeName": "HubSpot Webhook Events Item eventId",
        "typeKey": "hubspot.type.webhook.events.item.eventid",
        "typeVersion": 1,
        "required": true
      },
      {
        "id": "subscriptionId",
        "name": "subscriptionId",
        "type": "@hubspot.type.webhook.events.item.eventid",
        "typeName": "HubSpot Webhook Events Item eventId",
        "typeKey": "hubspot.type.webhook.events.item.eventid",
        "typeVersion": 1,
        "required": false
      },
      {
        "id": "portalId",
        "name": "portalId",
        "type": "@hubspot.type.webhook.events.item.eventid",
        "typeName": "HubSpot Webhook Events Item eventId",
        "typeKey": "hubspot.type.webhook.events.item.eventid",
        "typeVersion": 1,
        "required": true
      },
      {
        "id": "appId",
        "name": "appId",
        "type": "@hubspot.type.webhook.events.item.eventid",
        "typeName": "HubSpot Webhook Events Item eventId",
        "typeKey": "hubspot.type.webhook.events.item.eventid",
        "typeVersion": 1,
        "required": false
      },
      {
        "id": "occurredAt",
        "name": "occurredAt",
        "type": "@hubspot.type.record.page.total",
        "typeName": "HubSpot Record Page total",
        "typeKey": "hubspot.type.record.page.total",
        "typeVersion": 1,
        "required": true
      },
      {
        "id": "subscriptionType",
        "name": "subscriptionType",
        "type": "string",
        "typeName": "Text",
        "required": true
      },
      {
        "id": "attemptNumber",
        "name": "attemptNumber",
        "type": "@hubspot.type.record.page.total",
        "typeName": "HubSpot Record Page total",
        "typeKey": "hubspot.type.record.page.total",
        "typeVersion": 1,
        "required": false
      },
      {
        "id": "objectId",
        "name": "objectId",
        "type": "@hubspot.type.webhook.events.item.eventid",
        "typeName": "HubSpot Webhook Events Item eventId",
        "typeKey": "hubspot.type.webhook.events.item.eventid",
        "typeVersion": 1,
        "required": false
      },
      {
        "id": "propertyName",
        "name": "propertyName",
        "type": "string",
        "typeName": "Text",
        "required": false
      },
      {
        "id": "propertyValue",
        "name": "propertyValue",
        "type": "@core.type.httpRequest.field.body",
        "typeName": "HTTP Request Envelope / body Value",
        "typeKey": "core.type.httpRequest.field.body",
        "typeVersion": 1,
        "required": false
      },
      {
        "id": "changeSource",
        "name": "changeSource",
        "type": "string",
        "typeName": "Text",
        "required": false
      },
      {
        "id": "changeFlag",
        "name": "changeFlag",
        "type": "string",
        "typeName": "Text",
        "required": false
      },
      {
        "id": "remainder",
        "name": "remainder",
        "type": "def_f9962f86c7f4",
        "typeName": "Named contract",
        "typeVersion": 1,
        "required": false
      }
    ],
    "outputs": [
      {
        "id": "next",
        "name": "Next",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "value",
        "name": "value",
        "type": "@hubspot.type.webhook.events.item",
        "typeName": "HubSpot Webhook Events Item",
        "typeKey": "hubspot.type.webhook.events.item",
        "typeVersion": 1,
        "required": true
      },
      {
        "id": "error",
        "name": "On error",
        "type": "control",
        "typeName": "Control",
        "required": false
      }
    ],
    "configSchema": {
      "type": "object",
      "properties": {},
      "required": [],
      "additionalProperties": false
    },
    "documentation": "encode HubSpot Webhook Events Item\n\nPure functional codec; no external request, secret lookup or state mutation. Object codecs preserve unknown fields through a named remainder; collision is rejected. Lists preserve item/rest/index/count; empty lists omit item. Nullable codecs preserve null explicitly. Opaque maps/JSON use JSON text parsing/stringification. Runtime validates the named type after encoding and before decoding.\n\nInputs: eventId, subscriptionId, portalId, appId, occurredAt, subscriptionType, attemptNumber, objectId, propertyName, propertyValue, changeSource, changeFlag, remainder. Outputs: value.\n\nAuthored 2026-10-20. Provider reference: [official documentation](https://developers.hubspot.com/docs/api-reference/latest/crm/using-object-apis). New assets are v1; callers must preserve exact dependency pins. Mock tests establish request/codec behavior only; live tenant access is unverified.\n\n## Audited socket contract (21 October 2026)\n\nInputs:\n- `eventId`: `@hubspot.type.webhook.events.item.eventid`; required.\n- `subscriptionId`: `@hubspot.type.webhook.events.item.eventid`; optional (absent stays absent).\n- `portalId`: `@hubspot.type.webhook.events.item.eventid`; required.\n- `appId`: `@hubspot.type.webhook.events.item.eventid`; optional (absent stays absent).\n- `occurredAt`: `@hubspot.type.record.page.total`; required.\n- `subscriptionType`: `string`; required.\n- `attemptNumber`: `@hubspot.type.record.page.total`; optional (absent stays absent).\n- `objectId`: `@hubspot.type.webhook.events.item.eventid`; optional (absent stays absent).\n- `propertyName`: `string`; optional (absent stays absent).\n- `propertyValue`: `@core.type.httpRequest.field.body`; optional (absent stays absent).\n- `changeSource`: `string`; optional (absent stays absent).\n- `changeFlag`: `string`; optional (absent stays absent).\n- `remainder`: `def_f9962f86c7f4`; optional (absent stays absent).\n\nOutputs:\n- `value`: `@hubspot.type.webhook.events.item`; required.\n\nConfiguration:\nNo asset-specific configuration.\n\nKnown provider records and list elements have structural schemas. Explicit dynamic payloads, selected query results and provider extensions retain the recursive JSON Value vocabulary; they do not imply a known provider entity. Null is distinct from omission. Runtime validates the exact selected immutable type version; reading newer documentation never repins existing graphs. This audit used synthetic fixtures/local mocks and does not establish live provider authorization or delivery.",
    "runtime": "javascript",
    "tags": [
      "codec",
      "encode",
      "hubspot",
      "library-expansion",
      "typed-data"
    ],
    "source": "baseline-catalog"
  }
}
