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
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
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", "markup_bps": 3000 }'{ "id": "tier_01J9ZK2K4Q7Q3M3QX1V0TIER1", "name": "Retail", "markup_bps": 3000, "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
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
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", "kind": "other", "status": "open", "subject": "Requests timing out", "body": { "text": "Since this morning some requests time out." }, "created_by": "[email protected]", "created_at": "2026-10-02T08:00: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}