---
title: "Email a cost events export"
method: POST
path: "/accounts/admin/export-cost-events"
tags: ["Usage and Billing"]
---

# Email a cost events export

`POST /accounts/admin/export-cost-events`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/accounts/admin/export-cost-events`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/docs/accounts/admin/export-cost-events/post.ts> (a function with typed inputs; its response is checked against the schema)

Exports the account's cost events and emails the file. Admin or root only.

## Request body

- object
  - `start_date` string: Window start
  - `end_date` string: Window end
  - `email` string, required: Where to send the export

## Response `200`

Success

- object
  - `message` string: Success message

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Caller is not an admin or root

## Changes

- **2026-11-12** `700eb1ace61a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/changes/accounts/admin/export-cost-events/post.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/revisions/700eb1ace61a?raw)
