Dapr PubSub API

Publish and subscribe messaging operations.

Operations 2

POST /v1.0/publish/{pubsubname}/{topic} Dapr Publish Event #
POST /v1.0/publish/bulk/{pubsubname}/{topic} Dapr Bulk Publish Events #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dapr-pubsub-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API 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 Specification

dapr-pubsub-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Dapr Actors Pub Sub API
  description: The Dapr Actors API provides virtual actor capabilities for distributed applications, including actor method invocation, state management, timers, and reminders. Actors provide a single-threaded programming model with guaranteed message ordering.
  version: 1.0.0
  contact:
    name: Dapr
    url: https://dapr.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:3500
  description: Dapr Sidecar
tags:
- name: PubSub
  description: Publish and subscribe messaging operations.
paths:
  /v1.0/publish/{pubsubname}/{topic}:
    post:
      summary: Dapr Publish Event
      description: Publishes an event to the specified topic on the given pub/sub component. If content type is not application/cloudevents+json, the payload is automatically wrapped in a CloudEvent envelope.
      operationId: publishEvent
      tags:
      - PubSub
      parameters:
      - name: pubsubname
        in: path
        required: true
        description: The name of the pub/sub component.
        schema:
          type: string
      - name: topic
        in: path
        required: true
        description: The name of the topic.
        schema:
          type: string
      - name: metadata.rawPayload
        in: query
        description: Set to true to disable CloudEvent wrapping of the payload.
        schema:
          type: string
      - name: metadata.ttlInSeconds
        in: query
        description: Time-to-live for the message in seconds.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema: {}
          application/cloudevents+json:
            schema: {}
      responses:
        '204':
          description: Event published successfully.
        '403':
          description: Event forbidden by access controls.
        '404':
          description: Pub/sub component not found.
        '500':
          description: Failed to publish event.
  /v1.0/publish/bulk/{pubsubname}/{topic}:
    post:
      summary: Dapr Bulk Publish Events
      description: Publishes multiple events to the specified topic in a single request.
      operationId: bulkPublishEvents
      tags:
      - PubSub
      parameters:
      - name: pubsubname
        in: path
        required: true
        description: The name of the pub/sub component.
        schema:
          type: string
      - name: topic
        in: path
        required: true
        description: The name of the topic.
        schema:
          type: string
      - name: metadata.rawPayload
        in: query
        description: Set to true to disable CloudEvent wrapping.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                required:
                - entryId
                - event
                properties:
                  entryId:
                    type: string
                    description: Unique identifier for the entry.
                  event:
                    description: The event data.
                  contentType:
                    type: string
                    description: Content type of the event.
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
      responses:
        '200':
          description: Bulk publish completed (may include partial failures).
          content:
            application/json:
              schema:
                type: object
                properties:
                  failedEntries:
                    type: array
                    items:
                      type: object
                      properties:
                        entryId:
                          type: string
                        error:
                          type: string
        '404':
          description: Pub/sub component not found.
        '500':
          description: Failed to publish events.
externalDocs:
  description: Dapr Actors API Reference
  url: https://docs.dapr.io/reference/api/actors_api/