Skip to main content
Languages: every operation supports cURL, Node.js (TypeScript), Python, Go, Ruby, and PHP. The first 15 operations on this page show all six languages; the remaining 29 show cURL and TypeScript — the two most-used.

Subaccounts API

Subaccounts endpoints exposed by the Devotel CPaaS API Base path: /api/v1/subaccounts Endpoint count: 44

List subaccounts

GET /api/v1/subaccounts
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get subaccounts

GET /api/v1/subaccounts/{id}
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get a subaccount’s AI configuration

GET /api/v1/subaccounts/{id}/ai-config
Read (GET) or set (PUT) the parent’s AI-configuration override for this child: an enable/disable override, a curated LLM provider pin, and a comped (free) marker. Settings-JSONB-backed (no migration). GET returns the resolved view (response schema aiConfigViewJsonSchema); PUT echoes the same resolved view back. Requires owner/admin on the parent organization.
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List api-keys

GET /api/v1/subaccounts/{id}/api-keys
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List branding

GET /api/v1/subaccounts/{id}/branding
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List channel-budgets

GET /api/v1/subaccounts/{id}/channel-budgets
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List domains

GET /api/v1/subaccounts/{id}/domains
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List cname-target

GET /api/v1/subaccounts/{id}/domains/cname-target
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List invoice.html

GET /api/v1/subaccounts/{id}/invoice.html
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List a subaccount’s MCCMNC rate overrides

GET /api/v1/subaccounts/{id}/mccmnc-overrides
Return the per-operator (MCCMNC) rate overrides set against one child subaccount, cursor-paginated. The send-path resolver prices an SMS segment against these overrides before falling through to the wholesale rate deck, so this list is the management view of what the child bills per operator. ?limit= tops at 200 and the response meta carries cursor/has_more/total to page the full override set. Requires owner or admin on the parent organization.
string
required
Subaccount (child organization) id.
string
Page size (default 100, max 200).
string
Opaque continuation token from a prior page.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List notification-email

GET /api/v1/subaccounts/{id}/notification-email
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get a subaccount’s reseller pricing

GET /api/v1/subaccounts/{id}/pricing
Return the reseller pricing configuration for one child subaccount — the flat reseller_margin_pct markup, its monthly_spend_cap_cents ceiling (null = uncapped), and the current-period spend the cap is evaluated against. Use it to render the spend-cap progress / margin decks on the subaccount detail page. Requires owner or admin on the parent organization.
string
required
Subaccount (child organization) id.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get the subaccount’s reseller rate deck

GET /api/v1/subaccounts/{id}/rate-deck
Return the subaccount’s differentiated per-channel/destination markup cells (the reseller rate deck) plus the id of the named rate card it is assigned to (or null). An empty deck means every usage line on this subaccount’s statement prices at the flat reseller_margin_pct. Requires owner or admin on the parent organization.
string
required
Subaccount (child organization) id.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get a subaccount’s lifetime usage

GET /api/v1/subaccounts/{id}/usage
Return a child organization’s lifetime usage counters plus its current plan/rate limit — messages sent/received, outbound call count, API call count, credits used, and data-retention days. The counters fall back to the subaccount’s stored metadata when the child tenant schema has not provisioned yet, so this read never fails a still-provisioning subaccount. Memoised for a short TTL on the service so the unbounded COUNT(*) scans the counters derive from do not starve the connection pool. Requires owner or admin on the parent organization.
string
required
Subaccount (child organization) id.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List export.csv

GET /api/v1/subaccounts/{id}/usage/export.csv
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List live

GET /api/v1/subaccounts/{id}/usage/live
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List statement

GET /api/v1/subaccounts/{id}/usage/statement
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List byo-fee-meter

GET /api/v1/subaccounts/byo-fee-meter
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List the parent org’s persisted rate cards

GET /api/v1/subaccounts/rate-cards
Return the parent organization’s named price-book library (settings.rateCards) — the persisted rate cards a reseller drafts, re-uses, and assigns to its subaccounts. Cards without cells are noise and never persist: each card needs an id + name plus at least one cell family (lane_cells and/or deck_cells). Requires owner or admin on the parent organization.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Consolidated usage rollup across the subaccount tree

