Rentals
.md

Account-wide SMS feed (all rentals)

GET/v1/rentals/sms

Every SMS received by any of your rentals as a cursor feed. This is the endpoint to poll: one request covers all your rentals, however many you have. Remember the returned next_after and send it back as after on the next call — you only receive messages that were recorded after that point. Each item carries its rental_id and its own cursor. Cursors and message ids are opaque tokens: store and send them back verbatim, never parse them.

The feed is ordered by when each message was recorded for your rental, which is not necessarily by id or by received_at. A message you have not seen is never skipped: anything recorded after your cursor shows up on a later call. In the rare case a message is re-processed on our side it may appear again with a new cursor — de-duplicate by id if that matters to you.

REQUEST
API Serverhttps://api.dogesms.com/v1
AuthenticationAuthorization: Bearer sk_live_… or X-API-Key
QUERY PARAMETERS
NameTypeRequiredDescription
afterstringOptionalOpaque cursor from a previous call (next_after, or an item's cursor). Omit to start from the beginning. Only a cursor this API returned is accepted — anything else is 400 VALIDATION_ERROR.
limitintegerOptional—
Request examples
curl "https://api.dogesms.com/v1/rentals/sms" \
  -H "Authorization: Bearer sk_live_…"
RESPONSE

SMS page.

application/json
OBJECT
{
data: {
items: [{
id: string
Stable opaque identity of the message (sms_ prefix); de-duplicate by it.
cursor: string
Opaque position of this message in the feed. Pass it as after to continue from here.
rental_id: string
from: string
Sender as received (short code, alphanumeric sender id or number).
text: string
Full SMS text.
code: stringnull
Verification code extracted from text, as a string: usually digits, but some services send letters and digits mixed (e.g. 8A539T), so never parse it as a number. Digit-group separators are removed (123-456 → 123456). null when none was recognised; text always has the original.
received_at: string
}]
limit: integer
after: string
The cursor this page was requested with (empty when started from the beginning).
next_after: string
Send this as after on your next call. The last item's cursor, or a re-issued token for the request after when the page is empty (tokens are not byte-stable; compare positions by what they return, not by string).
}
request_id: string
}
ERROR CODES
StatusCodeWhen
400
VALIDATION_ERROR
VALIDATION_ERROR — after is not a cursor we issued.
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.