Test our API with Postman

It’s easy to get started with ClickSend’s API and we’ll prove it. Quickly test our functions by sending yourself an SMS — even if it’s your first time working with an API.

In this guide, you’ll learn how to:

  1. Sign up for a ClickSend account and get your API credentials.
  2. Test the API using Postman
  3. Export code in the language of your choice.

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

  1. You need a ClickSend account with credit to start sending. If you don’t have an account, create one here.
  2. 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.
  3. Download and install Postman.

Download our collection

Once you have setup Postman, click the button below:

Postman button icon whiteLaunch Postman

A 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.

Postman screenshot showing Import Collection screen

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.

Postman screenshot showing the 'Authorization' screen for the ClickSend API

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.
Postman screenshot showing the variables tab open and username and password fields ticked

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.

Postman screenshot showing the variables tab open with the save button highlighted

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.

Postman screenshot showing the send message tab open

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:

  1. Replace the body text with your own message. Be sure to wrap your content in double quotation marks.
  2. 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.
  3. You may leave the {{from}} variable, which will send from a ClickSend Shared Number. Alternatively, you may use one of your existing Sender IDs.
Postman screenshot showing the send message tab open and the response code generated

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.

Postman screenshot showing the send message tab and copyable code snippet

Astronaut next to a rocket with a rocket launcher

Make the next call in your language

Get started with the ClickSend API in your preferred coding language. The SMS Quickstart Guides are the fastest way to make your first call.