Domain Event

Schema for a domain event in an event-sourced or event-driven system following CloudEvents conventions.

API-FirstArchitecture PatternsCQRSDistributed SystemsEnterpriseEvent-DrivenMicroservicesScalable ArchitectureSoftware EngineeringSystems Design

Properties

Name Type Description
specversion string CloudEvents specification version.
type string Event type in reverse DNS notation.
source string Identifies the event producer (bounded context or service).
id string Unique identifier for this event occurrence (UUID recommended).
time string Timestamp when the event occurred (RFC 3339).
subject string Subject/entity identifier this event relates to (e.g., order ID).
datacontenttype string Content type of the data field.
dataschema string URI of the schema the data attribute conforms to.
data object Event payload. Schema depends on event type.
correlationId string Correlation ID for tracing requests across service boundaries.
causationId string ID of the command or event that caused this event.
aggregateId string Identifier of the domain aggregate this event belongs to.
aggregateType string Type of the domain aggregate (e.g., Order, Customer, Payment).
aggregateVersion integer Optimistic concurrency version of the aggregate after this event.
metadata object Additional metadata (user ID, tenant ID, trace context, etc.).
View JSON Schema on GitHub

JSON Schema

scalable-software-and-systems-event-schema.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://api-evangelist.com/schemas/scalable-software-and-systems/domain-event",
  "title": "Domain Event",
  "description": "Schema for a domain event in an event-sourced or event-driven system following CloudEvents conventions.",
  "type": "object",
  "required": ["specversion", "type", "source", "id", "time"],
  "properties": {
    "specversion": {
      "type": "string",
      "description": "CloudEvents specification version.",
      "enum": ["1.0"],
      "example": "1.0"
    },
    "type": {
      "type": "string",
      "description": "Event type in reverse DNS notation.",
      "example": "com.example.order.placed"
    },
    "source": {
      "type": "string",
      "format": "uri-reference",
      "description": "Identifies the event producer (bounded context or service).",
      "example": "/orders-service"
    },
    "id": {
      "type": "string",
      "description": "Unique identifier for this event occurrence (UUID recommended).",
      "example": "b2c3d4e5-f6a7-8901-bcde-f01234567890"
    },
    "time": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the event occurred (RFC 3339)."
    },
    "subject": {
      "type": "string",
      "description": "Subject/entity identifier this event relates to (e.g., order ID).",
      "example": "order-12345"
    },
    "datacontenttype": {
      "type": "string",
      "description": "Content type of the data field.",
      "default": "application/json",
      "example": "application/json"
    },
    "dataschema": {
      "type": "string",
      "format": "uri",
      "description": "URI of the schema the data attribute conforms to."
    },
    "data": {
      "type": "object",
      "description": "Event payload. Schema depends on event type.",
      "additionalProperties": true
    },
    "correlationId": {
      "type": "string",
      "description": "Correlation ID for tracing requests across service boundaries."
    },
    "causationId": {
      "type": "string",
      "description": "ID of the command or event that caused this event."
    },
    "aggregateId": {
      "type": "string",
      "description": "Identifier of the domain aggregate this event belongs to."
    },
    "aggregateType": {
      "type": "string",
      "description": "Type of the domain aggregate (e.g., Order, Customer, Payment)."
    },
    "aggregateVersion": {
      "type": "integer",
      "minimum": 0,
      "description": "Optimistic concurrency version of the aggregate after this event."
    },
    "metadata": {
      "type": "object",
      "description": "Additional metadata (user ID, tenant ID, trace context, etc.).",
      "properties": {
        "userId": { "type": "string" },
        "tenantId": { "type": "string" },
        "traceId": { "type": "string" },
        "spanId": { "type": "string" }
      },
      "additionalProperties": true
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/scalable-software-and-systems-event"
All schemas
curl "https://apis.io/api/v1/json-schemas?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.