Skip to main content

How it works

The Texting endpoints let you send one-off SMS messages built from templates we configure for your account. Your account is identified by your collectwise_key API key, sent in the header on every request.
Texting must be enabled for your organization before these endpoints will respond. If you receive a 403 on every call, contact us to have your organization enabled.
A typical integration is:
1

Discover templates

Call List SMS Templates to see the templates available to your account and the placeholder variables each one expects.
2

(Optional) Preview segments

Call Calculate SMS Segments to see how many SMS segments a message or rendered template will use, before sending.
3

Send

Call Send a Text with the templateId, destination, and a variables object filling in every placeholder. A 200 means the message was accepted and queued, and returns a messageId.
4

Check status

Poll Get Text Status with the messageId. Delivery reports arrive asynchronously, so check after a short delay.

Templates and variables

Each template has a templateId and a message body containing {placeholder} tokens. The placeholders array on a template lists exactly which keys you must supply in variables when sending. If any placeholder is left unresolved, the send fails with 400 rather than texting a literal {placeholder} to the recipient. Placeholders use single curly braces and are matched exactly first, then normalized (case-insensitive, ignoring # and spaces), so {FirstName}, {#FileNumber}, and {Variable Name} all work.

Segments and encoding

SMS messages are billed and split into segments by character count and encoding, matching the Twilio segment calculator:
  • GSM-7: 160 characters in a single segment, 153 per segment when the message spans multiple segments.
  • UCS-2: 70 characters single, 67 per segment when multi-part. Any character outside the GSM-7 set (emoji, smart quotes, most CJK) forces the entire message to UCS-2.
  • The extended GSM-7 characters { } [ ] ~ \ | ^ € cost two units each.

Delivery status

A message moves through QueuedSentDelivered, or ends in Rejected / Failed / Undelivered. For failed messages, failureClassification indicates whether a retry is worthwhile:
ClassificationMeaning
FATALWill never deliver as-is (e.g. invalid number, blocked, flagged as spam). Do not retry.
NON_FATALTransient (e.g. absent subscriber, temporary carrier failure). retryRecommended is true.
nullThe carrier reason was not recognized.

Rate limits

  • Send: 10 requests per minute per organization.
  • Reads (templates, segments, status): 60 requests per minute per organization.
Exceeding a limit returns 429 with a Retry-After header.