> ## Documentation Index
> Fetch the complete documentation index at: https://docs.befailproof.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Import one file of agent events into the caller's organization.

> The body is the file itself, optionally gzipped (detected from its bytes).
The format is detected from the content unless `format` names it: our event
JSONL, a Claude Code transcript, or a Codex rollout. Transcripts are
converted exactly as the failproofaid collector converts them live, secrets
are redacted, and every event is stamped `ingest_source: "upload"` and
`uploaded_by: <who>`. Sessions already present in the organization are
skipped whole. `dry_run=true` reports what would happen and stores nothing.



## OpenAPI

````yaml /reference/openapi.json post /events/import
openapi: 3.1.0
info:
  title: AgentEye API
  description: >-
    The AgentEye observability API.


    Every path below is relative to `/v1` on your deployment's dashboard origin
    — e.g. `https://app.example.com/v1/sessions`. Authenticate with a scoped API
    key as a bearer token.


    Organization scoping: a key belongs to one organization and acts on it
    automatically. An instance-scoped key selects one per request with the
    `X-AgentEye-Org` header; without it, such a key resolves to the default
    organization, so set it explicitly on a multi-org deployment.
  license:
    name: MIT
    identifier: MIT
  version: 0.0.1-beta.77
servers:
  - url: https://app.befailproof.ai/v1
    description: Failproof AI Cloud
security:
  - api_key: []
tags:
  - name: Events
    description: Ingest and query the event store.
  - name: Sessions
    description: Agent sessions and their evaluations.
  - name: Evaluations
    description: Evaluation results and re-runs.
  - name: Dashboards
    description: Dashboards and their tiles.
  - name: Queries
    description: Saved SQL and ad-hoc query execution.
  - name: Keys
    description: Mint and manage scoped API keys.
  - name: Users
    description: Dashboard members and access.
  - name: Settings
    description: Operational settings and context-window overrides.
  - name: Permission sets
    description: Named permission roles.
  - name: Alerts
    description: Alert rules and their recipients.
  - name: Issues
    description: Open, triage, assign and resolve issues.
  - name: Audits
    description: Recurring audits and their findings.
  - name: Usage
    description: Organization usage and billing windows.
  - name: Health
    description: Liveness.
  - name: Auth
    description: Describe the key you are calling with.
paths:
  /events/import:
    post:
      tags:
        - Events
      summary: Import one file of agent events into the caller's organization.
      description: >-
        The body is the file itself, optionally gzipped (detected from its
        bytes).

        The format is detected from the content unless `format` names it: our
        event

        JSONL, a Claude Code transcript, or a Codex rollout. Transcripts are

        converted exactly as the failproofaid collector converts them live,
        secrets

        are redacted, and every event is stamped `ingest_source: "upload"` and

        `uploaded_by: <who>`. Sessions already present in the organization are

        skipped whole. `dry_run=true` reports what would happen and stores
        nothing.
      operationId: post_events_import
      parameters:
        - name: format
          in: query
          description: '`auto` (default), `agenteye`, `claude` or `codex`.'
          required: false
          schema:
            type: string
        - name: path
          in: query
          description: >-
            The file's path relative to what was dropped, e.g.

            `-home-me-repo/0b5c….jsonl`. Claude and Codex take the session id
            from

            it, and a Claude subagent its parent session. A trailing `.gz` is
            ignored.
          required: false
          schema:
            type: string
        - name: environment
          in: query
          description: Environment for events that do not name one. Default `upload`.
          required: false
          schema:
            type: string
        - name: dry_run
          in: query
          description: Convert and report; store nothing.
          required: false
          schema:
            type: boolean
        - name: existing_before
          in: query
          description: >-
            Unix milliseconds. A session counts as already present only when it
            has

            rows ingested before this. Pass the dry run's `checked_at`, so the
            later

            files of a session this import created are not skipped as
            "existing".

            Default: now.
          required: false
          schema:
            type: integer
            format: int64
      requestBody:
        description: >-
          One file: event JSONL, a Claude Code transcript or a Codex rollout.
          Gzip is accepted.
        content:
          application/octet-stream:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: File processed (or, with `dry_run`, previewed).
        '400':
          description: Bad `format`, `path` or `environment`.
        '401':
          description: Missing, unknown, or disabled key.
        '403':
          description: The key lacks `events:add`.
        '413':
          description: The file exceeds MAX_BODY_BYTES after decompression.
        '422':
          description: >-
            Unrecognized file format, or a converted event exceeds the storage
            JSON row limit.
        '500':
          description: Storage failed — retry the file.
      security:
        - api_key: []
components:
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      description: >-
        A scoped AgentEye API key. Mint one in the dashboard under Settings →
        API keys, or with `POST /v1/keys`. Each endpoint names the permission it
        requires; a key without it gets 403 and a `required_permission` field
        naming what was missing.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.