Examples

curl -H "Authorization: Basic BASE64_ENCODED_PUBLIC_KEY_AND_PRIVATE_KEY" -X POST "trackdrive.com/api/v1/text_messages?message=Thanks+for+your+inquiry&to=%2B16053334444"

Response Example

{
  "status": 200,
  "errors": {},
  "text_message": {
    "id": 812904581,
    "from": "+18554550000",
    "to": "+17190000000",
    "message": "Thanks for your submission! A representative call in 60 seconds.",
    "number_id": 147690000,
    "lead_id": 11000635,
    "provider_configuration_id": 12093,
    "message_uuid": "SM42efa83003ab41f9977ff292f48375cc",
    "ring_pool_id": null,
    "schedule_id": 192840,
    "status": "queued",
    "error_code": null,
    "created_at": "2019-08-29T15:58:21.850-04:00"
  },
  "checksum": "8e0fcaa8b1cc805d2323759e39a1a1ba",
  "metadata": {
    "root": "text_message"
  }
}

Params

Param name
Description
from
Optional Blank Value Allowed

Sending address (+E.164 formatted phone number.) Example: +18665550001

  • Must be a String

to
Optional Blank Value Allowed

Receiving address (+E.164 formatted phone number.) Example: +18665550001

  • Must be a String

lead_id
Optional Blank Value Allowed

Optional. Associate this text message with this lead. The lead's telephone number will be used as the Receiving address if “to” is not provided.

message
Required

Message body (i.e., content) as non-empty string. Example: Hello!

  • Must be a String

delivery_webhook_url
Optional Blank Value Allowed

Webhook to call when the message's status changes.

  • Must be a String

manual
Optional Blank Value Allowed

Pass true if this message is manually initiated by a human being in your application. When this is set to true Trackrive will skip checking if the “to” destination is on the DNC.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

number_id
Optional Blank Value Allowed

Provide the sending address as an internal Trackdrive telephone number ID.

schedule_id
Optional Blank Value Allowed

Optional. If a lead exists on this schedule, this text message will be associated with it. If no lead currently exists, one will be created, and it will be added to this schedule.

offer_id
Optional Blank Value Allowed

Optional. Associate this text message with a matching lead on this offer. If no lead currently exists, one will be created on this offer.