Skip to main content
For the exhaustive schema-derived catalog, see all examples.

What it is

Handle contact attribute change events.

Before you begin

  • Create a public HTTPS endpoint in your application.
  • Configure a YCloud webhook endpoint for the event types you need.
  • Store the endpoint signing secret securely.
  • Make event processing idempotent.

How it works

YCloud sends an HTTP POST request when the event occurs. Verify the signature, durably record the event, return a 2xx response, and process slow work asynchronously.

Request

The scenarios below show requests delivered to your webhook URL. Treat the event id as the delivery identifier and use type to route the payload.

Response

Return a 2xx status after accepting the event.
For endpoint setup, signature validation, and retry behavior, see Configure webhooks.
Occurs when a contact’s attributes are modified. The webhook payload contains information about what attributes were changed, including their old and new values.

Tags Change Example (Add Tags)

Request

Response

Acknowledge the delivery after durably accepting the event.

Explanation

Route the event by type, deduplicate it by id, and move slow or failure-prone work to an asynchronous processor.

Tags Change Example (Remove Tags)

Request

Response

Acknowledge the delivery after durably accepting the event.

Explanation

Route the event by type, deduplicate it by id, and move slow or failure-prone work to an asynchronous processor.

Change Example

Request

Response

Acknowledge the delivery after durably accepting the event.

Explanation

  • Correct Structure: The contactAttributesChanged object contains three required fields: id, updateTime, and changedAttributes.
  • Changed Attributes: The changedAttributes field is an object where each key is the attribute name and the value is a ContactAttributeChange object.
  • Event Property Configuration: When enabling contact.attributes_changed events, you must configure the eventProperties field in your webhook endpoint to specify which attributes should be included in the webhook payload.
  • Attribute Types: The oldValue and newValue fields can contain different data types:
    • String: text values
    • Number: numeric values (integer or decimal)
    • Boolean: true/false values
    • Array: arrays of strings
    • Object: complex objects with nested properties
    • Null: when an attribute is removed or unset
  • Tags Changes: For tag attributes, the extra field provides detailed information about which tags were added or removed, including their IDs and values.
  • Null Values: When an attribute is removed or set to null, the newValue will be null. When an attribute is newly added, the oldValue may be null.
  • Custom Attributes: Custom attributes are included in the changedAttributes object just like standard attributes, with their custom keys as the attribute names.
  • Change Detection: Only attributes that have actually changed are included in the changedAttributes object.
  • Extra Field: The extra field is optional and is primarily used for tag-related changes to provide additional context about the specific actions performed.