{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"ac56a063-64ac-4328-bf90-ff563b79a558","name":"Cecula Sync","description":"The Cecula Sync API consists of a set of endpoints for sending SMS and Call communication through your dedicated SIM Hosted on the Cecula Sync Cloud or Self-Hosted on the Cecula Sync App.\n\n\n# Authentication\n\nEvery request to Cecula Sync Cloud API requires Authentication. The first steps to take will be to login to the Cecula Sync Platform and Generate your API Key.\n\nAn API Key encapsulates your credentials and your Dedicated number. Therefore, there will be no need to specify **originator** when sending a message, making a call or any other request.\n\nEach dedicated number you host on Cecula Sync Cloud requires a sperate API Key.\n\nAn API Key looks like this:\n>**CCL.BvDwEv6oQyq7-wT.390JYJYz8Y6NftIAgjLTPppW**\n\nTo use the API Key you set the Authorization headers like this:\n>**Authorization: Bearer CCL.BvDwEv6oQyq7-wT.390JYJYz8Y6NftIAgjLTPppW**\n\nAn attempt to make a request to a resource without providing authorization header or providing an invalid API Key will return HTTP **401 Unauthorized** error.\n\nAn API Key should be stored secretly within your application. If at any time you feel your API Key has been compromised, you should immediately login to the Cecula Sync Platform and generate a new API Key.\n\n\n\n# Setting Up WebHooks\n\nWebhooks are URLs where sms, calls logs and sms reports for your dedicated number will be sent. After you setup webhooks incoming resources for that number will be forwarded to the appropriate webhooks.\n\nAlthough there are API endpoints for fetching Sent SMS Status Report, Inbound SMS, Inbound Call Reports and Outbound Call Reports - it is by far more efficient to provide a webhook where Cecula Sync will forward resources as they become available.\n\nTo setup webhooks, Login to the [Cecula Sync Platform](https://cecula.com/sync/pf), navigate to **Settings** menu and click the __Webhooks__ tab.\n\n> For comprehensive guide (with examples and code snippets for your programming language) on How to Send SMS, Send Calls and other API Features, Refer to the [**API Reference**](#api-references) section.\n\n### Data Format For Each WebHook\n\nAll resources are sent as Input Streams in JSON format.\n\n\n#### Inbound SMS Format\n\n```json\n{\n    \"originator\":\"+2348183172770\",\n    \"receiver\":\"08176470634\",\n    \"message\":\"One love\",\n    \"timeReceived\":\"2020/02/01 07:37\"\n}\n```\n\n#### Sent SMS Report Format\n\n```json\n{\n    \"messageId\":\"16276\",\n    \"originator\":\"08176470634\",\n    \"receiver\":\"2348183172770\",\n    \"status\":\"DELIVERED\",\n    \"sendTime\":\"2020/02/01 07:37\",\n    \"doneTime\":\"2020/02/01 07:37\"\n}\n```\n\n#### Inbound Call Notification Format\n\n```json\n{\n    \"originator\":\"08183172770\",\n    \"receiver\":\"08176470634\",\n    \"callDuration\":\"0\",\n    \"callTime\":\"2020/02/02 01:08\"\n}\n```\n\n#### Outbound Call Status Format\n\n```json\n{\n    \"callId\":\"2020012445\",\n    \"originator\":\"08176470634\",\n    \"receiver\":\"+2348183172770\",\n    \"status\": \"ANSWERED\",\n    \"callTime\":\"2020/02/01 08:01\"\n}\n```\n\n  \n\n# Parameters\n\nThe table below defines the fields that are used on Cecula Sync API.\n\n#### Request Properties\n\nField | Data Type | Meaning\n---------|----------|---------\n receiver | String | The destination mobile number a call of sms will be terminated to\n recipients | String | The destination of mobile numbers a message will be terminated to. Multiple numbers should be seperated with comma (,) **Note:** Currently, multiple receivers only applies for sms.\n text | String | The body of the message to be sent or set in auto-responders. Text supports up to a maximum of 1530 characters.\n\n #### Response Properties\n\n Field | Data Type | Meaning\n---------|----------|---------\n receiver | String | The destination mobile number a call of sms will be terminated to\n recipient | String | The destination mobile number an sms will be (or was) terminated to\n message | String | The details of a returned statusCode\n reports | Array | An array of message recipients objects. Each object has two properties **recipient** and **trackingId**\n trackingId | Integer | A unique identifier assigned to a receiver for delivery tracking and reporting purpose\n originator | String | The number a call of message is sent from. Your dedicated number in the case of Outbound Call or SMS. The other party's number in the case of an Inbound Call or SMS.\n status | String | The state of a sent SMS or Call. See full list of statuses in the **Statuses** section\n statusCode | String | Some request like Message Sending return a code which notifies you of the issue with broadcast or if message was successfully sent\n callId | Integer | A unique identifier (similar to trackingId) assigned to a call **receiver** for tracking and reporting purpose.\n callTime | DateTime | The time when a call was initiated (for outbound call) or number received call request (For Inbound Call)\n callDuration | Integer | The length (in seconds) of an outbound or inbound call\n sendTime | DateTime | The time when a message was broadcasted\n doneTime | DateTime | The time when the final delivery report for message was received.\n timeReceived | DateTime | The time when an Inbound SMS is received\n balance | Double | Your Cecula Credit balance\n subscriptionStatus | String | The status of your subscription\n subscriptionPlan | String | The plan a your have subscribed to\n expiryDate | DateTime | The date when your subscription will expire\n\n\n\n# Errors\n\nErrors are Great. They make you see what's wrong with your integration. Errors are divided into HTTP Error and Sync Error. \n\n\n### HTTP Errors\n\nThe table below contains a list of other HTTP Errors you may encounter with the API.\n\nError Code | Short Message | Interpretation \n---------|----------|---------\n 415 | Unsupported Media Type | You have not set the Content-Type header to \"application/json\"\n 401 | Unauthorized | API Key was not provided. To clear this error, set Authorization Header to  Bearer {{your-api-key}}.\n 405 | Method Not Allowed | You are sending request with the wrong HTTP METHOD\n\n\n\n#### Sample HTTP Error Response\nHTTP Errors are returned as JSON objects with following structure\n\n```json\n{\n    \"errorCode\": 404,\n    \"errorMessage\": \"Requested resource not available or may have been moved\"\n}\n```\n\n\n ### Sync Errors\nSync Errors are returned when you encounter errors not related to your request but the content you have submitted to the API:\n\n Error Code | Short Message | Interpretation \n---------|----------|---------\n CE1000 | Empty Fields | One or more required fields have not been submitted or were sent empty\n CE1001 | Invalid Fields | One or more fields contains an invalid data type\n CE1100 | Invalid Field | The referenced field contains an invalid data type\n CE1102 | Invalid Field | The length of data is either too long or too short\n CE1103 | Unregistered Originator | The originator (numeric or alphanumeric) being used has not been registered\n CE1104 | Unapproved Originator | The originator (numeric or alphanumeric) being used is pending approval\n CE2000 | Service Suspended | Your Sync Cloud Subscription has expired.\n CE2001 | Service Barred | Hosted SIM is barred from sending message or making call\nCE3001  | Insufficient Credit | Insufficient credit on Cecula Account/Wallet\n\n#### Sample Sync Error Response\n\n```json\n{\n    \"code\": \"CE1100\",\n    \"error\": \"Invalid Receiver. Receiver should be of format +2348050209037\"\n}\n```\n\n# Statuses\n\nStatus Codes are codes returned when you query a Sync endpoint for Message or Call Status\n\n\n### SMS Statuses\n\nResponse | Interpretation \n---------|----------\n DELIVERED | Message has been delivered to receiver's device \n FAILED | Message could not be delivered to receiver's device \n EXPIRED | Message could not be delivered to receiver after 24 hours \n SENT | Message has been sent to telecoms network. Awaiting delivery confirmation \n QUEUED | Message has not been sent to Operator\n\n\n ### Call Statuses\n\n\nResponse | Interpretation\n---------|----------\n ANSWERED | Call was answered by the receiver \n NOT ANSWERED | Call was not answered by receiver\n\n\n\n\n# API References\n\nClick a reference folder from the left pane to expand.\n\n[Cecula Sync Platform]: https://cecula.com/sync/pf","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"3869433","team":704418,"collectionId":"ac56a063-64ac-4328-bf90-ff563b79a558","publishedId":"SWTHaaiY","public":true,"publicUrl":"https://api-reference.cecula.com","privateUrl":"https://go.postman.co/documentation/3869433-ac56a063-64ac-4328-bf90-ff563b79a558","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2021-09-02T15:55:34.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/e853d39d1a6432eda95ec3d4cb18d725df7fd730aedb876490c0eb3044641535","favicon":"https://res.cloudinary.com/postman/image/upload/v1581453865/team/envsyxnzhnnsmliyq9ka.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://api-reference.cecula.com/view/metadata/SWTHaaiY"}