GET /api/v1/subaccounts/usage-rollup
Return the parent-level usage and cost rollup for one billing period (period=YYYY-MM, defaulting to the current UTC month). Folds every child subaccount’s statement into grand totals plus a per-subaccount breakdown — each carrying quantity, base cost, the marked-up price under that subaccount’s reseller margin, and the margin earned. Use it for reseller portal spend dashboards and billing reconciliation over the whole tree; GET /api/v1/subaccounts//usage/statement drills into one subaccount and GET /api/v1/subaccounts/usage-rollup/export.csv returns the same rollup as CSV. Requires owner or admin on the parent organization.
string
Billing period in YYYY-MM; defaults to the current UTC month.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List export.csv

GET /api/v1/subaccounts/usage-rollup/export.csv
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Create subaccounts

POST /api/v1/subaccounts
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Create api-keys

POST /api/v1/subaccounts/{id}/api-keys
string
required
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Create channel-budgets

POST /api/v1/subaccounts/{id}/channel-budgets
string
required
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Create domains

POST /api/v1/subaccounts/{id}/domains
string
required
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Re-check a custom domain’s CNAME

POST /api/v1/subaccounts/{id}/domains/{domainId}/verify
Trigger a new CNAME/DNS verification pass against a claimed custom domain (the white-label dashboard hostname a reseller pointed at the canonical CNAME target). Returns the updated domain row: status flips to verified when the CNAME resolves, and a prior-migration / failed row can be re-checked here. The SSL certificate is provisioned asynchronously after verify succeeds. Requires owner or admin on the parent organization.
string
required
Subaccount (child organization) id.
string
required
Custom domain id (from POST /api/v1/subaccounts/:id/domains).
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Finalize a pending subaccount

POST /api/v1/subaccounts/{id}/finalize
Flip a wizard-created subaccount from pending to active on the new-subaccount wizard’s final Launch step. The wizard creates the row as pending so an abortable mid-wizard session never leaves a billing-active sub behind; this endpoint completes the flow. Idempotent — a 200 on an already-active row is a no-op, so safe client retries do not error. Requires owner or admin on the parent organization.
string
required
Subaccount (child organization) id.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Upsert a subaccount MCCMNC rate override

POST /api/v1/subaccounts/{id}/mccmnc-overrides
Create or update a per-operator (MCCMNC) rate override on a child subaccount — a customer sell price (per unit) the send-path resolver applies verbatim for that operator instead of the wholesale/margin-pricing deck. The write validates the price is at-or-above the platform’s active wholesale cost for the same operator/currency, so a mis-priced override cannot put the subaccount below-cost on every segment. The currency is canonicalised to upper-case ISO-4217 before the guard + write. Requires owner or admin on the parent organization.
string
required
Subaccount (child organization) id.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
string
required
Mobile network/operator identifier (MCC+MNC), 5–6 digits.
number
required
Customer sell price per unit (rejected if below wholesale cost).
string
ISO-4217 code (defaults to USD; canonicalised to upper-case).

Reactivate a suspended subaccount

POST /api/v1/subaccounts/{id}/reactivate
Reactivate a suspended child organization so it can send again under the parent’s billing. Use it as the inverse of POST /api/v1/subaccounts//suspend; an already-active row is a no-op so safe client retries do not error. Requires owner on the parent organization.
string
required
Subaccount (child organization) id.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Suspend a subaccount

POST /api/v1/subaccounts/{id}/suspend
Suspend a child organization so it stops send activity while the parent retains billing ownership. Use it to halt a runaway or abusive end-customer without permanently deleting the subaccount — POST /api/v1/subaccounts//reactivate flips it back to active. Idempotent shape: returns the subaccount id + status=suspended. Requires owner on the parent organization.
string
required
Subaccount (child organization) id.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Transfer wallet credits to a subaccount

POST /api/v1/subaccounts/{id}/transfer-credits
Move credits from the parent organization’s wallet to one child subaccount’s wallet — atomic debit-then-add with rollback so a failure never leaves the parent debited. A caller-supplied client_reference_id de-duplicates safe client retries so a network-failure retry does not double-charge. Fails 402 when the parent balance is insufficient. Requires owner on the parent organization.
string
required
Subaccount (child organization) id.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
integer
required
Credits (cents) to transfer — 1–1,000,000 per call.
string
Free-text audit note attached to the transfer.
string
Caller-supplied idempotency key; a retry with the same (parent, child, amount, id) tuple is treated as the prior call so the parent is never double-charged.

