Help Center/ EventGrid/ FAQs/ Can I Push Custom Events to EG?
Updated on 2025-09-26 GMT+08:00

Can I Push Custom Events to EG?

Yes.

To push custom events to EG, encapsulate them according to CloudEvents V1.0, and send them to EG using an API.

Example event:

{
  "specversion": "1.0",
  "type": "com.example.item.created",
  "source": "/mycontext",
  "id": "A234-1234-1234",
  "time": "2025-09-25T19:35:00Z",
  "subject": "events/12345",
  "datacontenttype": "application/json",
  "data": {
    "itemId": "ABC-123",
    "action": "created",
    "timestamp": "2025-09-25T19:35:00Z"
  },
  "comexampleextension1": "value1",
  "comexampleextension2": {
    "nested": "value2"
  }
}

For details, see Sending a Custom Event.