# Which Customers Keep Hitting Our Rate Limits? An SMS API Company's Weekly List From Axiom

An SMS API company's agent reads last week's gateway logs in Axiom and lists the accounts that kept getting 429s, by route and day, for customer success to call.

[Run this on Rush](https://cloud.getrush.ai/run/find-customers-hitting-rate-limits/axiom/). Opens the console with this prompt ready to send. Connect Axiom there first.

## What the agent does

This is for a company that sells an SMS and voice API by plan, where each plan allows a set number of requests per second. A customer who keeps getting `429 Too Many Requests` is either growing past their plan or retrying badly, and in both cases they tend to find out before the company does: messages go out late, their own users complain, and the first the company hears is a cancellation or an angry ticket. The customer-success lead wants a list every Monday of the accounts that were throttled last week, so the team calls them first. The API gateway already writes one event per request into an Axiom dataset, here called `api-requests`, with `account_id`, `plan`, `route`, `status` and `_time`.

The run names one connection, `axiom`, which a member of the customer-success team signed in to through Axiom's own OAuth page. Axiom's MCP server acts as that user, so the agent sees the datasets that person can see and nothing more, and because it acts as a user, Axiom lets an admin cap the hourly and daily query cost on that person's role. The agent starts with `listDatasets` and `getDatasetFields` on `api-requests` to check that the fields the prompt names exist with those names, and stops with a note if one is missing instead of guessing at another column.

Then it runs APL through `queryDataset`. For the seven days it counts every request and every `status == 429` per `account_id` and `plan`, which gives each account's throttled share as well as the raw count. It counts 429s per account and `route`, so the list says whether an account is throttled on sending messages or on polling delivery status, and per account and day, so a single bad afternoon reads differently from a week of steady throttling. It runs the per-account counts again for the week before, to show whether an account is new to the list or was there last week too.

An account is flagged when it had 500 or more 429 responses, or when 429s were 2% or more of its requests; the team changes those numbers in the prompt. The agent writes `rate-limits.md`, one short section per flagged account with its plan, requests, 429s, share, the three routes with the most 429s, the days it was throttled and the change from the week before, and `rate-limits.csv` with the same columns for the CRM. It reads only: Axiom's server also has tools that create and delete monitors, dashboards and notifiers, and the prompt forbids every one of them.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Find the accounts that hit our API rate limits last week. Use the axiom connection, dataset api-requests, fields account_id, plan, route, status, _time. 1) Call getDatasetFields on api-requests and confirm those fields exist; if one does not, stop and say which. 2) With queryDataset, for 2026-11-09T00:00:00Z to 2026-11-16T00:00:00Z: count all requests and requests with status == 429 per account_id and plan; count 429s per account_id and route; count 429s per account_id per day. 3) Run the per-account counts again for 2026-11-02T00:00:00Z to 2026-11-09T00:00:00Z. 4) Flag an account when it had 500 or more 429s, or 429s were 2% or more of its requests. Write rate-limits.md with one section per flagged account (plan, requests, 429s, share, top three routes by 429s, days with 429s, change from the week before), largest share first, and rate-limits.csv with the same columns. Use read tools only. Do not call createMonitor, updateMonitor, createDashboard, createNotifier, createDataset, deleteDatasetFields, sendFeedback or any tool that creates, changes or deletes anything.",
  "connections": [
    "axiom"
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

`rate-limits.md` and `rate-limits.csv` list the accounts most throttled this week, with routes and days, marking any on last week's list. The session returns both as artifacts. The Markdown is what the customer-success lead reads on Monday, with the accounts most throttled by share at the top. The CSV goes into the CRM so each account owner sees the flag on the account they already work.

What the team checks before calling: whether the account is on a plan that is meant to burst and is throttled by design; whether the pattern looks like growth (throttling that rises through the week on the send route) or like a client retrying in a tight loop (thousands of 429s in one hour on one route), because the first is an upgrade conversation and the second is a support one; and whether someone already talked to them. The list says who to look at. It does not decide what to offer them.

## Run it on every Monday morning

The lead saves the agent once with `POST /o/{org}/agents`, naming the `axiom` connection and the prompt above with "the seven days before today" and "the seven days before that" in place of the dates, and adds a console automation on it with a `schedule` trigger, `cron` `0 7 * * 1` and the team's `timezone`. A schedule fills nothing into the prompt, so the saved instructions carry everything the run needs.

Before a pricing change, the lead can start the same agent by hand with a 30-day window in `input` to see which accounts the new limits would have throttled, without touching the weekly automation.

## Why run it on Rush?

Gateway logs for an SMS API can hold phone numbers and message routes for every customer, so the Axiom sign-in should not sit in a script on one person's laptop. On Rush it stays in the connection, the run acts as the one user who signed in, and Axiom's per-role query cost limit still applies, so a run that writes a wide query cannot spend past what the team allowed.

Each Monday's run has its own computer and a record of every APL query it ran and what its model calls cost. When a customer asks why they were called about an upgrade, the account owner can open that week's run and show the counts and the query behind them, rather than a number someone copied into a spreadsheet.

## Frequently asked questions

### Why flag by share as well as by count?

A large customer can get 500 429s in a week and barely notice, while a small one with 300 requests a day and 30 throttled is failing one request in ten. The share catches the second; the count keeps the first visible. Both thresholds are in the prompt and can be changed.

### Our fields are named differently. Does that matter?

Change the names in the prompt. The agent checks them with `getDatasetFields` before it queries and stops if one is missing, so a renamed field shows up as a clear note rather than an empty report.

### Can the agent change our monitors or dashboards?

Axiom's server has write tools for monitors, dashboards, notifiers and datasets. The prompt forbids them, and the run's record lists every tool call, so a call that should not have happened is visible. Axiom's role settings limit what the signed-in user can do as well.

### Our Axiom org is in the EU. Does this work?

Axiom runs its EU server at `https://mcp.eu.axiom.co/mcp`. Connect it with `POST /me/connections {"type": "mcp", "name": "axiom-eu", "url": "https://mcp.eu.axiom.co/mcp"}`, sign in once, and name `axiom-eu` in `connections` instead.

## More Axiom jobs

- [How Do I Find Which Customers' Webhook Endpoints Keep Failing? A Weekly Report From Axiom for a SaaS Customer-Success Team](https://getrush.ai/run/find-customers-whose-webhooks-keep-failing/axiom/)
- [Which Lesson Videos Keep Failing to Play? An Online Course Platform's Weekly Playback Report From Axiom](https://getrush.ai/run/find-lessons-whose-videos-fail-to-play/axiom/)
- [Which Loads Have Gone Quiet? A Freight Broker's Hourly Tracking Check in Axiom](https://getrush.ai/run/find-loads-with-stale-tracking/axiom/)

## More jobs like this: Produce a report or file, no repo

- [Find Dead Code in an Angular App](https://getrush.ai/run/find-dead-code/angular/)
- [Find Dead Code in a Next.js Project](https://getrush.ai/run/find-dead-code/nextjs/)
- [Find Dead Code in a Python Library](https://getrush.ai/run/find-dead-code/python/)

## Keep reading

- [Connect Axiom to Rush once, then name it on any run](https://getrush.ai/integrations/axiom/)
- [Start your first run from the developer API quickstart](https://getrush.ai/docs/quickstart/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