Provision a subaccount in one call

POST /api/v1/subaccounts/provision
Collapse the new-subaccount wizard (organization → plan & limits → reseller pricing → funding → branding) into one atomic call so a reseller’s portal/automation can stand up a branded, priced, funded tenant without stepping the multi-step dashboard wizard. Validated downstream by the reseller-provisioning planner; a failure in any step (pricing/funding/branding/finalize) rolls the child org back so no partially-provisioned subaccount is left behind. Requires owner or admin on the parent organization.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
string
required
string
string (enum: starter|growth|business|enterprise)
integer
integer
number
integer | null
object[]
object[]
integer
object
boolean

Update subaccounts

PUT /api/v1/subaccounts/{id}
string
required
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Update a subaccount’s AI configuration

PUT /api/v1/subaccounts/{id}/ai-config
Read (GET) or set (PUT) the parent’s AI-configuration override for this child: an enable/disable override, a curated LLM provider pin, and a comped (free) marker. Settings-JSONB-backed (no migration). GET returns the resolved view (response schema aiConfigViewJsonSchema); PUT echoes the same resolved view back. Requires owner/admin on the parent organization.
string
required
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
boolean | null
string | null (enum: devotel|anthropic)
boolean

Update assigned-rate-card

PUT /api/v1/subaccounts/{id}/assigned-rate-card
string
required
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Update branding

PUT /api/v1/subaccounts/{id}/branding
string
required
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Update channel-budgets

PUT /api/v1/subaccounts/{id}/channel-budgets
string
required
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Update notification-email

PUT /api/v1/subaccounts/{id}/notification-email
string
required
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Set a subaccount’s reseller pricing

PUT /api/v1/subaccounts/{id}/pricing
Replace a child subaccount’s reseller margin percentage / monthly spend cap (a null monthly_spend_cap_cents clears the cap back to uncapped). The margin is clamped to [0, 100] and the cap clamps to a sane max so a mis-keyed dashboard edit cannot runaway an end-customer. Every usage line on the subaccount’s invoice prices against the deck resulting from this setting plus any named rate card the child is assigned. Requires owner or admin on the parent organization.
string
required
Subaccount (child organization) id.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
number
Flat markup percentage on every usage line’s base cost.
integer | null
Aggregate monthly spend ceiling (cents); null clears the cap back to uncapped.

Replace the subaccount’s reseller rate deck

PUT /api/v1/subaccounts/{id}/rate-deck
Replace the subaccount’s rate deck full-set (an empty rate_deck array clears it back to the flat-margin-only default). Returns the normalised, enforceable deck actually stored. Each cell pairs a channel with a markup margin_pct, optionally scoped to a destination (ISO country code / MCCMNC / region label); an omitted destination is a channel-wide cell. Requires owner or admin on the parent organization.
string
required
Subaccount (child organization) id.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
object[]
required
The complete desired price book (full-set replace; empty array clears the deck).

Replace the parent org’s rate-card library

PUT /api/v1/subaccounts/rate-cards
Replace the parent organization’s rate-card library full-set (an empty rate_cards array clears it — new assignments then fall back to the flat margin / the child’s own deck). Returns the normalised library actually stored. Requires owner or admin on the parent organization.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
object[]
required
The complete desired library (full-set replace; empty array clears it).

Delete subaccounts

DELETE /api/v1/subaccounts/{id}
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Delete domains

DELETE /api/v1/subaccounts/{id}/domains/{domainId}
string
required
string
required
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Delete a subaccount MCCMNC rate override

DELETE /api/v1/subaccounts/{id}/mccmnc-overrides/{overrideId}
Remove one per-operator (MCCMNC) rate override from a child subaccount so its traffic prices back onto the wholesale/margin deck. A 404 is raised when the override does not belong to the child org scoped by the parent, so a parent cannot delete a sibling’s override via a flat id. Returns 204 No Content. Requires owner or admin on the parent organization.
string
required
Subaccount (child organization) id.
string
required
MCCMNC override row id (from GET /api/v1/subaccounts/:id/mccmnc-overrides).
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
Response: 204 No Content