Skip to main content
POST
https://api-production-56df.up.railway.app
/
events
/
batch
curl -X POST https://api-production-56df.up.railway.app/events/batch \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key" \
  -d '{
    "events": [
      {
        "event_id": "evt_batch_001",
        "action": "slack:message:send",
        "timestamp": "2026-02-26T10:00:00Z",
        "agent": {
          "agent_id": "agent-assistant-03",
          "agent_type": "chatbot",
          "framework": "langchain",
          "model": "gpt-4o"
        },
        "session": {
          "session_id": "sess_abc123",
          "user_id": "user_15",
          "started_at": "2026-02-26T09:45:00Z"
        },
        "target": {
          "resource_type": "channel",
          "resource_id": "C0PAYMENTS",
          "sensitivity_level": 2
        },
        "parameters": {
          "channel": "#payments-alerts",
          "message_length": 240
        }
      },
      {
        "event_id": "evt_batch_002",
        "action": "database:table:query",
        "timestamp": "2026-02-26T10:01:30Z",
        "agent": {
          "agent_id": "agent-analyst-07",
          "agent_type": "data_analyst",
          "framework": "autogen",
          "model": "gemini-2.0-flash"
        },
        "session": {
          "session_id": "sess_def456",
          "user_id": "user_22",
          "started_at": "2026-02-26T09:50:00Z"
        },
        "target": {
          "resource_type": "database",
          "resource_id": "prod-analytics-db",
          "sensitivity_level": 3
        },
        "data_fields_accessed": [
          {"field": "email", "classification": "PII"},
          {"field": "transaction_amount", "classification": "financial"}
        ],
        "user_context": "Generate a monthly revenue report broken down by region"
      },
      {
        "event_id": "evt_batch_003",
        "action": "filesystem:file:write",
        "timestamp": "2026-02-26T10:02:45Z",
        "agent": {
          "agent_id": "agent-codex-01",
          "agent_type": "coding_assistant",
          "framework": "custom",
          "model": "claude-sonnet-4-20250514"
        },
        "session": {
          "session_id": "sess_ghi789",
          "user_id": "user_42",
          "started_at": "2026-02-26T10:00:00Z"
        },
        "target": {
          "resource_type": "file",
          "resource_id": "/app/config/database.yml",
          "sensitivity_level": 4
        },
        "preceding_actions": [
          "filesystem:file:read",
          "filesystem:file:read"
        ]
      }
    ]
  }'
{
  "event_ids": [
    "evt_batch_001",
    "evt_batch_002",
    "evt_batch_003"
  ],
  "count": 3
}
Requires X-API-Key header for authentication.
Batch events are processed asynchronously. The response confirms acceptance with a 202 status, not the final scores. Use the List Scores or Score Detail endpoints to retrieve results.

Request Body

events
array
required
Array of event objects to score. Minimum 1, maximum 1000 items per batch. Each event follows the same schema as the Score Event endpoint.

Response

event_ids
array
List of event IDs that were accepted for processing.
count
integer
Total number of events accepted in this batch.
curl -X POST https://api-production-56df.up.railway.app/events/batch \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key" \
  -d '{
    "events": [
      {
        "event_id": "evt_batch_001",
        "action": "slack:message:send",
        "timestamp": "2026-02-26T10:00:00Z",
        "agent": {
          "agent_id": "agent-assistant-03",
          "agent_type": "chatbot",
          "framework": "langchain",
          "model": "gpt-4o"
        },
        "session": {
          "session_id": "sess_abc123",
          "user_id": "user_15",
          "started_at": "2026-02-26T09:45:00Z"
        },
        "target": {
          "resource_type": "channel",
          "resource_id": "C0PAYMENTS",
          "sensitivity_level": 2
        },
        "parameters": {
          "channel": "#payments-alerts",
          "message_length": 240
        }
      },
      {
        "event_id": "evt_batch_002",
        "action": "database:table:query",
        "timestamp": "2026-02-26T10:01:30Z",
        "agent": {
          "agent_id": "agent-analyst-07",
          "agent_type": "data_analyst",
          "framework": "autogen",
          "model": "gemini-2.0-flash"
        },
        "session": {
          "session_id": "sess_def456",
          "user_id": "user_22",
          "started_at": "2026-02-26T09:50:00Z"
        },
        "target": {
          "resource_type": "database",
          "resource_id": "prod-analytics-db",
          "sensitivity_level": 3
        },
        "data_fields_accessed": [
          {"field": "email", "classification": "PII"},
          {"field": "transaction_amount", "classification": "financial"}
        ],
        "user_context": "Generate a monthly revenue report broken down by region"
      },
      {
        "event_id": "evt_batch_003",
        "action": "filesystem:file:write",
        "timestamp": "2026-02-26T10:02:45Z",
        "agent": {
          "agent_id": "agent-codex-01",
          "agent_type": "coding_assistant",
          "framework": "custom",
          "model": "claude-sonnet-4-20250514"
        },
        "session": {
          "session_id": "sess_ghi789",
          "user_id": "user_42",
          "started_at": "2026-02-26T10:00:00Z"
        },
        "target": {
          "resource_type": "file",
          "resource_id": "/app/config/database.yml",
          "sensitivity_level": 4
        },
        "preceding_actions": [
          "filesystem:file:read",
          "filesystem:file:read"
        ]
      }
    ]
  }'
{
  "event_ids": [
    "evt_batch_001",
    "evt_batch_002",
    "evt_batch_003"
  ],
  "count": 3
}