Send Message
curl --request POST \
--url https://api.bleeprs.com/api/sendMessage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"emails": [
"sam@bleeprs.com",
"john@bleeprs.com"
],
"isBulk": false,
"messageBody": "Hey there",
"phoneBookId": 4,
"receiverNumber": "15678909999",
"senderId": "SUPERHUMAN",
"sendtoEmail": true,
"subject": "Thanks for Applying",
"template": {
"indexes": [
"Benson",
"Germany"
],
"templateId": "BLR_TID_IbZprJAfeSwsBdMJBfkv"
},
"templateInUse": true
}
'import requests
url = "https://api.bleeprs.com/api/sendMessage"
payload = {
"emails": ["sam@bleeprs.com", "john@bleeprs.com"],
"isBulk": False,
"messageBody": "Hey there",
"phoneBookId": 4,
"receiverNumber": "15678909999",
"senderId": "SUPERHUMAN",
"sendtoEmail": True,
"subject": "Thanks for Applying",
"template": {
"indexes": ["Benson", "Germany"],
"templateId": "BLR_TID_IbZprJAfeSwsBdMJBfkv"
},
"templateInUse": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
emails: ['sam@bleeprs.com', 'john@bleeprs.com'],
isBulk: false,
messageBody: 'Hey there',
phoneBookId: 4,
receiverNumber: '15678909999',
senderId: 'SUPERHUMAN',
sendtoEmail: true,
subject: 'Thanks for Applying',
template: {indexes: ['Benson', 'Germany'], templateId: 'BLR_TID_IbZprJAfeSwsBdMJBfkv'},
templateInUse: true
})
};
fetch('https://api.bleeprs.com/api/sendMessage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bleeprs.com/api/sendMessage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'emails' => [
'sam@bleeprs.com',
'john@bleeprs.com'
],
'isBulk' => false,
'messageBody' => 'Hey there',
'phoneBookId' => 4,
'receiverNumber' => '15678909999',
'senderId' => 'SUPERHUMAN',
'sendtoEmail' => true,
'subject' => 'Thanks for Applying',
'template' => [
'indexes' => [
'Benson',
'Germany'
],
'templateId' => 'BLR_TID_IbZprJAfeSwsBdMJBfkv'
],
'templateInUse' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bleeprs.com/api/sendMessage"
payload := strings.NewReader("{\n \"emails\": [\n \"sam@bleeprs.com\",\n \"john@bleeprs.com\"\n ],\n \"isBulk\": false,\n \"messageBody\": \"Hey there\",\n \"phoneBookId\": 4,\n \"receiverNumber\": \"15678909999\",\n \"senderId\": \"SUPERHUMAN\",\n \"sendtoEmail\": true,\n \"subject\": \"Thanks for Applying\",\n \"template\": {\n \"indexes\": [\n \"Benson\",\n \"Germany\"\n ],\n \"templateId\": \"BLR_TID_IbZprJAfeSwsBdMJBfkv\"\n },\n \"templateInUse\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bleeprs.com/api/sendMessage")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"emails\": [\n \"sam@bleeprs.com\",\n \"john@bleeprs.com\"\n ],\n \"isBulk\": false,\n \"messageBody\": \"Hey there\",\n \"phoneBookId\": 4,\n \"receiverNumber\": \"15678909999\",\n \"senderId\": \"SUPERHUMAN\",\n \"sendtoEmail\": true,\n \"subject\": \"Thanks for Applying\",\n \"template\": {\n \"indexes\": [\n \"Benson\",\n \"Germany\"\n ],\n \"templateId\": \"BLR_TID_IbZprJAfeSwsBdMJBfkv\"\n },\n \"templateInUse\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bleeprs.com/api/sendMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emails\": [\n \"sam@bleeprs.com\",\n \"john@bleeprs.com\"\n ],\n \"isBulk\": false,\n \"messageBody\": \"Hey there\",\n \"phoneBookId\": 4,\n \"receiverNumber\": \"15678909999\",\n \"senderId\": \"SUPERHUMAN\",\n \"sendtoEmail\": true,\n \"subject\": \"Thanks for Applying\",\n \"template\": {\n \"indexes\": [\n \"Benson\",\n \"Germany\"\n ],\n \"templateId\": \"BLR_TID_IbZprJAfeSwsBdMJBfkv\"\n },\n \"templateInUse\": true\n}"
response = http.request(request)
puts response.read_bodyMessaging
Send Message
Send Message
POST
/
sendMessage
Send Message
curl --request POST \
--url https://api.bleeprs.com/api/sendMessage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"emails": [
"sam@bleeprs.com",
"john@bleeprs.com"
],
"isBulk": false,
"messageBody": "Hey there",
"phoneBookId": 4,
"receiverNumber": "15678909999",
"senderId": "SUPERHUMAN",
"sendtoEmail": true,
"subject": "Thanks for Applying",
"template": {
"indexes": [
"Benson",
"Germany"
],
"templateId": "BLR_TID_IbZprJAfeSwsBdMJBfkv"
},
"templateInUse": true
}
'import requests
url = "https://api.bleeprs.com/api/sendMessage"
payload = {
"emails": ["sam@bleeprs.com", "john@bleeprs.com"],
"isBulk": False,
"messageBody": "Hey there",
"phoneBookId": 4,
"receiverNumber": "15678909999",
"senderId": "SUPERHUMAN",
"sendtoEmail": True,
"subject": "Thanks for Applying",
"template": {
"indexes": ["Benson", "Germany"],
"templateId": "BLR_TID_IbZprJAfeSwsBdMJBfkv"
},
"templateInUse": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
emails: ['sam@bleeprs.com', 'john@bleeprs.com'],
isBulk: false,
messageBody: 'Hey there',
phoneBookId: 4,
receiverNumber: '15678909999',
senderId: 'SUPERHUMAN',
sendtoEmail: true,
subject: 'Thanks for Applying',
template: {indexes: ['Benson', 'Germany'], templateId: 'BLR_TID_IbZprJAfeSwsBdMJBfkv'},
templateInUse: true
})
};
fetch('https://api.bleeprs.com/api/sendMessage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bleeprs.com/api/sendMessage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'emails' => [
'sam@bleeprs.com',
'john@bleeprs.com'
],
'isBulk' => false,
'messageBody' => 'Hey there',
'phoneBookId' => 4,
'receiverNumber' => '15678909999',
'senderId' => 'SUPERHUMAN',
'sendtoEmail' => true,
'subject' => 'Thanks for Applying',
'template' => [
'indexes' => [
'Benson',
'Germany'
],
'templateId' => 'BLR_TID_IbZprJAfeSwsBdMJBfkv'
],
'templateInUse' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bleeprs.com/api/sendMessage"
payload := strings.NewReader("{\n \"emails\": [\n \"sam@bleeprs.com\",\n \"john@bleeprs.com\"\n ],\n \"isBulk\": false,\n \"messageBody\": \"Hey there\",\n \"phoneBookId\": 4,\n \"receiverNumber\": \"15678909999\",\n \"senderId\": \"SUPERHUMAN\",\n \"sendtoEmail\": true,\n \"subject\": \"Thanks for Applying\",\n \"template\": {\n \"indexes\": [\n \"Benson\",\n \"Germany\"\n ],\n \"templateId\": \"BLR_TID_IbZprJAfeSwsBdMJBfkv\"\n },\n \"templateInUse\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bleeprs.com/api/sendMessage")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"emails\": [\n \"sam@bleeprs.com\",\n \"john@bleeprs.com\"\n ],\n \"isBulk\": false,\n \"messageBody\": \"Hey there\",\n \"phoneBookId\": 4,\n \"receiverNumber\": \"15678909999\",\n \"senderId\": \"SUPERHUMAN\",\n \"sendtoEmail\": true,\n \"subject\": \"Thanks for Applying\",\n \"template\": {\n \"indexes\": [\n \"Benson\",\n \"Germany\"\n ],\n \"templateId\": \"BLR_TID_IbZprJAfeSwsBdMJBfkv\"\n },\n \"templateInUse\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bleeprs.com/api/sendMessage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emails\": [\n \"sam@bleeprs.com\",\n \"john@bleeprs.com\"\n ],\n \"isBulk\": false,\n \"messageBody\": \"Hey there\",\n \"phoneBookId\": 4,\n \"receiverNumber\": \"15678909999\",\n \"senderId\": \"SUPERHUMAN\",\n \"sendtoEmail\": true,\n \"subject\": \"Thanks for Applying\",\n \"template\": {\n \"indexes\": [\n \"Benson\",\n \"Germany\"\n ],\n \"templateId\": \"BLR_TID_IbZprJAfeSwsBdMJBfkv\"\n },\n \"templateInUse\": true\n}"
response = http.request(request)
puts response.read_bodyEnsure the Sender ID Or Template have been pre-approved for the coverage
before attempting to send a message.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
A copy of this message can be sent to these email addresses. (attarcts extra cost)
Example:
["sam@bleeprs.com", "john@bleeprs.com"]
Enable or Disable if this meessage is bulk or not
Example:
false
Message body with expected number of characters
Example:
"Hey there"
Phonebook ID must be passed if isBulk is set to true
Example:
4
Target phone number for delivery
Example:
"15678909999"
Pre-approved sender id based on the region and route
Example:
"SUPERHUMAN"
If message should be sent to email or not
Example:
true
The subject of the email if sendtoEmail is set to true
Example:
"Thanks for Applying"
This section becomes effective if templateInUse is set to true
Show child attributes
Show child attributes
Used if the message should be sent using a template
Example:
true
Response
200 - undefined
Was this page helpful?
⌘I