Sending an SMS

SMS

POST https://api.opentact.org/rest/sms

This will send an SMS.

Headers

Name
Type
Description

Content-Type

string

application/json

Authorization

string

JWT or Bearer

Request Body

Name
Type
Description

to

string

>=3

tn

integer

telephone number entity

message

string

[1 .. 918] characters

custom_callback_url

string

[ 10 .. 255 ] characters URL override for messaging profile callback url's

{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "tn": {},
    "to": "string",
    "thread": "string",
    "message": "string",
    "reference_id": "string",
    "state": "created",
    "delivered": true,
    "automated": true,
    "custom_callback_url": "string",
    "account": {},
    "created_by": {}
  }
}

Code Example

curl -X POST "https://api.opentact.org/rest/sms" \
-H  "accept: application/json" \
-H  "X-Auth-Token: JWT_TOKEN" \
-H  "Content-Type: application/json" \
-d "{\"to\":\"J Smith\",\"tn\":12013046585,\"message\":\"test message\",\"custom_callback_url\":\"https://endpoint"}"

Last updated

Was this helpful?