Reseller
reseller sub-orgs, credit allocation and client-billable usage (session only)
curl -X GET "https://example.com/v1/storefront?host=string"{ "display_name": "Acme AI", "logo_url": "https://cdn.acme.example/logo.svg", "primary_color": "#2563eb", "support_email": "[email protected]", "support_url": "https://acme.example/help", "terms_url": "https://acme.example/terms", "registration": "open", "display_currency": "EUR", "locale": "de"}Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/invoicing"{ "reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESELL", "legal_name": "Acme Intelligence Private Limited", "address": [ "12 MG Road", "Bengaluru 560001", "Karnataka, India" ], "state_code": "29", "state_name": "Karnataka", "gstin": "29AAACA1234A1Z5", "pan": "AAACA1234A", "lut": "", "sac": "998315", "email": "[email protected]", "website": "https://acme.example", "series": "ACME", "enabled": true}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
a reseller's invoicing identity, as GST Rule 46 puts it on a tax invoice, and its own number series (PFX/26-27/00001, at most sixteen characters)
Response Body
application/json
application/json
curl -X PUT "https://example.com/v1/reseller/invoicing" \ -H "Content-Type: application/json" \ -d '{ "reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESELL", "legal_name": "Acme Intelligence Private Limited", "address": [ "12 MG Road", "Bengaluru 560001", "Karnataka, India" ], "state_code": "29", "state_name": "Karnataka", "gstin": "29AAACA1234A1Z5", "pan": "AAACA1234A", "lut": "", "sac": "998315", "email": "[email protected]", "website": "https://acme.example", "series": "ACME", "enabled": true }'{ "reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESELL", "legal_name": "Acme Intelligence Private Limited", "address": [ "12 MG Road", "Bengaluru 560001", "Karnataka, India" ], "state_code": "29", "state_name": "Karnataka", "gstin": "29AAACA1234A1Z5", "pan": "AAACA1234A", "lut": "", "sac": "998315", "email": "[email protected]", "website": "https://acme.example", "series": "ACME", "enabled": true}Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/collect"{ "object": "reseller_collect", "enabled": true, "fee_bps": 0, "gateways": [ { "gateway": "stripe", "currency": "GBP", "hint": "sk_live_…4242", "live": true, "validated_at": "2026-11-18T10:00:00Z", "updated_at": "2026-11-18T10:00:00Z", "webhook_url": "https://api.ai.ml/webhooks/reseller/org_01J9ZK2K4Q7Q3M3QX1V0RESELL/stripe" } ], "problems": [], "awaiting_count": 1, "awaiting_micro": 12500000, "webhook_urls": { "stripe": "https://api.ai.ml/webhooks/reseller/org_01J9ZK2K4Q7Q3M3QX1V0RESELL/stripe", "razorpay": "https://api.ai.ml/webhooks/reseller/org_01J9ZK2K4Q7Q3M3QX1V0RESELL/razorpay" }}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/v1/reseller/collect" \ -H "Content-Type: application/json" \ -d '{ "enabled": true, "fee_bps": 0 }'{ "object": "reseller_collect", "enabled": true, "fee_bps": 0, "gateways": [ { "gateway": "stripe", "currency": "GBP", "hint": "sk_live_…4242", "live": true, "validated_at": "2026-11-18T10:00:00Z", "updated_at": "2026-11-18T10:00:00Z", "webhook_url": "https://api.ai.ml/webhooks/reseller/org_01J9ZK2K4Q7Q3M3QX1V0RESELL/stripe" } ], "problems": [], "awaiting_count": 1, "awaiting_micro": 12500000, "webhook_urls": { "stripe": "https://api.ai.ml/webhooks/reseller/org_01J9ZK2K4Q7Q3M3QX1V0RESELL/stripe", "razorpay": "https://api.ai.ml/webhooks/reseller/org_01J9ZK2K4Q7Q3M3QX1V0RESELL/razorpay" }}Authorization
bearer In: header
Path Parameters
Value in
- "stripe"
- "razorpay"
Response Body
application/json
application/json
curl -X DELETE "https://example.com/v1/reseller/collect/gateways/stripe"{ "gateway": "stripe", "deleted": true}Authorization
bearer In: header
Path Parameters
Value in
- "stripe"
- "razorpay"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/v1/reseller/collect/gateways/stripe" \ -H "Content-Type: application/json" \ -d '{ "secret_key": "sk_test_your_key", "webhook_secret": "whsec_your_signing_secret", "currency": "GBP" }'{ "gateway": "stripe", "currency": "GBP", "hint": "sk_live_…4242", "live": true, "validated_at": "2026-11-18T10:00:00Z", "updated_at": "2026-11-18T10:00:00Z", "webhook_url": "https://api.ai.ml/webhooks/reseller/org_01J9ZK2K4Q7Q3M3QX1V0RESELL/stripe"}Authorization
bearer In: header
Path Parameters
Value in
- "stripe"
- "razorpay"
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/collect/gateways/stripe/test"{ "gateway": "stripe", "currency": "GBP", "hint": "sk_live_…4242", "live": true, "validated_at": "2026-11-18T10:00:00Z", "updated_at": "2026-11-18T10:00:00Z", "webhook_url": "https://api.ai.ml/webhooks/reseller/org_01J9ZK2K4Q7Q3M3QX1V0RESELL/stripe"}Authorization
bearer In: header
Query Parameters
Value in
- "pending"
- "awaiting_funds"
- "booked"
- "failed"
value <= 200Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/collect/payments"{ "object": "list", "data": [ { "id": "rcp_01J9ZK2K4Q7Q3M3QX1V0PAYMNT", "reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESELL", "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0CUSTMR", "org_name": "Client A", "gateway": "stripe", "gateway_ref": "cs_live_a1b2c3", "payment_ref": "pi_3Pz9a1b2c3", "currency": "GBP", "credits_minor": 10000, "fee_minor": 0, "taxable_minor": 10000, "tax_minor": 2000, "total_minor": 12000, "credits_micro": 125000000, "fx_rate": "0.8000", "status": "booked", "invoice_id": "inv_01J9ZK2K4Q7Q3M3QX1V0INVCE1", "created_at": "2026-11-18T10:00:00Z", "paid_at": "2026-11-18T10:02:00Z" } ], "next_cursor": ""}Authorization
bearer In: header
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/invoices"{ "object": "list", "data": [ { "id": "inv_01J9ZK2K4Q7Q3M3QX1V0RINV01", "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0CHILD1", "number": "ACME/26-27/00001", "fy": "26-27", "kind": "tax_invoice", "currency": "INR", "place_of_supply": "29", "supplier_gstin": "29AAACA1234A1Z5", "recipient": { "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0CHILD1", "name": "Client Delta", "country": "IN", "state_code": "29" }, "lines": [ { "description": "Prepaid API credits", "kind": "credits", "sac": "998315", "quantity": 1, "unit_minor": 84000, "amount_minor": 84000 } ], "taxable_minor": 84000, "cgst_minor": 7560, "sgst_minor": 7560, "igst_minor": 0, "total_minor": 99120, "hsn_sac": "998315", "issued_at": "2026-10-02T00:00:00Z", "irn_status": "none", "supplier_reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESELL" } ], "next_cursor": ""}Authorization
bearer In: header
Path Parameters
Response Body
application/pdf
application/json
curl -X GET "https://example.com/v1/reseller/invoices/string/pdf""string"Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/storefront/mail"{ "status": "pending", "domain": "mail.acme.example", "from": "[email protected]", "dkim": { "type": "TXT", "host": "20261002pm._domainkey.mail.acme.example", "value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC", "verified": false }, "return_path": { "type": "CNAME", "host": "pm-bounces.mail.acme.example", "value": "pm.mtasv.net", "verified": false }, "checked_at": "2026-10-02T00:00:00Z"}curl -X DELETE "https://example.com/v1/reseller/storefront/mail"Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/v1/reseller/storefront/mail" \ -H "Content-Type: application/json" \ -d '{ "domain": "mail.acme.example", "from_local": "noreply" }'{ "status": "pending", "domain": "mail.acme.example", "from": "[email protected]", "dkim": { "type": "TXT", "host": "20261002pm._domainkey.mail.acme.example", "value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC", "verified": false }, "return_path": { "type": "CNAME", "host": "pm-bounces.mail.acme.example", "value": "pm.mtasv.net", "verified": false }, "checked_at": "2026-10-02T00:00:00Z"}Authorization
bearer In: header
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/storefront/mail/verify"{ "status": "pending", "domain": "mail.acme.example", "from": "[email protected]", "dkim": { "type": "TXT", "host": "20261002pm._domainkey.mail.acme.example", "value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC", "verified": false }, "return_path": { "type": "CNAME", "host": "pm-bounces.mail.acme.example", "value": "pm.mtasv.net", "verified": false }, "checked_at": "2026-10-02T00:00:00Z"}Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/storefront"{ "reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESELL", "display_name": "Acme AI", "logo_url": "https://cdn.acme.example/logo.svg", "primary_color": "#2563eb", "support_email": "[email protected]", "support_url": "", "terms_url": "", "registration": "invite", "default_tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "display_currency": "EUR", "locale": "de", "updated_at": "2026-10-02T00:00:00Z"}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/v1/reseller/storefront" \ -H "Content-Type: application/json" \ -d '{ "display_name": "Acme AI", "logo_url": "https://cdn.acme.example/logo.svg", "primary_color": "#2563eb", "support_email": "[email protected]", "registration": "invite", "default_tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "display_currency": "EUR", "locale": "de" }'{ "reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESELL", "display_name": "Acme AI", "logo_url": "https://cdn.acme.example/logo.svg", "primary_color": "#2563eb", "support_email": "[email protected]", "support_url": "", "terms_url": "", "registration": "invite", "default_tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "display_currency": "EUR", "locale": "de", "updated_at": "2026-10-02T00:00:00Z"}Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/storefront/domains"{ "object": "list", "data": [ { "domain": "ai.acme.example", "token": "aiml-storefront-0f1e2d3c4b5a69788796a5b4c3d2e1f0", "record": "_aiml-storefront.ai.acme.example", "verified_at": "2026-10-02T00:00:00Z", "created_at": "2026-10-01T00:00:00Z" } ]}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/storefront/domains" \ -H "Content-Type: application/json" \ -d '{ "domain": "ai.acme.example" }'{ "domain": "ai.acme.example", "token": "aiml-storefront-0f1e2d3c4b5a69788796a5b4c3d2e1f0", "record": "_aiml-storefront.ai.acme.example", "created_at": "2026-10-01T00:00:00Z"}Authorization
bearer In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/storefront/domains/string/verify"{ "domain": "ai.acme.example", "token": "aiml-storefront-0f1e2d3c4b5a69788796a5b4c3d2e1f0", "record": "_aiml-storefront.ai.acme.example", "verified_at": "2026-10-02T00:00:00Z", "created_at": "2026-10-01T00:00:00Z"}Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/storefront/domains/string/connect" \ -H "Content-Type: application/json" \ -d '{ "return_to": "https://console.ai.ml" }'{ "url": "https://dash.cloudflare.com/domainconnect/v2/domainTemplates/providers/ai.ml/services/storefront/apply?domain=example.com&host=ai&token=7f3a&redirect_uri=https%3A%2F%2Fapi.ai.ml%2Fv1%2Fdomain-connect%2Freturn&state=eyJk&sig=AbC&key=_dcpubkeyv1", "provider": "Cloudflare"}Authorization
bearer In: header
Query Parameters
Response Body
curl -X GET "https://example.com/v1/domain-connect/return?state=string"Authorization
bearer In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/v1/reseller/storefront/domains/string"Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/tiers"{ "object": "list", "data": [ { "id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "name": "Retail", "markup_bps": 2500, "customers": 12, "created_at": "2026-10-01T00:00:00Z" } ]}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/tiers" \ -H "Content-Type: application/json" \ -d '{ "name": "Retail", "markup_bps": 2500 }'{ "id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "name": "Retail", "markup_bps": 2500, "customers": 0, "created_at": "2026-10-01T00:00:00Z"}Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/v1/reseller/tiers/string" \ -H "Content-Type: application/json" \ -d '{ "name": "Retail plus" }'{ "id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "name": "Retail plus", "markup_bps": 2500, "customers": 12, "created_at": "2026-10-01T00:00:00Z"}Authorization
bearer In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/v1/reseller/tiers/string"Authorization
bearer In: header
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/price-books"{ "object": "list", "data": [ { "id": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK1", "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "tier_name": "Retail", "version": 2, "kind": "schedule", "status": "approved", "state": "scheduled", "currency": "USD", "markup_bps": 3000, "models": [], "effective_from": "2026-11-01T00:00:00Z", "note": "November prices", "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-10-20T09:00:00Z" } ]}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/price-books" \ -H "Content-Type: application/json" \ -d '{ "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1" }'{ "id": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK2", "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "tier_name": "Retail", "version": 3, "kind": "schedule", "status": "draft", "state": "draft", "currency": "USD", "markup_bps": 3000, "models": [], "note": "", "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-10-20T09:00:00Z"}Authorization
bearer In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/price-books/string"{ "id": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK1", "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "tier_name": "Retail", "version": 2, "kind": "schedule", "status": "approved", "state": "in_force", "currency": "USD", "markup_bps": 3000, "models": [ { "model_id": "openai/gpt-5-mini", "markup_bps": 4000 } ], "effective_from": "2026-10-01T00:00:00Z", "note": "", "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-09-28T09:00:00Z"}Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/v1/reseller/price-books/string" \ -H "Content-Type: application/json" \ -d '{ "markup_bps": 3500, "models": [ { "model_id": "openai/gpt-5-mini", "markup_bps": 4000 } ] }'{ "id": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK2", "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "tier_name": "Retail", "version": 3, "kind": "schedule", "status": "draft", "state": "draft", "currency": "USD", "markup_bps": 3500, "models": [ { "model_id": "openai/gpt-5-mini", "markup_bps": 4000 } ], "note": "", "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-10-20T09:00:00Z"}Authorization
bearer In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/price-books/string/submit"{ "id": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK2", "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "tier_name": "Retail", "version": 3, "kind": "schedule", "status": "pending", "state": "pending", "currency": "USD", "markup_bps": 3500, "models": [], "note": "November prices", "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-10-20T09:00:00Z"}Authorization
bearer In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/price-books/string/withdraw"{ "id": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK2", "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "tier_name": "Retail", "version": 3, "kind": "schedule", "status": "draft", "state": "draft", "currency": "USD", "markup_bps": 3500, "models": [], "note": "November prices", "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-10-20T09:00:00Z"}Authorization
bearer In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/price-books/string/cancel"{ "id": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK2", "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "tier_name": "Retail", "version": 3, "kind": "schedule", "status": "cancelled", "state": "cancelled", "currency": "USD", "markup_bps": 3500, "models": [], "note": "November prices", "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-10-20T09:00:00Z"}Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/price-books/string/approve" \ -H "Content-Type: application/json" \ -d '{ "effective_from": "2026-11-01T00:00:00Z", "note": "November prices" }'{ "id": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK2", "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "tier_name": "Retail", "version": 3, "kind": "schedule", "status": "approved", "state": "scheduled", "currency": "USD", "markup_bps": 3500, "models": [], "note": "November prices", "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-10-20T09:00:00Z"}Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/price-books/string/reject" \ -H "Content-Type: application/json" \ -d '{ "note": "keep the old markup on the large models" }'{ "id": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK2", "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "tier_name": "Retail", "version": 3, "kind": "schedule", "status": "rejected", "state": "rejected", "currency": "USD", "markup_bps": 3500, "models": [], "note": "November prices", "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-10-20T09:00:00Z"}Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/rating-runs"{ "object": "list", "data": [ { "id": "rr_01J9ZK2K4Q7Q3M3QX1V0RUN01", "seq": 4, "kind": "correction", "reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESL1", "target": "price_book:pb_01J9ZK2K4Q7Q3M3QX1V0BOOK1", "replacement": { "book": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK3" }, "window_from": "2026-10-01T00:00:00Z", "window_to": "2026-10-15T00:00:00Z", "reason": "The October markup on mini models was entered as 40% instead of 20%", "status": "applied", "requests": 18420, "mismatches": 0, "before_micro": 9230000, "after_micro": 8100000, "credit_micro": 1130000, "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-10-15T10:00:00Z" } ]}Authorization
bearer In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/rating-runs/string"{ "run": { "id": "rr_01J9ZK2K4Q7Q3M3QX1V0RUN01", "seq": 4, "kind": "correction", "target": "price_book:pb_01J9ZK2K4Q7Q3M3QX1V0BOOK1", "replacement": { "book": "pb_01J9ZK2K4Q7Q3M3QX1V0BOOK3" }, "window_from": "2026-10-01T00:00:00Z", "window_to": "2026-10-15T00:00:00Z", "reason": "The October markup on mini models was entered as 40% instead of 20%", "status": "applied", "requests": 18420, "mismatches": 0, "before_micro": 9230000, "after_micro": 8100000, "credit_micro": 1130000, "created_by": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "created_at": "2026-10-15T10:00:00Z" }, "deltas": [ { "run_id": "rr_01J9ZK2K4Q7Q3M3QX1V0RUN01", "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0CUST1", "requests": 18420, "before_micro": 9230000, "after_micro": 8100000, "credit_micro": 1130000, "reseller_debit_micro": 1130000, "reseller_margin_micro": 0, "applied_at": "2026-10-15T10:16:00Z" } ]}Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/settlement"{ "tier": { "id": "gold", "name": "Gold", "discount_bps": 1000 }, "features": { "white_label": true, "own_billing": true, "priority_support": true }, "earnings": { "earned_micro": 420000000, "withdrawn_micro": 100000000, "withdrawable_micro": 320000000 }, "min_payout_micro": 50000000, "security": { "reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1RSL1", "requirement": "deposit", "required_micro": 1000000000, "held_micro": 1000000000, "guarantee_amount_micro": 0, "met": true }, "payouts": []}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/payouts" \ -H "Content-Type: application/json" \ -d '{ "amount_micro": 100000000 }'{ "id": "wd_01J9ZK2K4Q7Q3M3QX1V0F1WD01", "amount_micro": 100000000, "status": "requested", "requested_at": "2026-10-20T10:00:00Z"}Authorization
bearer In: header
Query Parameters
^\d{4}-\d{2}$date-timedate-time"json"Value in
- "json"
- "csv"
- "pdf"
Response Body
application/json
curl -X GET "https://example.com/v1/reseller/statement"{ "object": "partner_statement", "reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1RSL1", "name": "Example Partner", "from": "2026-09-01T00:00:00Z", "to": "2026-10-01T00:00:00Z", "generated_at": "2026-10-02T08:00:00Z", "balance": { "opening_micro": 0, "closing_micro": 320000000, "paid_micro": 0, "usage_micro": 0, "payments": [], "other": [], "adjustments": [] }, "settlement": { "margin_credited_micro": 420000000, "payouts_requested_micro": 100000000, "payouts_paid_micro": 0, "earned_micro": 420000000, "withdrawn_micro": 100000000, "withdrawable_micro": 320000000 }, "security": { "reseller_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1RSL1", "requirement": "none", "required_micro": 0, "held_micro": 0, "guarantee_amount_micro": 0, "met": true }, "analytics": true, "customers": [], "total": { "requests": 0, "customer_micro": 0, "list_micro": 0, "markup_micro": 0, "margin_micro": 0 }, "payouts": []}Authorization
bearer In: header
Query Parameters
^\d{4}-\d{2}$date-timedate-time"org_id"Value in
- "org_id"
- "model"
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/margins"{ "object": "list", "from": "2026-10-01T00:00:00Z", "to": "2026-10-20T12:00:00Z", "group_by": "org_id", "total": { "key": {}, "requests": 18420, "customer_micro": 8100000, "list_micro": 6750000, "markup_micro": 1350000, "margin_micro": 2025000 }, "data": [ { "key": { "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0CUST1" }, "requests": 18420, "customer_micro": 8100000, "list_micro": 6750000, "markup_micro": 1350000, "margin_micro": 2025000 } ]}Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/v1/reseller/children/string/tier" \ -H "Content-Type: application/json" \ -d '{ "tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1" }'{ "id": "org_01J9ZK2K4Q7Q3M3QX1V0CHILD", "slug": "acme-customer", "name": "Acme Customer", "kind": "team", "billing_country": "DE", "billing_currency": "EUR", "status": "active", "parent_org_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESELL", "reseller_tier_id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "created_at": "2026-10-01T00:00:00Z"}Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/staff"{ "object": "list", "grantable": [ "reseller.read", "reseller.write", "storefront.write", "reseller.campaigns", "reseller.support" ], "data": [ { "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESELL", "user_id": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "role": "member", "email": "[email protected]", "name": "Support Agent", "grants": [ "reseller.read", "reseller.support" ] } ]}Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/v1/reseller/staff/string" \ -H "Content-Type: application/json" \ -d '{ "grants": [ "reseller.read", "reseller.support" ] }'{ "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESELL", "user_id": "usr_01J9ZK2K4Q7Q3M3QX1V0USER1", "role": "member", "email": "[email protected]", "name": "Support Agent", "grants": [ "reseller.read", "reseller.support" ]}Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/announcements"{ "object": "list", "data": [ { "id": "ann_01J9ZK2K4Q7Q3M3QX1V0F1ANN1", "title": "Maintenance on Saturday", "body": "Requests may be slower between 02:00 and 03:00 UTC.", "severity": "info", "starts_at": "2026-10-02T00:00:00Z", "created_by": "[email protected]", "created_at": "2026-10-01T00:00:00Z" } ]}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/announcements" \ -H "Content-Type: application/json" \ -d '{ "title": "Maintenance on Saturday", "body": "Requests may be slower between 02:00 and 03:00 UTC.", "severity": "info", "ends_at": "2026-10-05T00:00:00Z" }'{ "id": "ann_01J9ZK2K4Q7Q3M3QX1V0F1ANN1", "title": "Maintenance on Saturday", "body": "Requests may be slower between 02:00 and 03:00 UTC.", "severity": "info", "starts_at": "2026-10-02T00:00:00Z", "ends_at": "2026-10-05T00:00:00Z", "created_by": "[email protected]", "created_at": "2026-10-02T00:00:00Z"}Authorization
bearer In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/v1/reseller/announcements/string"Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/invites"{ "object": "list", "data": [ { "id": "inv_01J9ZK2K4Q7Q3M3QX1V0INV001", "hint": "AIML-…7K2Q", "note": "launch partners", "max_uses": 10, "uses": 3, "created_at": "2026-10-01T00:00:00Z" } ]}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/invites" \ -H "Content-Type: application/json" \ -d '{ "note": "launch partners", "max_uses": 10, "expires_days": 30 }'{ "id": "inv_01J9ZK2K4Q7Q3M3QX1V0INV001", "code": "AIML-4KQ2-7ZP1-M8XD-3RT6-7K2Q", "hint": "AIML-…7K2Q", "note": "launch partners", "max_uses": 10, "uses": 0, "expires_at": "2026-11-01T00:00:00Z", "created_at": "2026-10-02T00:00:00Z"}Authorization
bearer In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/v1/reseller/invites/string/revoke"Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/campaigns"{ "object": "list", "data": [ { "id": "cmp_01J9ZK2K4Q7Q3M3QX1V0CMP001", "name": "Launch week", "codes": 100, "amount_micro_usd": 5000000, "redeemed": 41, "open": 59, "expires_at": "2026-12-31T00:00:00Z", "created_at": "2026-10-01T00:00:00Z" } ]}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/campaigns" \ -H "Content-Type: application/json" \ -d '{ "name": "Launch week", "codes": 100, "amount_micro_usd": 5000000, "expires_days": 90 }'{ "id": "cmp_01J9ZK2K4Q7Q3M3QX1V0CMP001", "name": "Launch week", "codes": 2, "amount_micro_usd": 5000000, "redeemed": 0, "open": 2, "expires_at": "2026-12-31T00:00:00Z", "created_at": "2026-10-01T00:00:00Z", "code_list": [ "AIML-4KQ2-7ZP1-M8XD-3RT6-7K2Q", "AIML-9PLM-2QWE-8RTY-5UIO-1ASD" ]}Authorization
bearer In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/campaigns/string/cancel"{ "id": "cmp_01J9ZK2K4Q7Q3M3QX1V0CMP001", "returned_micro_usd": 295000000}Authorization
bearer In: header
Query Parameters
all (the default), active (open or waiting on either side), or one status
Value in
- "all"
- "active"
- "open"
- "waiting_on_support"
- "waiting_on_customer"
- "resolved"
- "closed"
1 <= value <= 200Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/tickets"{ "object": "list", "data": [ { "id": "tkt_01J9ZK2K4Q7Q3M3QX1V0F1TKT1", "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0CHILD", "org_name": "Bob's shop", "kind": "other", "status": "open", "priority": "normal", "category": "technical", "subject": "Requests timing out", "body": { "text": "Since this morning some requests time out." }, "created_by": "[email protected]", "created_at": "2026-10-02T08:00:00Z", "last_activity_at": "2026-10-02T08:00:00Z" } ]}Authorization
bearer In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/tickets/string"{ "ticket": { "id": "tkt_01J9ZK2K4Q7Q3M3QX1V0F1TKT1", "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0CHILD", "kind": "other", "status": "waiting_on_customer", "priority": "normal", "category": "technical", "subject": "Requests timing out", "body": { "text": "Since this morning some requests time out." }, "created_by": "[email protected]", "created_at": "2026-10-02T08:00:00Z", "last_activity_at": "2026-10-02T09:15:00Z" }, "messages": [ { "id": "tmsg_01J9ZK2K4Q7Q3M3QX1V0F1MSG1", "author": "customer", "author_name": "Dev", "internal": false, "body": "Since this morning some requests time out.", "created_at": "2026-10-02T08:00:00Z" }, { "id": "tmsg_01J9ZK2K4Q7Q3M3QX1V0F1MSG2", "author": "support", "author_name": "Acme AI support", "internal": false, "body": "We see it too and are on it. Can you send a request id?", "created_at": "2026-10-02T09:15:00Z" } ]}Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/v1/reseller/tickets/string" \ -H "Content-Type: application/json" \ -d '{ "status": "resolved" }'{ "ticket": { "id": "tkt_01J9ZK2K4Q7Q3M3QX1V0F1TKT1", "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0CHILD", "kind": "other", "status": "waiting_on_customer", "priority": "normal", "category": "technical", "subject": "Requests timing out", "body": { "text": "Since this morning some requests time out." }, "created_by": "[email protected]", "created_at": "2026-10-02T08:00:00Z", "last_activity_at": "2026-10-02T09:15:00Z" }, "messages": [ { "id": "tmsg_01J9ZK2K4Q7Q3M3QX1V0F1MSG1", "author": "customer", "author_name": "Dev", "internal": false, "body": "Since this morning some requests time out.", "created_at": "2026-10-02T08:00:00Z" }, { "id": "tmsg_01J9ZK2K4Q7Q3M3QX1V0F1MSG2", "author": "support", "author_name": "Acme AI support", "internal": false, "body": "We see it too and are on it. Can you send a request id?", "created_at": "2026-10-02T09:15:00Z" } ]}Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/tickets/string/messages" \ -H "Content-Type: application/json" \ -d '{ "body": "We see it too and are on it. Can you send a request id?" }'{ "ticket": { "id": "tkt_01J9ZK2K4Q7Q3M3QX1V0F1TKT1", "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0CHILD", "kind": "other", "status": "waiting_on_customer", "priority": "normal", "category": "technical", "subject": "Requests timing out", "body": { "text": "Since this morning some requests time out." }, "created_by": "[email protected]", "created_at": "2026-10-02T08:00:00Z", "last_activity_at": "2026-10-02T09:15:00Z" }, "messages": [ { "id": "tmsg_01J9ZK2K4Q7Q3M3QX1V0F1MSG1", "author": "customer", "author_name": "Dev", "internal": false, "body": "Since this morning some requests time out.", "created_at": "2026-10-02T08:00:00Z" }, { "id": "tmsg_01J9ZK2K4Q7Q3M3QX1V0F1MSG2", "author": "support", "author_name": "Acme AI support", "internal": false, "body": "We see it too and are on it. Can you send a request id?", "created_at": "2026-10-02T09:15:00Z" } ]}Authorization
bearer In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/children"{ "object": "list", "data": []}Authorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/children" \ -H "Content-Type: application/json" \ -d '{ "slug": "client-acme", "name": "Acme", "billing_shared": true }'{ "id": "org_01J9ZK2K4Q7Q3M3QX1V0CHILD", "slug": "client-acme", "name": "Acme", "kind": "team", "billing_country": "IN", "billing_currency": "INR", "tax_status": "unregistered", "plan_id": "payg", "data_policy": {}, "home_cell": "use1", "status": "active", "created_at": "2026-09-14T12:00:00Z", "settings": {}, "reseller_margin_bps": 0, "billing_shared": true, "parent_org_id": "org_01J9ZK2K4Q7Q3M3QX1V0RESLR", "role": "owner"}Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/reseller/children/string/allocate" \ -H "Content-Type: application/json" \ -d '{ "amount_micro": 5000000 }'{ "object": "allocation", "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0CHILD", "available_micro": 5000000, "held_micro": 0}Authorization
bearer In: header
Query Parameters
Value in
- "24h"
- "7d"
- "30d"
- "90d"
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/reseller/usage"{ "object": "reseller_usage", "window": { "from": "2026-08-15T12:00:00Z", "to": "2026-09-14T12:00:00Z", "granularity": "range" }, "children": [], "margin_micro": 0}