Skip to main content

Sender Pools API

Sender Pools endpoints exposed by the Devotel CPaaS API Base path: /api/v1/messaging/sender-pools Endpoint count: 8

title: “Errors worth branching on” description: “Per-endpoint failure templates matching the envelope — what actually fires, what to retry, what to surface to the operator.”

Errors worth branching on

These five failures cover the pool-claim (POST /api/v1/sender-pools//claim), per-send. Each block below is a full { error, meta } envelope as the API returns it, and the matrix at the bottom answers retry vs surface for the same five classes. For the platform-wide decision table these branches plug into, see the error handling guide.

401 — Unauthorized

A 401 on this page is the bearer key failing before the route ran — it never means the resource is wrong. Rotate the key or re-mint the scoped token; retrying the same request changes nothing.

403 — Forbidden

A 403 means the key authenticated but the operation is gated by scope — check the key’s scopes on the developer page; a 403 is never a data-not-found shape.

422 — Schema

A 422 means the payload did not match the request schema — branch on error.details.field and resend with an upper-case ISO-3166 alpha-2 country code instead of blind-retrying the same body.

429 — Rate

The Retry-After header and error.details.retry_after are both set on every 429 — resend the SAME request after the lower of the two.

409 — Conflict

Refill the pool from the dashboard — an idempotent retry changes nothing.

60-second retry matrix


List sender pools

GET /api/v1/messaging/sender-pools
List the tenant’s sender pools as a keyset-paginated page, newest-first. A sender pool groups sending identities (E.164 long codes, short codes, alphanumeric sender IDs) under one id you pass to /v1/messages as sender_pool_id, which resolves the actual from via the pool’s selection strategy. Use it to populate a pool picker; page with the opaque cursor query parameter from a prior page’s next_cursor and a limit clamped to 1–100 (an oversized value is clamped, not rejected).
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 sender pool

GET /api/v1/messaging/sender-pools/{id}
Fetch a single sender pool by its Orbit id, returning its label, sender identities (E.164 long codes, short codes and/or alphanumeric sender IDs) and selection strategy. Use it to hydrate a detail or edit view before rotating members into or out of the pool. Returns 404 when the id is not a sender pool in this tenant.
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 sender pool health

GET /api/v1/messaging/sender-pools/{id}/health
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.

Explain pool members against the verified inbound inventory

GET /api/v1/messaging/sender-pools/{id}/inbound-inventory
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.

Preview sender pool selection

GET /api/v1/messaging/sender-pools/{id}/preview
Dry-run which sender identity a pool would assign to a given recipient. Pass the destination as the recipient query parameter (E.164). The endpoint is read-only: it never persists stickiness state, advances the round-robin counter, or mutates production routing — preview reflects the pool’s persisted strategy. Use it to verify exactly which DID a pool hands a recipient before you wire the pool into a campaign. Returns 404 when the id is not a sender pool in this tenant.
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.

Create sender pool

POST /api/v1/messaging/sender-pools
Create a sender pool — the id you reference from /v1/messages as sender_pool_id so the send path resolves the actual from identity. Required: a label and one to 50 sender_dids (E.164 long codes, short codes, or alphanumeric sender IDs — mixed types unblock alphanumeric-mandatory markets). Optional strategy selects how the pool picks a sender: sticky (same recipient keeps one DID), round_robin, random, or geomatch (recipient area code match); the default is sticky. Owner / admin only.
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.
any
Human-readable name, 1–200 characters (required).
any
1–50 sender identities as an array of strings: E.164 long codes, numeric short codes, or alphanumeric sender IDs (required).
any
Optional selection strategy — sticky, round_robin, random or geomatch; defaults to sticky.

Update sender pool

PATCH /api/v1/messaging/sender-pools/{id}
Update mutable fields on a sender pool in place — send only the fields you want to change (label, sender_dids and/or strategy; at least one is required or the request is 422). Use it to rotate members into or out of a live pool or to switch its selection strategy without re-pointing the messages that reference it. Owner / admin only; returns 404 when the id is not a sender pool in this tenant.
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.
any
New human-readable name, 1–200 characters.
any
Replacement member list, 1–50 sender identities as an array of strings.
any
New selection strategy — sticky, round_robin, random or geomatch.

Delete sender pool

DELETE /api/v1/messaging/sender-pools/{id}
Permanently delete a sender pool and its stickiness rows (per-recipient DID assignments). New /v1/messages calls referencing the id fail to resolve immediately; messages already sent are unaffected. Use it to retire a rotation group you no longer need. Owner / admin only; returns 404 when the id is not a sender pool in this tenant and 204 No Content on success.
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.
Response: 204 No Content