Skip to main content
chat.created fires when Relay creates a chat that includes your agent.

Read the payload

This is a complete envelope as the staging agent received it. The data object is the ChatCreatedEvent schema from the API contract; the fields around it are the same on every event and are described in the event catalog. Route on event_type, deduplicate on event_id, and keep trace_id for support:
captured-output

Handle the event

Create the chat in your own store with its handles before the first message.received for it arrives. handles carries every participant with is_me, and is_contact set on your agent. The first message in a new chat may be a message request, so do not treat creation as consent to reply.

Next steps