Agent Wranglers

Webhooks and events Recommended

Version event payloads

Name each event type and version its payload, and change it only by adding fields, as with the API itself.

How to do it

Use names such as order.shipped. Describe events in the contract, for example in OpenAPI's webhooks section or with AsyncAPI. Follow the rules in additive changes.

How to check

The contract lists every event type the system sends, and each validates against its schema in tests.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/webhooks-and-events/event-versions.