Billing
List bills#
GET /api/organizations/{organization_id}/bills
Your MilkStraw AI bills, newest first.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organization_id | path | string (uuid) | The organization's ID, from the organizations list. Required. |
Response
bills(array of objects): The matching bills.id(string (uuid)): The bill's ID.created_at(string (date-time)): When the bill was issued.savings_amount(number): The savings the bill charges a fee on, in USD.fee_amount(number): MilkStraw AI's fee, in USD.status(string): Where the bill is in payment. One ofpending_admin_review,admin_approved,processed,failed,action_required.receipt_url(string or null): The Stripe receipt, once there's one.invoice_available(boolean): Whether the invoice PDF can be downloaded.
Errors: 401, 403, 404, 429. See errors.
curl https://app.milkstraw.ai/api/organizations/$ORGANIZATION_ID/bills \
-H "Authorization: Bearer $MILKSTRAW_API_KEY"{
"bills": [
{
"id": "2aadf788-af46-4156-b18a-9749e551af08",
"created_at": "2026-11-09T13:01:59.451Z",
"savings_amount": 1250,
"fee_amount": 250,
"status": "processed",
"receipt_url": "https://pay.stripe.com/receipts/example",
"invoice_available": true
}
]
}Get a bill#
GET /api/organizations/{organization_id}/bills/{bill_id}
One bill, with the commitments behind its savings.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organization_id | path | string (uuid) | The organization's ID, from the organizations list. Required. |
bill_id | path | string (uuid) | The bill's ID. Required. |
Response
bill(object): The bill.id(string (uuid)): The bill's ID.created_at(string (date-time)): When the bill was issued.savings_amount(number): The savings the bill charges a fee on, in USD.fee_amount(number): MilkStraw AI's fee, in USD.status(string): Where the bill is in payment. One ofpending_admin_review,admin_approved,processed,failed,action_required.receipt_url(string or null): The Stripe receipt, once there's one.invoice_available(boolean): Whether the invoice PDF can be downloaded.data(object): The commitments behind the savings, line by line.
Errors: 401, 403, 404, 429. See errors.
curl https://app.milkstraw.ai/api/organizations/$ORGANIZATION_ID/bills/$BILL_ID \
-H "Authorization: Bearer $MILKSTRAW_API_KEY"{
"bill": {
"id": "2aadf788-af46-4156-b18a-9749e551af08",
"created_at": "2026-11-09T13:01:59.451Z",
"savings_amount": 1250,
"fee_amount": 250,
"status": "processed",
"receipt_url": "https://pay.stripe.com/receipts/example",
"invoice_available": true,
"data": {
"reservations_utilization": [
{
"id": "ri-0f3c2a9b",
"type": "m6g.large",
"service": "ec2",
"count": 4,
"platform": "Linux/UNIX",
"region": "us-east-1",
"original_price": 4204.8,
"utilization_percentage": 98.6,
"actual_savings": 1640.2
}
],
"savings_plans_utilization": [
{
"id": "sp-7d1e4c22",
"service": "compute",
"original_price": 2100,
"utilization_percentage": 100,
"actual_savings": 610
}
]
}
}
}Download an invoice#
GET /api/organizations/{organization_id}/bills/{bill_id}/invoice
The bill's invoice as a PDF. A bill without an invoice yet returns 404.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organization_id | path | string (uuid) | The organization's ID, from the organizations list. Required. |
bill_id | path | string (uuid) | The bill's ID. Required. |
Response
The invoice, as application/pdf.
Errors: 401, 403, 404, 429. See errors.
curl https://app.milkstraw.ai/api/organizations/$ORGANIZATION_ID/bills/$BILL_ID/invoice \
-H "Authorization: Bearer $MILKSTRAW_API_KEY" \
-o invoice.pdf