API Documentation for Messages
POST - https://smpl-sms01.textable.app/api/send
Headers
Type | Value |
---|---|
Authorization |
|
Content-type | application/json |
Arguments
Name | Type | Description |
---|---|---|
accountUid | String | This is the id of the user that you would like to send as. (Deprecated, please use the Authorization header method to authenticate.) |
accessToken | String | This should be a valid access token on the user. (Deprecated, please use the Authorization header method to authenticate.) |
to | String | This should be an e.164 formatted phone number (e.g. +15555555555). |
from | String | This should the e.164 formatted phone number assigned to the user (e.g. +15555555555). |
message | String | This is the message body as a string. |
media | Array | (Optional) This should be an array of media files as publicly available URLs. |
sendStatus | String | (Optional) Set to "sent". This is useful if you interact directly with your carrier API's but want to store the message in the conversation history. When set, we will NOT send this through the carrier APIs and assume that you already have. |
type | String | (Optional) Set to "note". You may store notes on a conversation by setting the type to "note". This will NOT send a message through the carrier APIs. |
Example Request Body:
{
"to":"+15555555555"
"from":+14444444444
"message": "Hello, world!",
"media": [
"https://picsum.photos/200/300" ]
}
Example Response Body:
Success - HTTP 200
{
"status": "true"
}
Failure - HTTP 400
{
Create Contact
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}
POST - https://smpl-sms01.textable.app/api/contacts
Headers
Type | Value |
---|---|
Authorization |
|
Content-type | application/json |
Arguments
Name | Type | Description |
---|---|---|
phoneNumber | String | Required. This should be an e.164 formatted phone number (e.g. +15555555555). |
fullName | String | (Optional) If not set, fullName will be set to the phoneNumber value. |
String | (Optional) |
Example Request Body:
{
"phoneNumber":"+15554442222",
"fullName":"John Doe",
"email": "john.doe@gmail.com"
}
Example Response Body:
Success - HTTP 200
{
"id": "xyzabc123"
"fullName": "John Doe"
"phoneNumber": "+15554442222"
"email": "john.doe@gmail.com"
}
Failure - HTTP 400
{
Update Contact
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}
POST - https://smpl-sms01.textable.app/api/contacts/{id}
Headers
Type | Value |
---|---|
Authorization |
|
Content-type | application/json |
Arguments
Name | Type | Description |
---|---|---|
phoneNumber | String | Required. This should be an e.164 formatted phone number (e.g. +15555555555). |
fullName | String | (Optional) If not set, fullName will be set to the phoneNumber value. |
String | (Optional) |
Example Request Body:
{
"phoneNumber":"+15554442222",
"fullName":"John Doe",
"email": "john.doe@gmail.com"
}
Example Response Body:
Success - HTTP 200
{
"id": "xyzabc123"
"fullName": "John Doe"
"phoneNumber": "+15554442222"
"email": "john.doe@gmail.com"
}
Failure - HTTP 400
{
Get Contact
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}
GET - https://smpl-sms01.textable.app/api/contacts/{id}
Headers
Type | Value |
---|---|
Authorization |
|
Content-type | application/json |
Example Response Body:
Success - HTTP 200
{
"id": "xyzabc123"
"fullName": "John Doe"
"phoneNumber": "+15554442222"
"email": "john.doe@gmail.com"
}
Failure - HTTP 400
{
Get Contact List
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}
GET - https://smpl-sms01.textable.app/api/contacts
Headers
Type | Value |
---|---|
Authorization |
|
Content-type | application/json |
Example Response Body:
Success - HTTP 200
{
"contacts":[
{
"id": "xyzabc123"
"fullName": "John Doe"
"phoneNumber": "+15554442222"
"email": "john.doe@gmail.com"
},
...
]
}
Failure - HTTP 400
{
Get Drip Campaign List
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}
GET - https://smpl-sms01.textable.app/api/drips
Headers
Type | Value |
---|---|
Authorization |
|
Content-type | application/json |
Example Response Body:
Success - HTTP 200
{
"drips":[
{
"id": "xyzabc123"
"name": "Appointment Follow-Up"
"drips": [
{
"interval": 1,
"intervalType": "minutes", //options: minutes, hours, days
"message": "Hi [first], how are you today? I wanted to follow up about the house we looked at yesterday and see if you were interested in making an offer."
},
...
],
"created": "1600401008000" //timestamp in milliseconds
},
...
]
}
Failure - HTTP 400
{
Apply Drip Campaign to Contact
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}
POST - https://smpl-sms01.textable.app/api/contacts/{id}/drip
Headers
Type | Value |
---|---|
Authorization |
|
Content-type | application/json |
Example Request Body:
{
"dripCampaignId":"xyzabc123"
}
Example Response:
Success - HTTP 204 (No Content)
Failure - HTTP 400
{
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}