Orders
List your orders
GET/v1/orders
Available to every account by default — this is the recommended
polling endpoint. One GET /orders?status=pending,active every
5 seconds tracks all your in-flight orders with a single request.
403 ORDER_QUERY_NOT_AVAILABLE is returned only when polling has
been disabled for your account (e.g. abuse review) — contact support.
REQUEST
QUERY PARAMETERS
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | Optional | Page size, max 100. |
| offset | integer | Optional | — |
| startTime | string (date-time) | Optional | RFC3339; filters by created_at. |
| endTime | string (date-time) | Optional | RFC3339; filters by created_at. |
| status | string | Optional | Comma-separated order statuses, e.g. active,completed. |
curl "https://api.dogesms.com/v1/orders?status=pending,active" \ -H "Authorization: Bearer sk_live_…"
RESPONSE
Order list, newest first.
{
data: {
items: [{
id: string
order_no: string
Human-readable order number.
service_code: string
country_code: string
status: enum
Allowed: pending | active | completed | expired | cancelled | failed
amount_cents: integer
Charged amount in cents.
0 while pending — the wallet is charged on successful number allocation, not at creation.currency: string
phone_number: stringnull
Allocated number in E.164 with the leading
+ and country calling code (e.g. +12015550123). Numbers delivered in national format together with the calling code are completed to E.164 before being returned. In rare cases the number still does not start with the calling code of country_code; such a number is passed through exactly as received, which may lack the +. Present while the order is active and kept on completed. Omitted from the response once the order reaches a refunded terminal state (expired / cancelled / failed), same as before allocation — store it from the allocation response/webhook if you need it later.sms_code: stringnull
Extracted verification code; present when
completed. Digit-group separators are removed: a code the sender formats as 123-456 or 123 456 is returned as 123456. sms_content always keeps the original text.sms_content: stringnull
Full SMS text; present when
completed.created_at: string
activated_at: stringnull
expired_at: stringnull
completed_at: stringnull
cancelled_at: stringnull
sms_received_at: stringnull
error_code: string
Business error code when
failed. NO_NUMBERS_AVAILABLE: no number could be allocated (never charged). SMS_NOT_RECEIVED: a number was allocated but was released before any SMS arrived (charge refunded). Orders whose activation window simply runs out end as expired, not failed.error_message: string
channel_id: string
The
channel_id the order was placed with. Present only for orders placed by channel.price_cents: integer
Price locked for this order. Only in the
POST /orders response that created the order (omitted on an idempotent replay and in order queries); the charge is amount_cents once the number is allocated, normally equal to this.}]
total: integer
limit: integer
offset: integer
}
request_id: string
}
ERROR CODES
| Status | Code | When |
|---|---|---|
| 401 | API_KEY_MISSING API_KEY_INVALID_FORMAT API_KEY_INVALID API_KEY_REVOKED | Missing or invalid API key (API_KEY_MISSING, API_KEY_INVALID_FORMAT, API_KEY_INVALID, API_KEY_REVOKED). Emitted by the auth layer before the handler — flat shape, no request_id. |
| 403 | ORDER_QUERY_NOT_AVAILABLE | ORDER_QUERY_NOT_AVAILABLE — order status polling has been disabled for your account (e.g. abuse review). Polling is enabled by default for all accounts; contact support to restore access. |
Branch on code, not on the message. Full list: Errors.