{"info":{"_postman_id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","name":"ZeeBolt REST API Docs","description":"<html><head></head><body><h2 id=\"introduction\">INTRODUCTION</h2>\n<p>The ZeeBolt REST API allows <strong>users</strong> (registered with ZeeBolt Platform) to send messages (SMS), create Sender IDs, check Sender IDs, retrieve balance etc by integrating their application into our core <strong>API</strong>.</p>\n<p><strong>NB:</strong> To connect via our API, you must be registered on our ZeeBolt Platform (<a href=\"https://app.zeebolt.com/register\">https://app.zeebolt.com/register</a>)</p>\n<h2 id=\"base-url\">Base URL</h2>\n<p>All API requests points to our base URL below<br><a href=\"https://api.zeebolt.com/v1/\">https://api.zeebolt.com/v1/</a></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Our API endpoints requires a valid <strong>username</strong> and <strong>password</strong>, before service can be accessed. These credentials are sensitive and must not be shared, they are entered when registering with the <strong>ZeeBolt Platform</strong> (<a href=\"https://app.zeebolt.com/register\">https://app.zeebolt.com/register</a>).</p>\n<p><strong>NB:</strong> Username and password must be encoded in base64, check examples.</p>\n<h2 id=\"api-request\">API Request</h2>\n<p>All API resources are below</p>\n<ul>\n<li><p><strong>Send Message</strong></p>\n</li>\n<li><p><strong>Create Sender ID</strong></p>\n</li>\n<li><p><strong>Retrieve Sender ID</strong></p>\n</li>\n<li><p><strong>Balance</strong></p>\n</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"16168734","collectionId":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","publishedId":"TzeRpA8Z","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"15032b","highlight":"b70eb6"},"publishDate":"2021-06-10T17:58:06.000Z"},"item":[{"name":"Send Message","id":"9a37cedb-8b1b-4aa8-b9b9-062d3b1051e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"sender\":\"SenderI\",\r\n    \"message\":\"Message Payload\",\r\n    \"contact\":[\"contact1\",\"contact2\"]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.zeebolt.com/v1/send","description":"<p>This resource allows you to send messages to mobile numbers. <strong>Your balance must be enough for sending messages</strong>. Resource payload must be <strong>JSON</strong> formatted.</p>\n<p><strong>Required Params</strong></p>\n<p><em>sender, \nmessage, \ncontact (array of numbers)</em></p>\n<h4 id=\"example\">Example</h4>\n<p>Endpoint example in PHP below. <strong>Sender</strong> should be valid and approved to send a successful message.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">// Sending a message\n\n$data = [\n          \"sender\"=&gt;\"sender\",\n          \"message\"=&gt;\"message\",\n          \"contact\"=&gt;[\"contact1\",\"contact2\"]\n        ];\n\n$curl = curl_init();\n\n$username = \"yourusername\";\n$password = \"yourpassword\";\n\n$basic_auth =  'Basic ' . base64_encode($username . ':' . $password);\n\ncurl_setopt_array($curl, array(\n        CURLOPT_URL =&gt; \"https://api.zeebolt.com/v1/send\",\n        CURLOPT_RETURNTRANSFER =&gt; true,\n        CURLOPT_ENCODING =&gt; \"\",\n        CURLOPT_MAXREDIRS =&gt; 10,\n        CURLOPT_TIMEOUT =&gt; 30,\n        CURLOPT_CUSTOMREQUEST =&gt; \"POST\",\n        CURLOPT_POSTFIELDS =&gt; json_encode($data),\n        CURLOPT_HTTPHEADER =&gt; array(\n            \"Authorization: \".$basic_auth,\n            \"Cache-Control: no-cache\",\n            \"Content-Type: application/json\"\n        ),\n    ));\n\n$response = curl_exec($curl);\n$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\ncurl_close($curl);\n\n//$response = json_decode($response);\n\nif ($httpcode !== 200){\n    \n    echo \"Failed : ERROR :\".$httpcode.\", \".$response;\n}\n\nelse {\n\n   $response_data = json_decode($response,TRUE);\n   $status = $response_data[\"status\"];\n\n   if ($status == 200){\n       echo \"Success : \".$response_data[\"response\"].\", Description : \".$response_data[\"reason\"];\n   } \n\n   else if ($status == 400) {\n       echo \"Failed : \".$response_data[\"response\"].\", Description : \".$response_data[\"reason\"];\n   }\n\n  \n}\n\n</code></pre>\n<h4 id=\"sample-response\">Sample Response</h4>\n<p>For a successful request, sample responses are below</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">//success\n{ \n    \"status\":200,\n    \"response\": \"Accepted\",\n    \"batchid\": 11,\n    \"reason\":\"Message Accepted For Processing\"\n}\n\n// failed\n{ \n    \"status\":400,\n    \"response\": \"Rejected\",\n    \"reason\":\"Message Could not be sent\"\n}\n</code></pre>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","name":"ZeeBolt REST API Docs","type":"collection"}},"urlObject":{"protocol":"https","path":["v1","send"],"host":["api","zeebolt","com"],"query":[],"variable":[]}},"response":[{"id":"b6c6064c-d198-42b4-a6d6-cf9669ce5e61","name":"Send Message Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"Cache-Control","value":"no-cache","type":"text"},{"key":"Authorization","value":"Basic base64_encode(\"username:password\")","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"sender\":\"ZeeBolt\",\r\n    \"message\":\"Test Message \",\r\n    \"contact\":[\"0241026572\"]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.zeebolt.com/v1/send"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 10 Jun 2021 06:27:22 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Max-Age","value":"3600"},{"key":"Access-Control-Allow-Headers","value":"Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"response\": \"Accepted\",\n    \"batchid\": 47190908,\n    \"reason\": \"Accepted : Message Accepted For Processing\"\n}"}],"_postman_id":"9a37cedb-8b1b-4aa8-b9b9-062d3b1051e0"},{"name":"Send Message Using Username & Password","id":"61398bac-7675-4324-91f9-9265cad360e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"https://api.zeebolt.com/v1/sendmsg?username=user&password=pass&sender=ZeeBolt&message=Test Message&contact=0241026572, 0203723413","description":"<p>This resource allows you to send messages directly via link without using the <strong>authentication header</strong> in the request, hence username and password must be specified in the request link.</p>\n<p><strong>Required Params</strong></p>\n<p><em>username, \npassword, \nsender, \nmessage, \ncontact (separated with comma)</em></p>\n<h4 id=\"example\">Example</h4>\n<p>Endpoint example in PHP below. <strong>Sender</strong> should be valid and approved to send a successful message.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">// Sending a message\n\n$curl = curl_init();\n\n$username = \"yourusername\";\n$password = \"yourpassword\";\n$sender= \"ZeeBolt\";\n$contact = \"0241026572\";\n$message = \"message\";\n\n$params = 'username='.$username.'&amp;password='.$password.'&amp;sender='.$sender.'&amp;contact='.$contact.'&amp;message='.$message;\n\n\ncurl_setopt_array($curl, array(\n        CURLOPT_URL =&gt; \"https://api.zeebolt.com/v1/sendmsg?\".$params,\n        CURLOPT_RETURNTRANSFER =&gt; true,\n        CURLOPT_ENCODING =&gt; \"\",\n        CURLOPT_MAXREDIRS =&gt; 10,\n        CURLOPT_TIMEOUT =&gt; 30,\n        CURLOPT_HTTPHEADER =&gt; array(\n            \"Cache-Control: no-cache\",\n            \"Accept: application/json\"\n        ),\n    ));\n\n$response = curl_exec($curl);\n$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\ncurl_close($curl);\n\n//$response = json_decode($response);\n\nif ($httpcode !== 200){\n    \n    echo \"Failed : ERROR :\".$httpcode.\", \".$response;\n}\n\nelse {\n\n   $response_data = json_decode($response,TRUE);\n   $status = $response_data[\"status\"];\n\n   if ($status == 200){\n       echo \"Success : \".$response_data[\"response\"].\", Description : \".$response_data[\"reason\"];\n   } \n\n   else if ($status == 400) {\n       echo \"Failed : \".$response_data[\"response\"].\", Description : \".$response_data[\"reason\"];\n   }\n\n  \n}\n\n</code></pre>\n<h4 id=\"sample-response\">Sample Response</h4>\n<p>For a successful request, sample responses are below</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">//success\n{ \n    \"status\":200,\n    \"response\": \"Accepted\",\n    \"batchid\": 11,\n    \"reason\":\"Message Accepted For Processing\"\n}\n\n// failed\n{ \n    \"status\":400,\n    \"response\": \"Rejected\",\n    \"reason\":\"Message Could not be sent\"\n}\n</code></pre>\n","urlObject":{"protocol":"https","path":["v1","sendmsg"],"host":["api","zeebolt","com"],"query":[{"key":"username","value":"user"},{"key":"password","value":"pass"},{"key":"sender","value":"ZeeBolt"},{"key":"message","value":"Test Message"},{"key":"contact","value":"0241026572, 0203723413"}],"variable":[]}},"response":[{"id":"42eb0cd8-939b-4103-a621-d4370d6f30ab","name":"Send Message Using Username & Password Success","originalRequest":{"method":"GET","header":[{"key":"Accept","name":"Content-Type","value":"application/json","type":"text"},{"key":"Cache-Control","value":"no-cache","type":"text"}],"url":{"raw":"https://api.zeebolt.com/v1/sendmsg?username=user&password=pass&sender=ZeeBolt&message=Test Message&contact=0241026572, 0203723413","protocol":"https","host":["api","zeebolt","com"],"path":["v1","sendmsg"],"query":[{"key":"username","value":"user"},{"key":"password","value":"pass"},{"key":"sender","value":"ZeeBolt"},{"key":"message","value":"Test Message"},{"key":"contact","value":"0241026572, 0203723413"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"response\": \"Accepted\",\n    \"batchid\": 69450124,\n    \"reason\": \"Accepted : Message Accepted For Processing\"\n}"}],"_postman_id":"61398bac-7675-4324-91f9-9265cad360e9"},{"name":"Balance","id":"7334f72c-cbbc-4aad-9410-385dd3c4c5aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.zeebolt.com/v1/balance","description":"<p>This endpoint allows users to check their balance.</p>\n<h4 id=\"example\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">// Retrieving balance\n\n$curl = curl_init();\n\n$username = \"yourusername\";\n$password = \"yourpassword\";\n\n$basic_auth =  'Basic ' . base64_encode($username . ':' . $password);\n\ncurl_setopt_array($curl, array(\n        CURLOPT_URL =&gt; \"https://api.zeebolt.com/v1/balance\",\n        CURLOPT_RETURNTRANSFER =&gt; true,\n        CURLOPT_ENCODING =&gt; \"\",\n        CURLOPT_MAXREDIRS =&gt; 10,\n        CURLOPT_TIMEOUT =&gt; 30,\n        CURLOPT_CUSTOMREQUEST =&gt; \"GET\",\n        CURLOPT_HTTPHEADER =&gt; array(\n            \"Authorization: \".$basic_auth,\n            \"Cache-Control: no-cache\",\n            \"Content-Type: application/json\"\n        ),\n    ));\n\n$response = curl_exec($curl);\n$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\ncurl_close($curl);\n\n//$response = json_decode($response);\n\nif ($httpcode !== 200){\n\n    echo \"Failed : ERROR :\".$httpcode.\", \".$response;\n}\n\nelse {\n\n   $response_data = json_decode($response,TRUE);\n   $status = $response_data[\"status\"];\n\n   if ($status == 200){\n       echo \"Bundles : \".$response_data[\"reason\"].\", validity : \".$response_data[\"response\"].\", ID : \".$response_data[\"id\"].\", Sender : \".$response_data[\"senderid\"];\n   } \n\n   else if ($status == 400) {\n       echo \"Failed : \".$response_data[\"response\"];\n   }\n\n\n}\n</code></pre>\n<h4 id=\"sample-response\">Sample Response</h4>\n<p>Retrieving Bundle Balance. To top up bundles go to bundles section on (<a href=\"https://app.zeebolt.com/\">https://app.zeebolt.com/</a>)</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"status\": 200,\n    \"bundles\": 900,\n    \"used\": \"100\",\n    \"topup\": \"30.00\",\n    \"topbundle\": \"1000\"\n}\n</code></pre>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","name":"ZeeBolt REST API Docs","type":"collection"}},"urlObject":{"protocol":"https","path":["v1","balance"],"host":["api","zeebolt","com"],"query":[],"variable":[]}},"response":[{"id":"45769f2b-7ce7-4b78-80e6-25dcbbcd0a10","name":"Balance","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text","description":"Content should be JSON Formatted"},{"key":"Accept","value":"application/json","type":"text","description":"Accept data in JSON Format"},{"key":"Cache-Control","value":"no-cache","type":"text","description":"no caching "},{"key":"Authorization","value":"Basic base64_encode(\"username:password\")","type":"text","description":"Authorization is basic auth of username and password."}],"url":"https://api.zeebolt.com/v1/balance"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 10 Jun 2021 06:19:20 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Max-Age","value":"3600"},{"key":"Access-Control-Allow-Headers","value":"Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"bundles\": 960,\n    \"used\": \"7206\",\n    \"topup\": \"8166\",\n    \"topbundle\": 244.98\n}"}],"_postman_id":"7334f72c-cbbc-4aad-9410-385dd3c4c5aa"},{"name":"Create Sender ID","id":"be72c4c3-be1e-41c2-90a8-eb554dc4f4f0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"sender\":\"Sender\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.zeebolt.com/v1/createid","description":"<p>This endpoint is used to create Sender IDs for sending messages. </p>\n<p><strong>NB:</strong> Sender IDs are subject to <strong>review</strong>. May be approved or rejected. <strong>Sender ID</strong> must not be more than <strong>11 Characters</strong>, and should not contain <strong>special characters</strong> eg : **%#-(&amp;^* etc. </p>\n<p><strong>NB:</strong> Keep <strong>ID</strong> (id generated after creating a senderID) safe. It will be used for retrieving information via the <strong>retrieveid API endpoint</strong>. </p>\n<h4 id=\"example\">Example</h4>\n<p>Endpoint example in PHP below. </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">// Creating a sender ID\n\n$data = [\n          \"sender\"=&gt;\"senderID\"\n        ];\n\n$curl = curl_init();\n\n$username = \"yourusername\";\n$password = \"yourpassword\";\n\n$basic_auth =  'Basic ' . base64_encode($username . ':' . $password);\n\ncurl_setopt_array($curl, array(\n        CURLOPT_URL =&gt; \"https://api.zeebolt.com/v1/send\",\n        CURLOPT_RETURNTRANSFER =&gt; true,\n        CURLOPT_ENCODING =&gt; \"\",\n        CURLOPT_MAXREDIRS =&gt; 10,\n        CURLOPT_TIMEOUT =&gt; 30,\n        CURLOPT_CUSTOMREQUEST =&gt; \"POST\",\n        CURLOPT_POSTFIELDS =&gt; json_encode($data),\n        CURLOPT_HTTPHEADER =&gt; array(\n            \"Authorization: \".$basic_auth,\n            \"Cache-Control: no-cache\",\n            \"Content-Type: application/json\"\n        ),\n    ));\n\n$response = curl_exec($curl);\n$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\ncurl_close($curl);\n\n//$response = json_decode($response);\n\nif ($httpcode !== 200){\n\n    echo \"Failed : ERROR :\".$httpcode.\", \".$response;\n}\n\nelse {\n\n   $response_data = json_decode($response,TRUE);\n   $status = $response_data[\"status\"];\n\n   if ($status == 200){\n       echo \"Success : \".$response_data[\"reason\"].\", validity : \".$response_data[\"validity \"].\", ID : \".$response_data[\"ID\"];\n   } \n\n   else if ($status == 400) {\n       echo \"Failed : \".$response_data[\"response\"];\n   }\n\n\n}\n\n</code></pre>\n<h4 id=\"sample-response\">Sample Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>//success\n{\n    \"status\": 200,\n    \"response\": \"Created Successfully\",\n    \"validity\": \"Pending\",\n    \"ID\": \"5\"\n}\n\n//fail\n{\n    \"status\": 400,\n    \"response\": \"SenderID Sender already exist.\"\n}\n</code></pre>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","name":"ZeeBolt REST API Docs","type":"collection"}},"urlObject":{"protocol":"https","path":["v1","createid"],"host":["api","zeebolt","com"],"query":[],"variable":[]}},"response":[{"id":"1e8304c5-f1e0-4fc6-ae3c-a99b62a5f504","name":"Create Sender ID Exist","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"Cache-Control","value":"no-cache","type":"text"},{"key":"Authorization","value":"Basic base64_encode(\"username:password\")","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"sender\":\"Sender\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.zeebolt.com/v1/createid"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 10 Jun 2021 06:22:42 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Max-Age","value":"3600"},{"key":"Access-Control-Allow-Headers","value":"Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 400,\n    \"response\": \"SenderID Sender already exist.\"\n}"},{"id":"c4e0dabe-4999-4d69-b7bd-1336f8410491","name":"Create Sender ID Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"Cache-Control","value":"no-cache","type":"text"},{"key":"Authorization","value":"Basic base64_encode(\"username:password\")","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"sender\":\"Sender\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.zeebolt.com/v1/createid"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 10 Jun 2021 06:23:39 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Max-Age","value":"3600"},{"key":"Access-Control-Allow-Headers","value":"Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"response\": \"Created Successfully\",\n    \"validity\": \"Pending\",\n    \"ID\": \"100\"\n}"}],"_postman_id":"be72c4c3-be1e-41c2-90a8-eb554dc4f4f0"},{"name":"Retrieve Sender ID","id":"91fdc6a6-6657-4d73-bbce-e13cb4c34684","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.zeebolt.com/v1/retrieveid/{id}","description":"<p>This endpoint allow users retrieve their <strong>Sender ID</strong> status.</p>\n<p><strong>NB:</strong> This endpoint uses <strong>ID</strong> to retrieve the <strong>Sender ID</strong> information. An example request will look like <code>https://api.zeebolt.com/v1/retrieveid/10</code>, thus retrieve information from <strong>id</strong> 10.</p>\n<h4 id=\"example\">Example</h4>\n<p>Endpoint example in PHP below. </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">\n// Retrieving a sender ID\n\n// ID of the SenderName\n$id = 5;\n\n$curl = curl_init();\n\n$username = \"yourusername\";\n$password = \"yourpassword\";\n\n$basic_auth =  'Basic ' . base64_encode($username . ':' . $password);\n\ncurl_setopt_array($curl, array(\n        CURLOPT_URL =&gt; \"https://api.zeebolt.com/v1/retrieveid/\".$id,\n        CURLOPT_RETURNTRANSFER =&gt; true,\n        CURLOPT_ENCODING =&gt; \"\",\n        CURLOPT_MAXREDIRS =&gt; 10,\n        CURLOPT_TIMEOUT =&gt; 30,\n        CURLOPT_CUSTOMREQUEST =&gt; \"GET\",\n        CURLOPT_HTTPHEADER =&gt; array(\n            \"Authorization: \".$basic_auth,\n            \"Cache-Control: no-cache\",\n            \"Content-Type: application/json\"\n        ),\n    ));\n\n$response = curl_exec($curl);\n$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\ncurl_close($curl);\n\n//$response = json_decode($response);\n\nif ($httpcode !== 200){\n\n    echo \"Failed : ERROR :\".$httpcode.\", \".$response;\n}\n\nelse {\n\n   $response_data = json_decode($response,TRUE);\n   $status = $response_data[\"status\"];\n\n   if ($status == 200){\n       echo \"Success : \".$response_data[\"reason\"].\", validity : \".$response_data[\"response\"].\", ID : \".$response_data[\"id\"].\", Sender : \".$response_data[\"senderid\"];\n   } \n\n   else if ($status == 400) {\n       echo \"Failed : \".$response_data[\"response\"];\n   }\n\n\n}\n\n</code></pre>\n<h4 id=\"sample-response\">Sample Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>//success\n{\n    \"status\": 200,\n    \"response\": \"Active\",\n    \"senderid\": \"Sender\",\n    \"id\": 1\n}\n\n{\n    \"status\": 200,\n    \"response\": \"Pending\",\n    \"senderid\": \"Sender2\",\n    \"id\": 10\n}\n\n{\n    \"status\": 200,\n    \"response\": \"Rejected\",\n    \"senderid\": \"Sender3\",\n    \"id\": 5\n}\n\n// fail\n{\n    \"status\": 400,\n    \"response\": \"Sender is invalid\"\n}\n\n</code></pre>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","name":"ZeeBolt REST API Docs","type":"collection"}},"urlObject":{"protocol":"https","path":["v1","retrieveid","{id}"],"host":["api","zeebolt","com"],"query":[],"variable":[]}},"response":[{"id":"be606016-f876-4a61-8733-796727218ac1","name":"Retrieve Sender ID","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"Cache-Control","value":"no-cache","type":"text"},{"key":"Authorization","value":"Basic base64_encode(\"username:password\")","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.zeebolt.com/v1/retrieveid/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 10 Jun 2021 06:21:32 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Max-Age","value":"3600"},{"key":"Access-Control-Allow-Headers","value":"Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"response\": \"Active\",\n    \"senderid\": \"Sender\",\n    \"id\": \"1\"\n}"}],"_postman_id":"91fdc6a6-6657-4d73-bbce-e13cb4c34684"},{"name":"Response & Error Codes","id":"231144bd-6f53-412c-8cc4-2a29173cae3b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"LINK","header":[],"description":"<h4 id=\"http-status-codes\">HTTP Status Codes</h4>\n<p>All HTTP Status codes of <strong>ZeeBolt API</strong></p>\n<table>\n<thead>\n   <th>HTTP Status Code</th>\n   <th>Description</th>\n</thead>\n<tbody>\n   <tr>\n      <td>200</td>\n      <td>Request Successful</td>\n   </tr>\n   <tr>\n      <td>201</td>\n      <td>Resource Created</td>\n   </tr>\n   <tr>\n      <td>400</td>\n      <td>Bad Request</td>\n   </tr>\n   <tr>\n      <td>401</td>\n      <td>Unauthorized</td>\n   </tr>\n   <tr>\n      <td>403</td>\n      <td>Forbidden</td>\n   </tr>\n   <tr>\n      <td>404</td>\n      <td>Not Found</td>\n   </tr>\n   <tr>\n      <td>500</td>\n      <td>Internal Server Error</td>\n   </tr>\n   <tr>\n      <td>503</td>\n      <td>Server Unavailable.</td>\n   </tr>\n</tbody>\n</table>\n\n\n<h4 id=\"response-codes\">Response Codes</h4>\n<p>All responses from <strong>ZeeBolt API request</strong>.</p>\n<table>\n<thead>\n   <th>Response Code</th>\n   <th>Description</th>\n</thead>\n<tbody>\n   <tr>\n      <td>200</td>\n      <td>Successful</td>\n   </tr>\n   <tr>\n      <td>400</td>\n      <td>Failure</td>\n   </tr>\n   <tr>\n      <td>300</td>\n      <td>Warning</td>\n   </tr>\n   <tr>\n      <td>500</td>\n      <td>Invalid</td>\n   </tr>\n</tbody>\n</table>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","id":"08f150ce-6897-40ea-a64d-8e0c0dba9c82","name":"ZeeBolt REST API Docs","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"231144bd-6f53-412c-8cc4-2a29173cae3b"}],"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]}},"event":[{"listen":"prerequest","script":{"id":"836ae16b-4ea1-43fc-824a-2e0b5126c0f1","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"195d5254-cc16-4212-8fdc-8cb524482138","type":"text/javascript","exec":[""]}}]}