---
title: "Backfill Events"
method: POST
path: "/admin/organizations/{organization_id}/usage-events/backfill"
tags: ["usage-events-admin"]
---

# Backfill Events

`POST /admin/organizations/{organization_id}/usage-events/backfill`

Backfill missing events, defaulting to the current UTC month through now.

Optional bounds allow an over-cap month to be processed in smaller windows.

## Path parameters

- `organization_id` string, uuid, required

## Request body

- UsageEventBackfillRequest — Optional bounds for chunking a backfill into smaller windows.
  - `created_from` string, date-time, nullable — Inclusive lower bound; defaults to the start of the current UTC calendar month.
  - `created_until` string, date-time, nullable — Exclusive upper bound; defaults to now.

## Response `200`

Successful Response

- UsageEventBackfillResponse — Summary of a sessions-to-usage-events backfill run.
  - `sessions_examined` integer, required — Production sessions read within the resolved window.
  - `events_written` integer, required — Usage events this run inserted; zero when every session already had one.
  - `sessions_skipped` integer, required — Sessions this run intentionally left unmetered: eval/load-test/A-B/product-flow-E2E traffic that a live start never meters either.
  - `refusals` UsageEventBackfillRefusalResponse[], required — First refused sessions and their reasons.
    - `session_id` string, uuid, required — The session left unjudged.
    - `reason` 'session_fields_incomplete' | 'actor_identity_unrecorded', required — Why this backfill would not write an event for one session.
  - `refusals_total` integer, required — Total sessions the run declined to judge.

## Other responses

- `422` — Validation Error

## Changes

> 57 revisions in range; 9 not diffed.

- **2026-09-23** `3da9c3d0385f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/traversal/apis/fastapi/changes/admin/organizations/:organization_id/usage-events/backfill/post.md)

---

[API](https://skmtc.dev/traversal/apis/fastapi.md) · [All operations](https://skmtc.dev/traversal/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc.dev/traversal/apis/fastapi/revisions/c3bd9dec6c16?raw)
