# Illustrative contract only. Reserved example domain; not a live service.
openapi: 3.1.1
info:
  title: Example Events API
  version: 1.0.0
servers:
  - url: https://api.example.com/v1
paths:
  /events:
    post:
      operationId: acceptEvent
      summary: Accept one application event
      description: Acceptance does not confirm downstream delivery.
      security:
        - ProjectToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [name, properties]
              properties:
                name:
                  type: string
                  minLength: 1
                properties:
                  type: object
      responses:
        '202':
          description: Event accepted
          content:
            application/json:
              schema:
                type: object
                required: [event_id, status]
                properties:
                  event_id:
                    type: string
                  status:
                    type: string
                    enum: [accepted]
        '400':
          description: Invalid event body
        '401':
          description: Missing or invalid project token
components:
  securitySchemes:
    ProjectToken:
      type: http
      scheme: bearer
