Messaging

Send an SMS or MMS

Sends a message from one of your numbers. Supplying media makes it an MMS. Four gates run in order: number ownership, recipient opt-out status, the TCPA window, and carrier registration (10DLC for local numbers, Toll-Free Verification for toll-free).

post/api/v1/messages

Request

  • Base URL: https://api.callnode.io
  • URL: https://api.callnode.io/api/v1/messages
  • Auth: API key in header X-Api-Key and API key in header X-Timestamp and API key in header X-Signature

Headers

X-Idempotency-Keystring uuid

A UUID. Replaying the same key returns the original result rather than acting twice.

Request body

tostring required

Plus sign followed by 7–15 digits.

fromstring required

Plus sign followed by 7–15 digits.

bodystring

Message text. Required unless media is supplied.

mediastring[]

Any entry makes this an MMS. Each entry is a public URL or the file itself as a base64 data URL (data:image/png;base64,...). JPG, PNG, GIF, WebP, MP4 and PDF; up to 5 MB each. CallNode stores a copy and delivers from its own URL. An inline file of an unsupported type or size is a 400 invalid_media.

statusWebhookUrlstring uri

URL we POST delivery status updates to.

tcpaOverrideboolean
metadataobject

Example request

{
  "to": "+16135551234",
  "from": "+16135551234"
}

Response

Message accepted by the carrier.

idstring
statusstring
costnumber
segmentsinteger
idempotencyReplayboolean

True when this response replays an earlier request with the same idempotency key.

Example response

{
  "status": "sent",
  "cost": 0.01,
  "segments": 1
}

Changes

No recorded changes to this operation across all 1 revision of this API.