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.”
Worked request and response samples
Copy a request as written, substitute your own ids, and compare the response envelope. The chain a pool-integration runs: create → list → send through the pool → (optional) preview → swap strategy. For narrative walkthroughs see the Sender pools guide.1. Create a pool
POST /api/v1/messaging/sender-poolssender_dids accepts a mix of E.164 long codes, numeric short codes, and alphanumeric sender IDs (up to 50 per pool, no duplicates). Success returns 201 with the new pool id:
2. List pools
GET /api/v1/messaging/sender-poolslimit is clamped to 1–100 (default 50) and meta.pagination carries has_more plus the opaque next_cursor to pass back as ?cursor=.... Each row includes the full sender_dids membership:
3. Send through the pool
POST /api/v1/messages/smsfrom and pass sender_pool_id; the service resolves the sender via the pool’s strategy. When both are set, the pool wins — same precedence Twilio uses for Messaging Services vs From. The echoed envelope names the resolved sender:
4. Preview the pick
GET /api/v1/messaging/sender-pools/{id}/preview?recipient=<E.164>5. Swap the strategy
PATCH /api/v1/messaging/sender-pools/{id}label, sender_dids, or strategy; the response echoes the full pool so the diff (strategy moved sticky → round_robin, updated_at bumped) is visible:
Errors worth branching on
These failures cover the pool endpoints shown above. Each block is a full{ error, meta } envelope as the API returns it, and the matrix at the bottom answers retry vs surface. For the platform-wide decision table these branches plug into, see the error handling guide.
401 — Unauthorized
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
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
422 means the payload did not match the request schema — branch on error.details.field and resend with valid sender_dids entries instead of blind-retrying the same body. A pool whose members were all pruned after creation surfaces the same status with code SENDER_POOL_EMPTY on the next send or preview — add at least one DID before sending through it.
429 — Rate
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
60-second retry matrix
List sender pools
GET /api/v1/messaging/sender-pools/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).
Get sender pool
GET /api/v1/messaging/sender-pools/{id}Get sender pool health
GET /api/v1/messaging/sender-pools/{id}/healthExplain pool members against the verified inbound inventory
GET /api/v1/messaging/sender-pools/{id}/inbound-inventoryPreview sender pool selection
GET /api/v1/messaging/sender-pools/{id}/previewrecipient 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.
Create sender pool
POST /api/v1/messaging/sender-pools/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.
1–50 sender identities as an array of strings: E.164 long codes, numeric short codes, or alphanumeric sender IDs (required).
Update sender pool
PATCH /api/v1/messaging/sender-pools/{id}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.
Delete sender pool
DELETE /api/v1/messaging/sender-pools/{id}/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.
204 No Content