Rentals
.md

List your rentals

GET/v1/rentals
REQUEST
API Serverhttps://api.dogesms.com/v1
AuthenticationAuthorization: Bearer sk_live_… or X-API-Key
QUERY PARAMETERS
NameTypeRequiredDescription
statusstringOptionalComma-separated filter: active, expired, refunded, force_released (also payment_pending for rentals created in the dashboard).
limitintegerOptional—
offsetintegerOptional—
Request examples
curl "https://api.dogesms.com/v1/rentals?status=active" \
  -H "Authorization: Bearer sk_live_…"
RESPONSE

Rentals, newest first.

application/json
OBJECT
{
data: {
items: [{
id: string
status: enum
Rentals created through the API never auto-renew, so payment_pending only appears on rentals created in the dashboard.
Allowed: active | payment_pending | expired | refunded | force_released
phone_number: string
E.164 with the leading +. Present in every status, including after the rental ended.
country_code: string
service_code: stringnull
null = rented for any service.
duration_days: integer
tier: enum
Quality tier of the plan this rental was created from.
Allowed: standard | premium
price_cents: integer
Charged for the period at creation.
currency: string
auto_renew: boolean
Always false for rentals created through the API.
started_at: string
expires_at: string
The number is yours until this moment.
released_at: stringnull
Set once the rental has ended.
created_at: string
}]
total: integer
limit: integer
offset: integer
}
request_id: string
}
ERROR CODES
StatusCodeWhen
400
VALIDATION_ERROR
VALIDATION_ERROR — unknown status value.
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
ACCOUNT_BANNED
EMAIL_NOT_VERIFIED
ACCOUNT_NOT_ACTIVE
Key is valid but the account is not eligible (ACCOUNT_BANNED, EMAIL_NOT_VERIFIED, ACCOUNT_NOT_ACTIVE). Emitted by the auth layer — flat shape.

Branch on code, not on the message. Full list: Errors.