What’s Postman?
Postman is an API testing tool, designed to help developers build, test and iterate their APIs.
ClickSend’s API is ready to use with Postman in just a few clicks, and includes everything you need to use our features in your projects — including SMS, MMS, Voice, Numbers, Accounts and much more.
Before you start
- You need a ClickSend account with credit to start sending. If you don’t have an account, create one here.
- If you need to add more credit to your account, you can top-up here. You’ll be credited $2 AUD free credit when you sign up.
- Download and install Postman.
Download our collection
Once you have setup Postman, click the button below:
Launch PostmanA window will appear asking if you want to launch the collection on your local machine or via the Postman web app. Once you have selected an option, the ClickSend API collection will appear in your chosen space, ready to use.
Authorisation
With ClickSend’s API collection now imported into Postman, select the ClickSend API collection (that’s the top-level folder), and navigate to the Authorisation tab.
Make sure that Type is set to Basic Auth. If it isn’t, please select this from the dropdown.
Add your credentials
Next, you’ll need your ClickSend username and API key. Both can be found on your dashboard here.
To use your credentials across all of our API endpoints, you’ll want to set up username and password variables. We’ve already configured our API to work with these variables, so you will only need to enter them once.
Please note that variables are case-sensitive, so be sure to use only lowercase letters as we have here:
- Navigate to the Variables tab.
- Create a new entry called username and enter your ClickSend Username.
- Create a new entry called password and enter your ClickSend API key.
It’s important that you save your changes before continuing, which you can do from the top-right of the app. If you don’t, Postman won’t recognise the variables in the next step, which will result in an authorisation error.
Send yourself an SMS
You’re now ready to test the API, and there’s no better way to test than by sending yourself an SMS.
Simply expand the SMS folder within the ClickSend API collection and select sms / send message.
Next, navigate over to the Body tab, where you’ll find a very short snippet of code containing everything that you need to send an SMS. To see what other parameters you can include, see our full API reference.
Now, it’s a simple matter of a few tweaks:
- Replace the body text with your own message. Be sure to wrap your content in double quotation marks.
- Replace the
{{to}}
variable with your own mobile number, including country code. For example, if you have an Australian number, it will start with +61. Click here to learn about country codes. - You may leave the
{{from}}
variable, which will send from a ClickSend Shared Number. Alternatively, you may use one of your existing Sender IDs.
Once you’re done, all that’s left is to hit Send and let the API do the rest.
You’ll immediately see the result of your request in the response console. If the response you get back reads Messages queued for delivery
then your message has been successfully processed and is queued to be sent.
Check your phone, and you should find a new message waiting for you. Simple, right? If your response code is something else, then see our list of status codes, or contact support.
Export the code
Postman comes equipped with a code-snippet generator, allowing you to export the code in your programming language of choice. To do this, open the code tab from the right-hand side, and select your language.