Recipient List

To get the Recipient List for notification follow the example code and be careful with the parameters.

Base Urlhttps://swift-send.bugfinder.app/api/


HTTP Method:
GET

API URL:
https://swift-send.bugfinder.app/api/notification-recipients

API Key:
Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format:
JSON


Body Params
                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/notification-recipients',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});


                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/notification-recipients"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/notification-recipients',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/notification-recipients' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/notification-recipients")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "notifications": [
            {
                "id": 4,
                "user_id": 6790,
                "email_address": "bug@gmail.com",
                "email_owner": "Boss",
                "created_at": "2023-11-08T05:20:18.000000Z",
                "updated_at": "2023-11-08T05:20:18.000000Z"
            },
            {
                "id": 1,
                "user_id": 6790,
                "email_address": "anikbug@gmail.com",
                "email_owner": "Anik Dey",
                "created_at": "2023-11-01T10:43:14.000000Z",
                "updated_at": "2023-11-01T10:43:14.000000Z"
            }
        ]
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "PublicKey": [
            "The public key field is required."
        ],
        "SecretKey": [
            "The secret key field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Recipient Add

To add new recipient in notification list follow the example code and be careful with the parameters.

Base Urlhttps://swift-send.bugfinder.app/api/


HTTP Method:
POST

API URL:
https://swift-send.bugfinder.app/api/notification-recipient/save

API Key:
Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format:
JSON


Body Params

email_address*
string

The Email Address which you want to send notification for every event.

email_owner*
string

The Email owner is the name of email.

                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/notification-recipient/save',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  },
  formData: {
    'email_address': 'example@gmail.com',
    'email_owner': 'Mr. Example'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});


                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/notification-recipient/save"

payload={'email_address': 'example@gmail.com',
'email_owner': 'Mr. Example'}
files=[

]
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/notification-recipient/save',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('email_address' => 'example@gmail.com','email_owner' => 'Mr. Example'),
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                                
123456789101112131415 1617181920212223242526

curl --location --request POST 'BASE_URL/notification-recipient/save' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--form 'email_address="example@gmail.com"' \
--form 'email_owner="Mr. Example"'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/notification-recipient/save")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"
form_data = [['email_address', 'example@gmail.com'],['email_owner', 'Mr. Example']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Added Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "email_address": [
            "The email address field is required."
        ],
        "email_owner": [
            "The name field is required"
        ]
    }
}
                                                            
                                                            
1234567891011121314

Recipient Delete

To delete the recipient from the notification follow the example code and be careful with the parameters.

Base Urlhttps://swift-send.bugfinder.app/api/


HTTP Method:
DELETE

API URL:
https://swift-send.bugfinder.app/api/notification-recipient/delete?id={id}

API Key:
Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format:
JSON


Body Params
                                                                
var request = require('request');
var options = {
  'method': 'DELETE',
  'url': 'BASE_URL/notification-recipient/delete?id=10',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  },
  formData: {

  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/notification-recipient/delete?id=10"

payload={}
files={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("DELETE", url, headers=headers, data=payload, files=files)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/notification-recipient/delete?id=10',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                                
123456789101112131415 1617181920212223242526

curl --location --request DELETE 'BASE_URL/notification-recipient/delete?id=10' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/notification-recipient/delete?id=10")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Delete.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Deleted Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record Not Found"
}
                                                            
                                                            
1234567891011121314

Recipient Bulk Delete

To delete multiple recipient from notification follow the example code and be careful with the parameters.

Base Urlhttps://swift-send.bugfinder.app/api/


HTTP Method:
POST

API URL:
https://swift-send.bugfinder.app/api/notification-recipient/bulk-delete

API Key:
Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format:
JSON


Body Params

strIds*
array

strIds must be type array.

                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/notification-recipient/bulk-delete',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  form: {
    'strIds[0]': '8',
    'strIds[1]': '44'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/notification-recipient/bulk-delete"

payload='strIds%5B0%5D=8&strIds%5B1%5D=44'
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY',
  'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/notification-recipient/bulk-delete',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => 'strIds%5B0%5D=8&strIds%5B1%5D=44',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY',
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                                                                
123456789101112131415 1617181920212223242526

curl --location --request POST 'BASE_URL/notification-recipient/bulk-delete' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'strIds[0]=8' \
--data-urlencode 'strIds[1]=44'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/notification-recipient/bulk-delete")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"
request["Content-Type"] = "application/x-www-form-urlencoded"
request.body = "strIds%5B0%5D=8&strIds%5B1%5D=44"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Deleted Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record Not Found"
}
                                                            
                                                            
1234567891011121314