Check whether you can text
Tells you whether your company can send SMS right now, and which number it sends from. Check this before relying on sendText anywhere else.
Authorization
AuthorizationstringrequiredBearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.
Response
200 · The company's texting status.
canSendbooleanWhether SMS can be sent at the moment.
forbiddenReasonenum<string>Why not, when canSend is false. hasNoPhoneNumber means the company has not bought a number; tcrCampaignNotApproved that the carrier registration for that number is still going through.
hasNoPhoneNumbertcrCampaignNotApproved
chatPhoneNumberstringThe number your outbound SMS comes from. Absent until one has been bought.
401 · The access token is missing, expired, or not valid.
When canSend is false, calls that ask for an SMS still succeed — the message is recorded and posted into the chat, but the SMS is not delivered. Look at the message's textStatus afterwards to see what happened.