API ReferenceapieventsPOST /v1/events

POST /v1/events

Service: events · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "example": "user.created.v1"
    },
    "payload": {
      "type": "object",
      "additionalProperties": {},
      "example": {
        "user_id": "u_123"
      }
    },
    "correlation_id": {
      "type": "string",
      "example": "corr_abc123"
    },
    "source": {
      "type": "string",
      "example": "identity"
    },
    "brand_id": {
      "type": "string",
      "example": "loop-health"
    }
  },
  "required": [
    "name",
    "payload"
  ]
}

Responses

201 Event accepted

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "published",
        "queued"
      ]
    },
    "ts": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "name",
    "status",
    "ts"
  ]
}

422 Validation failed

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://events.platform.loop.health/v1/events \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'