Introduction Last updated: 2020-03-06

SMS Heroes have an API if you want to integrate your own system and send bulk SMS messages.
To start sending SMS is easy and can be done in two steps:

  • Request access token
    Go to https://app.smsheroes.com/#settings/general. General settings section "API". Click on button "Create token". The SMS Heroes will generate the token that will be available until you'll revoke it.
  • Send the HTTP POST request to SMS Heroes API.

Send request

Create the HTTP POST request to https://app.smsheroes.com/api/v1/send with body.

The request body fields has following meaning:

  • sender - the sender name or number of the SMS.
  • message - the SMS message.
  • recipients - the list of phone numbers. Phone number should be a string.
  • campaignName - the campaign name (optional).

							
	POST https://app.smsheroes.com/api/v1/send
	Content-Type: application/json
	Authorization: Bearer YourTokenGoesHere123

	{
		"sender": "John Doe",
		"message": "Hello from API!",
		"recipients": ["+nnnnnnnnnnnn", "+nnnnnnnnnnnn"],
		"campaignName": "Demo Campaign"
	}

Note

If campaignName is left empty the system will generate a campaignName being todays date.

Response

If everything goes well, you should get a response which looks similar to this:

							
	{
		"id": 172122,
		"numberOfSMS": 2,
		"totalCost": 0.06800
	}

If you're in need of any assistance, don't hesitate to e-mail us at hello@smsheroes.com.