Outgoing SMS
Send a text message
POST /text_messages
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/text_messages
Send a text message
Sends an outbound text message. If a matching lead is not already known, one is resolved or created from lead_id, schedule_id, or offer_id, and a sending number is chosen from number_id, from, or the resolved lead or schedule's SMS number. Pass manual true when a human is sending the message directly, which skips the DNC check on the destination. Restricted to account superusers and requires the text_messages permission.
Params
| Param name | Description |
|---|---|
|
from Optional Blank value allowed |
Sending address (+E.164 formatted phone number.) Example: +18665550001
|
|
to Optional Blank value allowed |
Receiving address (+E.164 formatted phone number.) Example: +18665550001
|
|
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!
|
|
delivery_webhook_url Optional Blank value allowed |
Webhook to call when the message’s status changes.
|
|
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.
|
|
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.
|
GET /text_messages
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/text_messages
Retrieves details about text messages.
Returns outgoing text message records, including their delivery status. Restricted to account superusers and requires the text_messages permission.
Params
| Param name | Description |
|---|---|
|
ids Optional |
Return records matching these ids.
|
|
page Optional |
Return the next page of results.
|
|
per_page Optional |
How many results to return per page. The default is 25.
|
|
created_at_to Optional |
Date formatted like 2016-01-01 12:25:15 -0500
|
|
created_at_from Optional |
Date formatted like 2016-01-01 12:25:15 -0500
|
|
fulltext Optional |
Search for any record that matches this text
|
|
time_zone Optional |
Date ranges will be parsed using this time zone.
|
|
columns Optional |
Specify the columns you would like returned by the API for a given resource.
Limiting the columns can significantly increase API response time since only the requested data will be processed.
columns=uuid,number,created_at
Must be any combination of:
|
|
root Optional |
Pass
|
GET /text_messages/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/text_messages/:id
Get a text message request
Returns a single outgoing text message by id, including its current delivery status. Restricted to account superusers and requires the text_messages permission.