---
title: "Close backfill"
method: POST
path: "/events/backfills/{backfill_id}/close"
tags: ["Event"]
---

# Close backfill

`POST /events/backfills/{backfill_id}/close`

Closing a backfill makes the updated usage visible in Orb. Upon closing a backfill, Orb will asynchronously reflect
the updated usage in invoice amounts and usage graphs. Once all of the updates are complete, the backfill's status
will transition to `reflected`.

## Path parameters

- `backfill_id` string, required

## Response `200`

OK

- Backfill — A backfill represents an update to historical usage data, adding or replacing events in a timeframe.
  - `id` string, required
  - `status` 'pending' | 'reflected' | 'pending_revert' | 'reverted', required — The status of the backfill.
  - `created_at` string, date-time, required
  - `timeframe_start` string, date-time, required
  - `timeframe_end` string, date-time, required
  - `events_ingested` integer, required — The number of events ingested in this backfill.
  - `close_time` string, date-time, nullable, required — If in the future, the time at which the backfill will automatically close. If in the past, the time at which the backfill was closed.
  - `reverted_at` string, date-time, nullable, required — The time at which this backfill was reverted.
  - `customer_id` string, nullable, required — The Orb-generated ID of the customer to which this backfill is scoped. If `null`, this backfill is scoped to all customers.
  - `deprecation_filter` string, nullable — A boolean [computed property](/extensibility/advanced-metrics#computed-properties) used to filter the set of events to deprecate
  - `replace_existing_events` boolean, required — If `true`, existing events in the backfill's timeframe will be replaced with the newly ingested events associated with the backfill. If `false`, newly ingested events will be added to the existing events.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `409` — Conflict
- `413` — Content Too Large
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/withorb/apis/api-reference.md) · [All operations](https://skmtc.dev/withorb/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/withorb/api-reference/revisions/816dfe734e2e/schema)
