API Documentation
Learn how to integrate Velstack API into your applications to automate processes and communication at scale.
The Velstack API is organized around REST. Our API uses standard HTTP response codes, authentication, and verbs.
You can use the Velstack API in test mode, which doesn't affect your live data or interact with real SMS delivery. The API key you use to authenticate the request determines whether you're in live mode or test mode.
Getting started
To get started, you should create a free Velstack account to obtain your API_KEYS for making request calls.
By default, you would have access to your TEST and LIVE keys environment after you sign up.
Request Samples
We provide sample API calls next to each method using CURL. All you need to do is insert your specific parameters, and you can test the calls from the command line.
If you're not familiar with cURL, you can use Postman, an easy-to-use API development and testing platform. Explore the Velstack Postman Collection to understand how our APIs work.
Request and Response
Both request body data and response data are formatted as JSON. Content type for responses will always be application/json. Generally, all responses will be in the following format:
Response sample
- Name
status- Type
- bool
- Description
This is a boolean flag that lets you know if your request was successful or not. True if successful or otherwise. We recommend that you use this in combination with HTTP status codes to determine the result of an API call.
- Name
message- Type
- string
- Description
This provides a summary of the response and its status. For example, when sending an SMS campaign, the message might read "SMS sent successfully." In the event of an error, the message key will contain a description of the error, such as issues with the authorization header. This is the only key that is universal across all requests.
- Name
data- Type
- object/array
- Description
This contain the results of your request. It can either be an object, or an array depending on the request made. For instance, a request to retrieve a single campaign will return a campaign object in the data key, while the key would be an array of campaigns if a list is requested instead.
Response format
<span></span> <span><span style="color: var(--shiki-color-text)">{</span></span> <span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">"status"</span><span style="color: var(--shiki-token-punctuation)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">"[boolean]"</span><span style="color: var(--shiki-token-punctuation)">,</span></span> <span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">"message"</span><span style="color: var(--shiki-token-punctuation)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">"[string]"</span><span style="color: var(--shiki-token-punctuation)">,</span></span> <span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">"data"</span><span style="color: var(--shiki-token-punctuation)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">"[object]"</span></span> <span><span style="color: var(--shiki-color-text)">}</span></span> <span></span>