VertexSMS API is based on REST principles. To use REST API, you will need VertexSMS account and API access token. You can generate them inside your VertexSMS account. You must supply a Content-type header: Content-type: application/json for all PUT or POST requests.
HTTP headers and codes
REST API takes full advantage of all HTTP headers. Every header is important and has its own purpose, from status code to content type and request method. Bellow is list of http codes used by VertexSMS API.
| Code | Description |
|---|---|
| 200 | Success! |
| 400 | General error when fulfilling the request would cause an invalid state. Domain validation errors, missing data, etc. |
| 401 | Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. |
| 403 | The server understood the request, but is refusing to fulfil it. Authorisation will not help and the request SHOULD NOT be repeated. |
| 404 | The server has not found anything matching the Request-URI. No indication is given if the condition is temporary or permanent. |
| 405 | The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. |
| 409 | The request could not be completed due to a conflict with the current state of the resource. |
| 500 | Server error, please try again. |
| 501 | Server error, please try again. |
| 503 | The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. Please try again. |
Handling errors
If our API rejects your request to send a message, an error will be returned in the form of 4xx (or 500, if our systems fail) HTTP status code and a JSON-encoded string with error description.
Here's an example of a bad request:
Request example:
Response example:
Security
To ensure privacy we recommend you to use HTTPS for all VertexSMS API requests. All callbacks from our servers made only from those ip's: 178.33.133.192/28 and 178.32.167.92