Skip to main content

Raw JSON Ingestion

If your AI provider isn’t directly supported, or you have custom event data, use the raw JSON endpoint to push events into Igris.

Endpoint

POST /api/v1/ingest/raw

Authentication

Authorization: Bearer ig_your_api_key_here
Content-Type: application/json

Request Body

Send a single event or an array of events:

Single Event

curl -X POST https://your-igris.fly.dev/api/v1/ingest/raw \
  -H "Authorization: Bearer ig_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "type": "tool_call",
    "toolName": "generate_report",
    "action": "allow",
    "timestamp": "2026-03-19T10:00:00.000Z",
    "metadata": {
      "model": "gpt-4o",
      "userId": "user_42",
      "latencyMs": 340
    }
  }'

Batch Events

curl -X POST https://your-igris.fly.dev/api/v1/ingest/raw \
  -H "Authorization: Bearer ig_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      {
        "type": "completion",
        "toolName": "claude-sonnet-4-20250514",
        "action": "allow",
        "timestamp": "2026-03-19T10:00:00.000Z",
        "metadata": { "tokens": 500 }
      },
      {
        "type": "tool_call",
        "toolName": "search_database",
        "action": "allow",
        "timestamp": "2026-03-19T10:00:01.000Z",
        "metadata": { "resultCount": 42 }
      }
    ]
  }'

Event Schema

FieldTypeRequiredDescription
typestringYesEvent type: tool_call, completion, embedding, or custom
toolNamestringYesTool or model name
actionstringNoallow, deny, alert, or log. Defaults to log
timestampstringNoISO 8601 timestamp. Defaults to current time
metadataobjectNoArbitrary JSON metadata preserved with the event

Response

{
  "data": {
    "ingested": 2,
    "rejected": 0
  },
  "meta": {
    "remainingQuota": 49850
  }
}

Use Cases

  • Custom AI pipelines — log events from your own AI orchestration layer
  • Batch imports — backfill historical data from CSV or database exports
  • Testing — push synthetic events to verify dashboard and compliance features
  • Multi-provider aggregation — consolidate events from providers without native webhook support

Validation

Events are validated using Zod schemas. Invalid events are rejected with a 400 status and error details:
{
  "error": "Validation failed",
  "details": [
    { "field": "toolName", "message": "Required" }
  ]
}