This API method is used to create and send a text message to a contact or multiple contacts. You can also send a text message to a tag that has a set number of contacts. Limitations: a. Free Plan: 50 messages per month. (API valid for 1 month) b. Paid Plan ($9 per month): 300 messages per month. (API valid for 1 month)
Parameter | Required | Type | Description |
---|---|---|---|
apikey | yes | string | Your authorized API key |
secret | yes | string | Your authorized secret key |
user_id | yes | string | Unique ID of the user |
business_id | yes | string | Unique ID of the business |
text_message | yes | number | Content of the message |
Tags | no | string | Unique ID of the tags |
contacts | no | string | Unique ID of the contacts |
phone_number | no | number | recipient phone number |
scheduled_date | no | string | Set the date and time for scheduled the message.Format should be like this "04-11-2018 13:00" |
draft | no | string | The draft value must be "yes" if the user wants to save the text. Draft value must be 'No" if the user wants to send a saved content |
attachment_url | no | string | If you want send a attachment to the contact then you can set the value as "true" |
unique_id | no | string | If you want send a attachment to the contact then you can set the value as "unique_id" |
{ "status": "success", "status_code": 200, "message": "Your message has been sent", "result": { "_id": "xxxxxxxxxxxxxxxxxxxx", "status": "process" } }
Error Code | Description |
---|---|
701 | User id parameter required |
702 | User id is required |
701 | Business id parameter required |
702 | Business id required |
610 | Invalid user id |
610 | Invalid business id |
613 | Invalid user and business |
702 | Tags, contact id or phone number is required |
720 | Invalid Phone Number |
730 | A valid UTC date format is required |
732 | Date range required |
753 | Text Length exceeded |
780 | Invalid draft value |
802 | tag_not_found |
780 | tiecoins value mismatch |
{ "error": { "reason": "parameter missing", "message": "User id parameter required", "field_name": "user_id", "code": 701, "error_type": "missing_parameter" } }
{ "error": { "reason": "required field", "message": "User id is required", "code": 702, "error_type": "required" } }
{ "error": { "reason": "parameter missing", "message": "Business id parameter required", "field_name": "business_id", "code": 701, "error_type": "missing_parameter" } }
{ "error": { "reason": "required field", "message": "Business id required", "code": 702, "error_type": "required" } }
{ "error": { "errors": [ { "reason": "Invalid Id", "message": "Please make sure you have provided the valid user id" } ], "code": 610, "error_type": "reference_error" } }
{ "error": { "errors": [ { "reason": "Invalid Id", "message": "Please make sure you have provided the valid business id" } ], "code": 610, "error_type": "reference_error" } }
{ "error": { "errors": [ { "reason": "Invalid user and business", "message": "The business and user id combination that you provided doesn't match in our record" } ], "code": 613, "error_type": "invalid_user_business" } }
{ "error": { "errors": [ { "reason": "required field", "message": "Tag name required" } ], "code": 702, "error_type": "required" } }
{ "error": { "errors": [ { "reason": "Invalid Phone", "message": "A valid phone number is required." } ], "code": 720, "error_type": "invalid_phone_number", "number_format": "+1-415123456" } }
{ "error": { "errors": [ { "reason": "Invalid date", "message": "A valid UTC date format is required", "date_format": "mm/dd/yyyy hh:mm", "date_example": "01-01-1970 23:00" } ], "code": 730, "error_type": "invalid_date" } }
{ "error": { "errors": [ { "reason": "Date range required", "message": "The date range must be greater then 10 minutes from current date" } ], "code": 732, "error_type": "date_range" } }
{ "error": { "errors": [ { "reason": "Length exceeded", "message": "Text length must be greater the or equal to 160" } ], "code": 753, "error_type": "length_exceeded" } }
{ "error": { "errors": [ { "reason": "Mismatched value", "message": "Save as draft please provide draft=yes" } ], "code": 780, "error_type": "value_mismatch" } }
{ "error": { "errors": [ { "reason": "Invalid Tags", "message": "Tag id(s) that you provided doesn't match in our records." } ], "code": 802, "error_type": "tag_not_found" } }
{ "error": { "reason": "Mismatched value", "message": "Invalid type provided, the tiecoins type must be (yes or no)", "code": 780, "error_type": "value_mismatch" } }
Loading please wait...