{"__v":3,"_id":"57395289e370590e0012e85e","category":{"__v":1,"_id":"548075cbe291c51a00e7e096","pages":["54807643e291c51a00e7e098"],"project":"542dbe0ecb19820800c1f4d7","version":"542ecc0a6b0eb6080066ca77","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-12-04T14:55:07.077Z","from_sync":false,"order":1,"slug":"overview","title":"REST API"},"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":"2016-05-16T04:54:33.956Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Interacting with Zang to perform all of your telephony needs is as simple as visiting a website. Experience with REST is useful when developing with Zang, but it is not required. We do our best to provide as much information needed for working with our REST API in our documentation. With so many possibilities and mash-up ideas, the sky is the limit to the things you can do using Zang's REST functionalities. Our REST API can initiate calls, buy phone numbers, send SMS messages, get detailed information about account activity, create conference calls, and much more! Dive into our documentation to learn about all of the capabilities our API can provide.\n[block:api-header]\n{\n  \"title\": \"Base URL\"\n}\n[/block]\nAll URLs for interacting with Zang have the following base URL:\n\n`https://api.zang.io/v2/`\n\nAppending the end of this base URL with different paths allows different types of interactions. HTTP methods like: GET, POST, or DELETE are used, along with a few parameters, to achieve the desired action or response from Zang.\n[block:api-header]\n{\n  \"title\": \"Authentication\"\n}\n[/block]\nHTTP requests to the Zang REST API are protected with HTTP Basic authentication. Your Account SID is the username and your AuthToken is the password for HTTP Basic authentication. These can be found in the Dashboard of your account. Do not share these with anyone!\n[block:api-header]\n{\n  \"title\": \"Making a Call\"\n}\n[/block]\nMaking a call can be done a couple of ways. The following steps explain how to make a call using our API Explorer:\n\n1. Go to your Dashboard\n2. Select Developers > API Explorer\n3. Select Calls > Make Call\n4. Enter a 'From' number. For this example, let's use 908-289-4888.\n5. Enter a 'To' number. For this example, enter your mobile number. \n6. Enter a URL. For this example, let's use `http://www.zang.io/ivr/welcome/call`. \n7. Click 'Make Request'.\n\nIf you have done this correctly, you will receive a call from 908-289-4888 and the following message will play when the call is answered: \n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<Response>\\n\\t<Say>Welcome to your new Zang Account.</Say>\\n\\t<Say voice=\\\"woman\\\">Let us know if we can help you in any way during your development.</Say>\\n</Response>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Sending an SMS\"\n}\n[/block]\nSending an SMS can be done a couple of ways. We'll show you how to send an SMS via our API Explorer and using cURL. To send an SMS using our API Explorer, follow these steps:\n\n1. Go to your Dashboard > Developers > API Explorer.\n2. Select SMS > Send SMS\n3. Select an SMS-enabled Zang number from the drop down menu under 'From'\n4. Enter a 'To' number. For this example, use your mobile phone number.\n5. Enter a 'Body'. For this example, let's use the following: Test from Zang!\n6. Click 'Make Request'.\n\nIf you have done this correctly, you will receive an SMS from one of your SMS-enabled Zang with the following message: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<Response>\\n\\t<Sms>Welcome to Zang! Let us know if we can help you in any way during your development.</Sms>\\n</Response>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Here's a helpful hint if you are making a call or sending an SMS using the API Explorer. Once you have completed steps 1 thru 6 from above for making a call or sending an SMS, scroll down to the cURL example before clicking on 'Make Request'. The cURL will be pre-populated with the appropriate parameters and authentication for you to use. Feel free to copy and paste this into your terminal to make a call or send an SMS using cURL.\",\n  \"title\": \"cURL\"\n}\n[/block]\nThat's all there is to it! Please check out the rest of the documentation and feel free to experiment. If you run into any issues, feel free to contact our support team: support:::at:::zang.io.","excerpt":"","slug":"overview","type":"basic","title":"Overview"}
Interacting with Zang to perform all of your telephony needs is as simple as visiting a website. Experience with REST is useful when developing with Zang, but it is not required. We do our best to provide as much information needed for working with our REST API in our documentation. With so many possibilities and mash-up ideas, the sky is the limit to the things you can do using Zang's REST functionalities. Our REST API can initiate calls, buy phone numbers, send SMS messages, get detailed information about account activity, create conference calls, and much more! Dive into our documentation to learn about all of the capabilities our API can provide. [block:api-header] { "title": "Base URL" } [/block] All URLs for interacting with Zang have the following base URL: `https://api.zang.io/v2/` Appending the end of this base URL with different paths allows different types of interactions. HTTP methods like: GET, POST, or DELETE are used, along with a few parameters, to achieve the desired action or response from Zang. [block:api-header] { "title": "Authentication" } [/block] HTTP requests to the Zang REST API are protected with HTTP Basic authentication. Your Account SID is the username and your AuthToken is the password for HTTP Basic authentication. These can be found in the Dashboard of your account. Do not share these with anyone! [block:api-header] { "title": "Making a Call" } [/block] Making a call can be done a couple of ways. The following steps explain how to make a call using our API Explorer: 1. Go to your Dashboard 2. Select Developers > API Explorer 3. Select Calls > Make Call 4. Enter a 'From' number. For this example, let's use 908-289-4888. 5. Enter a 'To' number. For this example, enter your mobile number. 6. Enter a URL. For this example, let's use `http://www.zang.io/ivr/welcome/call`. 7. Click 'Make Request'. If you have done this correctly, you will receive a call from 908-289-4888 and the following message will play when the call is answered: [block:code] { "codes": [ { "code": "<Response>\n\t<Say>Welcome to your new Zang Account.</Say>\n\t<Say voice=\"woman\">Let us know if we can help you in any way during your development.</Say>\n</Response>", "language": "xml" } ] } [/block] [block:api-header] { "title": "Sending an SMS" } [/block] Sending an SMS can be done a couple of ways. We'll show you how to send an SMS via our API Explorer and using cURL. To send an SMS using our API Explorer, follow these steps: 1. Go to your Dashboard > Developers > API Explorer. 2. Select SMS > Send SMS 3. Select an SMS-enabled Zang number from the drop down menu under 'From' 4. Enter a 'To' number. For this example, use your mobile phone number. 5. Enter a 'Body'. For this example, let's use the following: Test from Zang! 6. Click 'Make Request'. If you have done this correctly, you will receive an SMS from one of your SMS-enabled Zang with the following message: [block:code] { "codes": [ { "code": "<Response>\n\t<Sms>Welcome to Zang! Let us know if we can help you in any way during your development.</Sms>\n</Response>", "language": "xml" } ] } [/block] [block:callout] { "type": "info", "body": "Here's a helpful hint if you are making a call or sending an SMS using the API Explorer. Once you have completed steps 1 thru 6 from above for making a call or sending an SMS, scroll down to the cURL example before clicking on 'Make Request'. The cURL will be pre-populated with the appropriate parameters and authentication for you to use. Feel free to copy and paste this into your terminal to make a call or send an SMS using cURL.", "title": "cURL" } [/block] That's all there is to it! Please check out the rest of the documentation and feel free to experiment. If you run into any issues, feel free to contact our support team: support@zang.io.