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

# Connect Engineering Events to Costory (GitHub, CI/CD, Custom API)

> Save the cause of a cost change as an event linked to a dashboard, and push deploy events from CI/CD so Costory's AI analysis knows what you shipped.

You trace a cost spike to a nightly batch job, post the answer in Slack, and a month later someone asks about the same bump on the same chart. Events keep that work. Save the cause as an event, link it to the dashboard, and the explanation stays attached to the chart for the next person who opens it.

![Costory dashboard contextualized with events on cost charts](https://mintcdn.com/costory/9QR9mkIN8IiZz2eI/images/events.gif?s=5f9fbcec065a99732b85f30c99da7f31)

A dashboard with event markers, so cost changes carry their explanation

## Two ways to use events

### Save an analysis instead of redoing it

When an investigation ends with a clear cause, [create a saved event](https://docs.costory.io/features/events.md#create-a-saved-event-with-context) with your conclusion and add it to the relevant dashboard or [Explorer](https://docs.costory.io/features/cost-explorer.md) view. Anyone who looks at the chart later sees the marker and the cause together, and the question stops coming back to you.

### Record a change before costs move

When you ship something that will affect spend (a new batch job, an instance migration, a commitment purchase), push an event from your pipeline at deploy time. It is a single `POST /v1/events` call. When the cost line moves a few days later, the context is already on the timeline, and Costory's AI analysis and agents connected through the [Costory MCP](https://docs.costory.io/features/mcp.md) use it to explain the change rather than guessing at causes.

## Connect an event source

> [card] [GitHub deploys](https://docs.costory.io/setup/events/github.md)
>
> PR merges and releases appear as deploy markers, with a link back to the PR.

> [card] [CI/CD pipelines](https://docs.costory.io/setup/events/ci-cd.md)
>
> Post an event from your deploy step with a single API call.

> [card] [Custom API events](https://docs.costory.io/setup/events/custom-api.md)
>
> Send incidents, migrations, campaigns, or anything else that explains spend.

> [card] [Provider events](https://docs.costory.io/setup/events/provider.md)
>
> Commitment purchases detected automatically from billing data.

Provider events, such as Savings Plan (AWS's flexible commitment-based pricing. You commit to a consistent amount of compute usage for 1 or 3 years and get discounted rates.) purchases, need no setup beyond connecting your billing data. AWS is live today, with Azure and GCP on the roadmap.

Once a source is connected, events show up on the [Events page](https://docs.costory.io/features/events.md) and as overlays in [Explorer](https://docs.costory.io/features/cost-explorer.md). See the [Events feature page](https://docs.costory.io/features/events.md) for how to attach them to dashboards and reports.


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