---
title: "Get Agent Margin"
method: GET
path: "/api/agents/{agent_id}/pricing-plan/margin"
tags: ["agent-pricing-plan"]
---

# Get Agent Margin

`GET /api/agents/{agent_id}/pricing-plan/margin`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/agents/{agent_id}/pricing-plan/margin`
- Auth: none declared

Owner net-margin view for this agent over the trailing 30 days.

Mounted on the pricing-plan router because it answers a pricing question and
has exactly the same audience and authorization as the plan editor - an
active owner or a platform admin. It deliberately does NOT require a
published plan: an owner who just retired one still needs to see what the
period earned, and returning 404 there would read as "your revenue is gone".

## Path parameters

- `agent_id` string, uuid, required

## Headers

- `x-impersonate-identity-id` string, nullable

## Response `200`

Successful Response

- AgentMarginOut: The owner's actual revenue, cost and net for a monetized agent. Money is serialized as STRINGS, matching the buyer-facing offer payload (``AgentOffer.as_dict``) rather than the plan rows above: these are computed sums at the NUMERIC(12, 6) money quantum, and letting JSON turn them into floats is how a cents-level rounding error gets introduced between the ledger and the screen showing it.
  - `agent_identity_id` string, uuid, required
  - `window_days` integer, required
  - `window_start` string, date-time, required
  - `charge_count` integer, required
  - `revenue_usd` string, required
  - `creator_earnings_usd` string, required
  - `platform_share_usd` string, required
  - `rated_ai_cost_usd` string, required
  - `funded_ai_cost_usd` string, required
  - `net_usd` string, required
  - `creator_share_pct` string, required
  - `breakeven_multiplier` string, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/5387b4ded614?raw)
