Rentals
.md

Get a rental

GET/v1/rentals/{id}

Status and dates of one rental. phone_number stays in the response after the rental has ended — you paid for the period, keep it for your records.

REQUEST
API Serverhttps://api.dogesms.com/v1
AuthenticationAuthorization: Bearer sk_live_… or X-API-Key
PATH PARAMETERS
NameTypeRequiredDescription
idstring (uuid)Required—
Request examples
curl "https://api.dogesms.com/v1/rentals/3f6c2a9e-8b1d-4c7a-9e2f-5d4b1a7c0e93" \
  -H "Authorization: Bearer sk_live_…"
RESPONSE

The rental.

application/json
OBJECT
{
data: {
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
}
request_id: string
}
ERROR CODES
StatusCodeWhen
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.
404
RENTAL_NOT_FOUND
RENTAL_NOT_FOUND — no such rental under your account.

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