{"__v":4,"_id":"544695e23168910800744da6","category":{"__v":3,"_id":"5446952b82bd7e08002768a0","pages":["544695e23168910800744da6","54480ac80319802200fc0761","5446bf6dae0040140035fa42"],"project":"542dbe0ecb19820800c1f4d7","version":"542ecc0a6b0eb6080066ca77","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-21T17:17:31.699Z","from_sync":false,"order":3,"slug":"sms","title":"SMS"},"editedParams":true,"editedParams2":true,"is_link":false,"parentDoc":null,"project":"542dbe0ecb19820800c1f4d7","user":"542dc547cb19820800c1f4f1","version":{"__v":31,"_id":"542ecc0a6b0eb6080066ca77","forked_from":"542dbe0fcb19820800c1f4da","project":"542dbe0ecb19820800c1f4d7","createdAt":"2014-10-03T16:17:14.165Z","releaseDate":"2014-10-03T16:17:14.165Z","categories":["542ecc0a6b0eb6080066ca78","542ef44f6b0eb6080066cb24","543bf3e22a30961a00b66eb3","5446952b82bd7e08002768a0","544821ae8d7af31a00dd41ce","544a7885f1aefa08006efc69","544c758e11845f0e001ed8de","544e5565b80812080035be55","544e558dbd51b9080037f8ca","5450b045a66f020800dba73d","5450eb6aa66f020800dba945","5450f39ea66f020800dba989","5450f877a66f020800dba9cf","54510356a66f020800dbaa17","5451274514af501a00b50c99","54513345a66f020800dbab24","54513cc014af501a00b50d24","54515eec14af501a00b50db9","54519b1d14af501a00b50ea9","54519b2aa66f020800dbacb4","54524f9704160008005b1d27","54538d2308d1800800473d95","54538d420c09721000a06a03","54538e5608d1800800473d9a","5453ea9547c30114004fb375","5453eb12b077c31c00067bcb","5453eb27b077c31c00067bcd","5453ed5db077c31c00067bde","548075cbe291c51a00e7e096","5922fa475c48c70f00f21453","59244fd41e32eb190028ad8d"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-21T17:20:34.341Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"basic_auth":true,"examples":{"codes":[]},"method":"post","results":{"codes":[{"language":"json","code":"{\n    \"api_version\": \"v2\",\n    \"sid\": \"{SmsSid}\",\n    \"account_sid\": \"{AccountSid}\",\n    \"date_created\": \"Tue, 24 Jul 2012 14:08:23 +0000\",\n    \"date_updated\": \"Tue, 24 Jul 2012 14:08:24 +0000\",\n    \"date_sent\": \"Tue, 24 Jul 2012 14:08:24 +0000\",\n    \"to\": \"+17325551234\",\n    \"from\": \"+14245551234\",\n    \"body\": \"Test message sent from TelAPI!\",\n    \"status\": \"sent\",\n    \"direction\": \"outbound-api\",\n    \"price\": \"0.070000\",\n    \"uri\": \"/v2/Accounts/AC5521767e53d04deeb0a06f660cee50f9/SMS/Messages/{SmsSid}.json\"\n}","name":"Success"},{"language":"json","code":"{\n    \"status\": 404,\n    \"message\": \"The requested resource was not found: /v2/Accounts/bad/bad_response.json\"\n}","name":"Failure","status":404}]},"settings":"","try":true,"auth":"required","params":[{"_id":"5446970f3168910800744dad","ref":"","in":"path","required":true,"desc":"Account SID.","default":"","type":"string","name":"AccountSid"},{"_id":"5446970f3168910800744dac","ref":"","in":"body","required":true,"desc":"Must be an SMS capable number. The value does not have to be in any specific format.","default":"","type":"string","name":"To"},{"_id":"5446970f3168910800744daa","ref":"","in":"body","required":true,"desc":"Text of the SMS to be sent.","default":"","type":"string","name":"Body"},{"_id":"5446970f3168910800744dab","ref":"","in":"body","required":false,"desc":"Must be a Zang number associated with your account. The value does not have to be in any specific format.","default":"","type":"string","name":"From"},{"_id":"5446970f3168910800744da9","ref":"","in":"body","required":false,"desc":"The URL that will be sent information about the SMS. Url length is limited to 200 characters.","default":"","type":"string","name":"StatusCallback"},{"_id":"5446970f3168910800744da8","ref":"","in":"body","required":false,"desc":"The HTTP method used to request the StatusCallback. Valid parameters are GET and POST.","default":"POST","type":"string","name":"StatusCallbackMethod"},{"_id":"54d28d742ce0e00d00751579","ref":"","in":"body","required":false,"desc":"If the Body length is greater than 160 characters, the SMS will be sent as a multi-part SMS. Allowed values are True or False.","default":"False","type":"string","name":"AllowMultiple"}],"url":"/v2/Accounts/{AccountSid}/SMS/Messages.json"},"isReference":false,"order":0,"body":"# **Response Parameters**\n\nResponse parameters are equal to those on [\"View SMS\" API call](/v2/docs/view-sms).\n\n# **Example cURL**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST 'https://api.zang.io/v2/Accounts/{AccountSid}/SMS/Messages.json' -u '{AccountSid}:{AuthToken}' -d 'To=XXX-XXX-XXXX&From=XXX-XXX-XXXX&Body=This is an SMS sent from Zang'\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nHere's a breakdown of the cURL request:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"\\\"https://api.zang.io/v2/Accounts/{AccountSid}/SMS/Messages\\\"\",\n    \"0-1\": \"This is the base URL where you send the request to. Note that there is **{AccountSid}** in this URL. You must change this to reflect your Account SID, which can be found in your Dashboard. Make sure to remove the curly braces as they are just place holders in this example.\",\n    \"1-0\": \"-u \\\"{AccountSid}:{AuthToken}\\\"\",\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Explanation\",\n    \"2-0\": \"\\\"To=19081523462&From=19087465123&Body=My First SMS!\\\"\",\n    \"2-1\": \"This is the meat of your SMS. The 'To' will contain your destination number. The 'From' will contain your SMS-enabled Zang number. The 'Body' will contain your message.\",\n    \"1-1\": \"This is used for authentication. You must change **{AccountSID}** to reflect your Account SID which can be found in your Dashboard. You must also change **{AuthToken}** to reflect your AuthToken which can be found in your Dashboard as well. Make sure to remove the curly braces as they are just place holders in this example.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]","excerpt":"sends SMS message","slug":"send-sms","type":"endpoint","title":"Send SMS"}

postSend SMS

sends SMS message

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

AccountSid:
required
string
Account SID.

Body Params

To:
required
string
Must be an SMS capable number. The value does not have to be in any specific format.
Body:
required
string
Text of the SMS to be sent.
From:
string
Must be a Zang number associated with your account. The value does not have to be in any specific format.
StatusCallback:
string
The URL that will be sent information about the SMS. Url length is limited to 200 characters.
StatusCallbackMethod:
stringPOST
The HTTP method used to request the StatusCallback. Valid parameters are GET and POST.
AllowMultiple:
stringFalse
If the Body length is greater than 160 characters, the SMS will be sent as a multi-part SMS. Allowed values are True or False.

Result Format


Documentation

# **Response Parameters** Response parameters are equal to those on ["View SMS" API call](/v2/docs/view-sms). # **Example cURL** [block:code] { "codes": [ { "code": "curl -X POST 'https://api.zang.io/v2/Accounts/{AccountSid}/SMS/Messages.json' -u '{AccountSid}:{AuthToken}' -d 'To=XXX-XXX-XXXX&From=XXX-XXX-XXXX&Body=This is an SMS sent from Zang'", "language": "shell" } ] } [/block] Here's a breakdown of the cURL request: [block:parameters] { "data": { "0-0": "\"https://api.zang.io/v2/Accounts/{AccountSid}/SMS/Messages\"", "0-1": "This is the base URL where you send the request to. Note that there is **{AccountSid}** in this URL. You must change this to reflect your Account SID, which can be found in your Dashboard. Make sure to remove the curly braces as they are just place holders in this example.", "1-0": "-u \"{AccountSid}:{AuthToken}\"", "h-0": "Parameter", "h-1": "Explanation", "2-0": "\"To=19081523462&From=19087465123&Body=My First SMS!\"", "2-1": "This is the meat of your SMS. The 'To' will contain your destination number. The 'From' will contain your SMS-enabled Zang number. The 'Body' will contain your message.", "1-1": "This is used for authentication. You must change **{AccountSID}** to reflect your Account SID which can be found in your Dashboard. You must also change **{AuthToken}** to reflect your AuthToken which can be found in your Dashboard as well. Make sure to remove the curly braces as they are just place holders in this example." }, "cols": 2, "rows": 3 } [/block]