{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"1a10aed2-1cc7-473d-9676-e81fc4a39861","name":"Spryng Simple API (Documentation)","description":"# 1\\. Authorization\n\nYou can use your _secret_ earlier provided by Spryng\n\n# 2\\. Rate Limits\n\nAPI access rate limits are applied at a per-key basis in unit time. Access to the API using a key is limited to 1200 requests per minute. This is a **hard limit**. If you need more please implement our [REST JSON API docs](https://docs.spryngsms.com/).\n\nOnce you hit the rate limit, you will receive an HTTP error `429 Too Many Requests`.\n\n# 3\\. HTTP Status Codes\n\n## 3.1 HTTP Statuses\n\nThe API returns an HTTP status and code each time a request is made. The following HTTP status codes are used by our Simple API. Additional codes might be added in the future and if you encounter a code not in this list please consult the HTTP specification for a definition.\n\n| Status                    | Description                                                                                                            |\n| ------------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n| 200 OK                    | The request was successful.                                                                                            |\n| 401 Unauthorized          | Authentication token is invalid                                                                                        |\n| 404 Not Found             | The path is invalid or no resource exists with the given ID.                                                           |\n| 405 Method Not Allowed    | The path is valid but not for this method.                                                                             |\n| 422 Unprocessable Entity  | The request has missing or invalid parameters.                                                                         |\n| 429 Too Many Requests     | The user or path has too many outstanding requests.                                                                    |\n| 500 Internal Server Error | An unexpected internal error occurred and the request was not processed.                                               |\n| 503 Service Unavailable   | The service is unable to perform the request at this point. Most likely due to a required subsystem being unavailable. |\n\n# 4\\. Character Sets\n\n### 4.1 GSM 03.38 Character Set\n\nThe simple API only allows the `plain` encoding which are only _GSM 03.38 basic characters_. It allows allows you to send up to 160 characters per SMS message. Below a table of all available characters in the GSM 03.38 basic characters.\n\n|     |     |     |     |     |     |     |     |     |     |     |     |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| @   | Δ   | SP  | Ø   | ,   | 0   | A   | K   | V   | a   | l   | w   |\n| £   | _   | !   | ø   | \\-  | 1   | B   | L   | W   | b   | m   | x   |\n| $   | Φ   | \"   | CR  | .   | 2   | C   | M   | X   | c   | n   | y   |\n| ¥   | Γ   | #   | Å   | /   | 3   | D   | N   | Y   | d   | o   | z   |\n| è   | Λ   | ¤   | å   | ;   | 4   | E   | O   | Z   | e   | p   | ä   |\n| é   | Ω   | %   | ESC | <   | 5   | F   | P   | Ä   | f   | q   | ö   |\n| ù   | Π   | &   | Æ   | \\=  | 6   | G   | Q   | Ö   | g   | r   | ñ   |\n| ì   | Ψ   | '   | æ   | \\>  | 7   | H   | R   | Ñ   | h   | s   | ü   |\n| ò   | Σ   | (   | ß   | ?   | 8   | I   | S   | Ü   | i   | t   | à   |\n| Ç   | Θ   | )   | É   | ¡   | 9   | J   | T   | §   | j   | u   | ¿   |\n| LF  | Ξ   | \\*  | +   | :   |     | K   | U   |     | k   | v   |     |\n\n`LF` is the Line Feed character - for JSON format, enter this as `\\n`\n\n`SP` is the Space character\n\n### 4.2 Extended Character Set\n\nThe following characters are also available, but they take up two characters in the SMS message instead of one.\n\n`|` , `^` , `€` , `{` , `}` , `[` , `]` , `~` , `\\`\n\n### 4.3 Unicode Character Set\n\nIf you require to sent other characters than shown above you'll have to use the **unicode** encoding type. You achieve this by setting the `encoding` value to either `auto` or `unicode`.  \nUnicode allows you to sent up to 70 characters per SMS message.\n\n### 4.4 Long Messages\n\nThe message body in a batch request can contain up to 4 messages. Depending on the characters used in the message, this will equate to the following numbers of SMS messages.\n\n#### 4.4.1 Plain encoded message:\n\n| Message Length | Number of SMS Parts |\n| -------------- | ------------------- |\n| 1 - 160        | 1                   |\n| 161 - 306      | 2                   |\n| 307 - 459      | 3                   |\n| 460 - 612      | 4                   |\n| 613 - 765      | 5                   |\n| 766 - 918      | 6                   |\n| 919 - 1071     | 7                   |\n| 1072 - 1224    | 8                   |\n| 1225 - 1377    | 9                   |\n| 1378 - 1530    | 10                  |\n\n#### 4.4.2 Unicode encoded message:\n\n| Message Length | Number of SMS Parts |\n| -------------- | ------------------- |\n| 1 - 70         | 1                   |\n| 71 - 134       | 2                   |\n| 135 - 201      | 3                   |\n| 202 - 268      | 4                   |\n| 269 - 335      | 5                   |\n| 336 - 402      | 6                   |\n| 403 - 469      | 7                   |\n| 470 - 536      | 8                   |\n| 537 - 603      | 9                   |\n| 604 - 670      | 10                  |\n\n\n# 5\\. Delivery Reports callback\n\n### 5.1 Setup\n\nTo enable delivery reports, login into your account on the Spryng portal and by selecting the menu item ‘Settings’ in your SMS dashboard. Here you can enter the url of your script (servlet, php script, perl, etc…) on which you wish to receive your delivery reports.\n\nThis script should expect two parameters via an HTTP GET call.\n\n| Parameter            | Type   | Description                                                                                                        |\n| -------------------- | ------ | ------------------------------------------------------------------------------------------------------------------ |\n| `ID`                 | string | The `uuid` of the message                                                                                          |\n| `RECIPIENT`          | string | The phone number of the destination in format `31612345678`                                                        |\n| `STATUS`             | enum   | 10(=Delivered), 20(=Not Delivered)                                                                                 |\n| `REASONCODE`         | string | See **#5.2 Error Reason Codes** below for expected values and their meaning                                        |\n| `REFERENCE`          | string | value given by you in the API call                                                                                 |\n| `ADDED`              | string | Timestamp when the messages was created in the Spryng service in `YYYYmmddHHiiss` format                           |\n| `RESULTDATE`         | string | Timestamp when the messages was sent from the Spryng service in `YYYYmmddHHiiss` format                            |\n| `OPERATOR_STATUS_AT` | string | Timestamp of the response from the originating SMSC in `YYYYmmddHHiiss` format                                     |\n| `OPERATOR`           | string | The [MCCMNC](https://en.wikipedia.org/wiki/Mobile_country_code) code of the network provider operator if available |\n\n**When you require a delivery report you should not specify more than 1 DESTINATION in your request. You can expect the following parameters:**\n\nThe HTTP request conducted by Spryng must be answered by your server with a status code of **2xx** which means that the message was successfully accepted by your system. If either the HTTP server cannot be reached, for example it returns an 500 internal server error, Spryng assumes that the message was not successfully accepted by your system and the request will be retried once every minute. The message will not be retried forever, the current setting is 24 hours.\n\n### 5.2 Error Reason Codes\n\nBelow an overview of the possible **error reason codes** which you can retrieve.\n\n| Value | Description                                                                                                      |\n| ----- | ---------------------------------------------------------------------------------------------------------------- |\n| `0`   | No error                                                                                                         |\n| `20`  | Recipient number unreachable                                                                                     |\n| `21`  | Recipient number incorrect                                                                                       |\n| `22`  | Delivery Failure                                                                                                 |\n| `31`  | The recipient is blacklisted (e.g. People that respond \"STOP\" to an earlier message can appear in the blacklist) |\n| `32`  | The originator is not registered for this country                                                                |\n\n# 6\\. REST JSON API\n\nOur REST API has a lot more functionalities and response feedback. Please view our [REST JSON API docs](https://docs.spryngsms.com/) regarding the implementation.\n\n# 7\\. Support\n\nPlease contact [info@spryng.nl](mailto:info@spryng.nl) for any questions or problems related to the API.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"6569146","team":264477,"collectionId":"1a10aed2-1cc7-473d-9676-e81fc4a39861","publishedId":"SzKN1hFW","public":true,"publicUrl":"https://simple.docs.spryngsms.com","privateUrl":"https://go.postman.co/documentation/6569146-1a10aed2-1cc7-473d-9676-e81fc4a39861","customColor":{"top-bar":"FFFFFF","right-sidebar":"DDF8FF","highlight":"EE6445"},"documentationLayout":"classic-double-column","version":"8.10.1","publishDate":"2020-02-12T15:37:36.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Production API","id":"e729a487-7db8-44c9-a629-ad30a9a1a25f","owner":"6569146","values":[{"key":"server","value":"https://rest.spryngsms.com","description":"","enabled":true},{"key":"token","value":"xxxxxx","description":"","enabled":true}],"published":true}],"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/43d96e8530db279af9f334b18aaf562fc218d67a037d0e76b8c3dc97a93c8f79","favicon":"https://res.cloudinary.com/postman/image/upload/v1550232129/team/bjg9vknj5kuevjbckwbo.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"},{"label":"Production API","value":"6569146-e729a487-7db8-44c9-a629-ad30a9a1a25f"}],"canonicalUrl":"https://simple.docs.spryngsms.com/view/metadata/SzKN1hFW"}