PATCH /v2/api/events/batch

Set status per event. Only pending events (with both completed_at and failed_at NULL) are updated. Already-processed events return updated:false. When setting status to 'completed', completed_at is set and failed_at is cleared. When setting status to 'failed', failed_at is set and completed_at is cleared. This is a once-only operation - events cannot be re-processed once marked as completed or failed.

application/json

Body Required

List of id + status pairs. Status must be 'completed' or 'failed'

  • accountId string
  • completedAt string
  • createdAt string
  • eventType string
  • failedAt string
  • id string
  • payload object

Responses

  • 200 application/json

    Returns array with id and updated flag for each event. updated:true means event was updated, updated:false means event was already processed or not found

    Hide response attributes Show response attributes object
    • accountId string
    • completedAt string
    • createdAt string
    • eventType string
    • failedAt string
    • id string
    • payload object
  • default application/json

    All errors will return the same object with a describing code & message

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
PATCH /v2/api/events/batch
curl \
 --request PATCH 'https://api.maddenanalytics.com/v2/api/events/batch' \
 --header "Content-Type: application/json" \
 --data '[{"accountId":"string","completedAt":"string","createdAt":"string","eventType":"string","failedAt":"string","id":"string","payload":{}}]'
Request examples
[
  {
    "accountId": "string",
    "completedAt": "string",
    "createdAt": "string",
    "eventType": "string",
    "failedAt": "string",
    "id": "string",
    "payload": {}
  }
]
Response examples (200)
[
  {
    "accountId": "string",
    "completedAt": "string",
    "createdAt": "string",
    "eventType": "string",
    "failedAt": "string",
    "id": "string",
    "payload": {}
  }
]
Response examples (default)
{
  "error": "Error Type (if any)",
  "message": "Message describing the error",
  "statusCode": 400
}