Skip to main content
POST

Authorizations

collectwise_key
string
header
required

Active, unexpired API key belonging to an active organization. Optional organization/key signing and organization IP restrictions also apply; see API Access.

Headers

x-cw-timestamp
string

Required together with x-cw-signature when signing is enabled for this key or organization. POST /security/verify also requires signing whenever a usable secret exists. Canonical Unix seconds, within ±300 seconds. See API Access for CW1 signing.

Pattern: ^(0|[1-9][0-9]*)$
x-cw-signature
string

CW1 HMAC-SHA256 signature: v1= followed by 64 lowercase hex digits. Use the decoded 32-byte signing secret and exact request bytes. See API Access.

Pattern: ^v1=[0-9a-f]{64}$

Body

application/json
destination
string
required

US phone number. 3313048434, 13313048434, and +1 (331) 304-8434 are all accepted.

debtorId
string
required

Your reference for this recipient (e.g. your account or reference number). Forwarded as-is; replies and the message record are tracked against it.

templateId
integer

The template to send. Must belong to your organization's account. Mutually exclusive with message; send exactly one of the two.

variables
object

Values substituted into the template's {placeholder} tokens. Required with templateId; use {} if the template has none. If any placeholder is left unresolved, the request fails with 400 rather than texting a literal {token}. Rejected if sent alongside message.

message
string

Free-form message body, sent verbatim with no template and no placeholder substitution. Mutually exclusive with templateId. Requires free-form texting to be enabled for your organization, otherwise 403.

Required string length: 1 - 1600
campaignId
string

Optional. Overrides your organization's default campaign for this send.

Response

Message accepted and queued.

success
boolean
required
messageId
string
required

Delivery-tracking ID. Use it with the status endpoint.

segments
object