Azure Event Grid Publish API
Publish events to a topic
Publish events to a topic
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/azure-event-grid:azure-event-grid-publish-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Azure Event Grid Publisher Publish API
version: '2018-01-01'
description: 'Data-plane REST API for publishing events to Azure Event Grid topics, domains,
and namespace topics. Supports the Event Grid event schema, the CloudEvents 1.0
schema, and custom schemas. Authentication is via Microsoft Entra ID OAuth 2.0
bearer tokens or the topic''s shared-access key sent in the `aeg-sas-key` header
(or a SAS token in the `aeg-sas-token` header).'
contact:
name: Azure Event Grid
url: https://learn.microsoft.com/en-us/rest/api/eventgrid/
servers:
- url: https://{topic-endpoint}
description: Event Grid topic or domain endpoint (e.g. https://my-topic.eastus-1.eventgrid.azure.net)
variables:
topic-endpoint:
default: my-topic.eastus-1.eventgrid.azure.net
description: Topic or domain endpoint host
tags:
- name: Publish
description: Publish events to a topic
paths:
/api/events:
post:
summary: Publish events to a topic
description: 'Publish a batch of Event Grid events or CloudEvents to a topic or domain.
The request body is an array; the schema depends on whether the topic is
configured for `EventGridSchema`, `CloudEventSchemaV1_0`, or a custom schema.'
operationId: publishEvents
tags:
- Publish
parameters:
- in: query
name: api-version
schema:
type: string
default: '2018-01-01'
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- type: array
items:
$ref: '#/components/schemas/EventGridEvent'
- type: array
items:
$ref: '#/components/schemas/CloudEvent'
application/cloudevents-batch+json:
schema:
type: array
items:
$ref: '#/components/schemas/CloudEvent'
application/cloudevents+json:
schema:
$ref: '#/components/schemas/CloudEvent'
responses:
'200':
description: Events accepted
security:
- sasKey: []
- sasToken: []
- entra: []
components:
schemas:
CloudEvent:
type: object
required:
- id
- source
- type
- specversion
properties:
id:
type: string
source:
type: string
format: uri
type:
type: string
specversion:
type: string
enum:
- '1.0'
time:
type: string
format: date-time
datacontenttype:
type: string
subject:
type: string
data: {}
data_base64:
type: string
format: byte
EventGridEvent:
type: object
required:
- id
- subject
- data
- eventType
- eventTime
- dataVersion
properties:
id:
type: string
topic:
type: string
subject:
type: string
data: {}
eventType:
type: string
eventTime:
type: string
format: date-time
metadataVersion:
type: string
dataVersion:
type: string
securitySchemes:
sasKey:
type: apiKey
in: header
name: aeg-sas-key
description: Topic shared-access key
sasToken:
type: apiKey
in: header
name: aeg-sas-token
description: Topic shared-access signature token
entra:
type: oauth2
description: Microsoft Entra ID OAuth 2.0 bearer token
flows:
clientCredentials:
tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
scopes:
https://eventgrid.azure.net/.default: Publish/receive Event Grid events