Skip to main content
POST
Check recent texts, then wait for a matching SMS

Authorizations

Authorization
string
header
required

Agent token (alt_…) or OAuth access token; bound to one agent

Path Parameters

phoneNumberId
string
required

Phone number id

Body

application/json
from
string

Only texts from this sender

Required string length: 8 - 20
contains
string

Only texts whose body contains this text (case-insensitive)

Maximum string length: 200
since

ISO timestamp or event cursor; defaults to the last 15 minutes

Pattern: ^\d{1,18}$
timeout
integer

Seconds to wait for a match, maximum 25; call again with the returned cursor to keep waiting

Required range: 0 <= x <= 25

Response

The text with any code, or matched=false with a cursor

matched
boolean
required
cursor
string
required

Continue from here with since=cursor

message
object | null
required