Create a new notification config
curl --request POST \
--url https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs \
--header 'Content-Type: application/json' \
--header 'x-admin-api-key: <x-admin-api-key>' \
--data '
{
"event": "trial_period_expiry",
"timePeriod": [
1,
2,
3
],
"unit": "seconds",
"templateName": "notificationservice-template-testing",
"senderEmail": "sinan@razi.ai",
"senderName": "Sinan",
"supportEmail": "sinan@razi.ai",
"productName": "Razi"
}
'import requests
url = "https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs"
payload = {
"event": "trial_period_expiry",
"timePeriod": [1, 2, 3],
"unit": "seconds",
"templateName": "notificationservice-template-testing",
"senderEmail": "sinan@razi.ai",
"senderName": "Sinan",
"supportEmail": "sinan@razi.ai",
"productName": "Razi"
}
headers = {
"x-admin-api-key": "<x-admin-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-admin-api-key': '<x-admin-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event: 'trial_period_expiry',
timePeriod: [1, 2, 3],
unit: 'seconds',
templateName: 'notificationservice-template-testing',
senderEmail: 'sinan@razi.ai',
senderName: 'Sinan',
supportEmail: 'sinan@razi.ai',
productName: 'Razi'
})
};
fetch('https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs', 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://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs",
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([
'event' => 'trial_period_expiry',
'timePeriod' => [
1,
2,
3
],
'unit' => 'seconds',
'templateName' => 'notificationservice-template-testing',
'senderEmail' => 'sinan@razi.ai',
'senderName' => 'Sinan',
'supportEmail' => 'sinan@razi.ai',
'productName' => 'Razi'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-admin-api-key: <x-admin-api-key>"
],
]);
$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://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs"
payload := strings.NewReader("{\n \"event\": \"trial_period_expiry\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"unit\": \"seconds\",\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"sinan@razi.ai\",\n \"senderName\": \"Sinan\",\n \"supportEmail\": \"sinan@razi.ai\",\n \"productName\": \"Razi\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-admin-api-key", "<x-admin-api-key>")
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://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs")
.header("x-admin-api-key", "<x-admin-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"trial_period_expiry\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"unit\": \"seconds\",\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"sinan@razi.ai\",\n \"senderName\": \"Sinan\",\n \"supportEmail\": \"sinan@razi.ai\",\n \"productName\": \"Razi\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-admin-api-key"] = '<x-admin-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": \"trial_period_expiry\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"unit\": \"seconds\",\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"sinan@razi.ai\",\n \"senderName\": \"Sinan\",\n \"supportEmail\": \"sinan@razi.ai\",\n \"productName\": \"Razi\"\n}"
response = http.request(request)
puts response.read_body{
"event": "trial_period_expiry",
"timePeriod": [
1,
2,
3
],
"unit": "seconds",
"templateName": "notificationservice-template-testing",
"senderEmail": "sinan@razi.ai",
"senderName": "Sinan",
"supportEmail": "sinan@razi.ai",
"productName": "Razi"
}Notification Configs
Create a new notification config
Create a new notification config with the provided details. Note: This endpoint is restricted for internal use only.
POST
/
api
/
v1
/
notification-configs
Create a new notification config
curl --request POST \
--url https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs \
--header 'Content-Type: application/json' \
--header 'x-admin-api-key: <x-admin-api-key>' \
--data '
{
"event": "trial_period_expiry",
"timePeriod": [
1,
2,
3
],
"unit": "seconds",
"templateName": "notificationservice-template-testing",
"senderEmail": "sinan@razi.ai",
"senderName": "Sinan",
"supportEmail": "sinan@razi.ai",
"productName": "Razi"
}
'import requests
url = "https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs"
payload = {
"event": "trial_period_expiry",
"timePeriod": [1, 2, 3],
"unit": "seconds",
"templateName": "notificationservice-template-testing",
"senderEmail": "sinan@razi.ai",
"senderName": "Sinan",
"supportEmail": "sinan@razi.ai",
"productName": "Razi"
}
headers = {
"x-admin-api-key": "<x-admin-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-admin-api-key': '<x-admin-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event: 'trial_period_expiry',
timePeriod: [1, 2, 3],
unit: 'seconds',
templateName: 'notificationservice-template-testing',
senderEmail: 'sinan@razi.ai',
senderName: 'Sinan',
supportEmail: 'sinan@razi.ai',
productName: 'Razi'
})
};
fetch('https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs', 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://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs",
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([
'event' => 'trial_period_expiry',
'timePeriod' => [
1,
2,
3
],
'unit' => 'seconds',
'templateName' => 'notificationservice-template-testing',
'senderEmail' => 'sinan@razi.ai',
'senderName' => 'Sinan',
'supportEmail' => 'sinan@razi.ai',
'productName' => 'Razi'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-admin-api-key: <x-admin-api-key>"
],
]);
$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://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs"
payload := strings.NewReader("{\n \"event\": \"trial_period_expiry\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"unit\": \"seconds\",\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"sinan@razi.ai\",\n \"senderName\": \"Sinan\",\n \"supportEmail\": \"sinan@razi.ai\",\n \"productName\": \"Razi\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-admin-api-key", "<x-admin-api-key>")
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://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs")
.header("x-admin-api-key", "<x-admin-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"trial_period_expiry\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"unit\": \"seconds\",\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"sinan@razi.ai\",\n \"senderName\": \"Sinan\",\n \"supportEmail\": \"sinan@razi.ai\",\n \"productName\": \"Razi\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-admin-api-key"] = '<x-admin-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": \"trial_period_expiry\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"unit\": \"seconds\",\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"sinan@razi.ai\",\n \"senderName\": \"Sinan\",\n \"supportEmail\": \"sinan@razi.ai\",\n \"productName\": \"Razi\"\n}"
response = http.request(request)
puts response.read_body{
"event": "trial_period_expiry",
"timePeriod": [
1,
2,
3
],
"unit": "seconds",
"templateName": "notificationservice-template-testing",
"senderEmail": "sinan@razi.ai",
"senderName": "Sinan",
"supportEmail": "sinan@razi.ai",
"productName": "Razi"
}Headers
The API key to access the admin API
Body
application/json
Trial Period Expiry
Example:
"trial_period_expiry"
Time period for the event
Example:
[1, 2, 3]
Unit of measurement for the time period
Example:
"seconds"
Name of the template
Example:
"notificationservice-template-testing"
Sender email
Example:
"sinan@razi.ai"
Sender Name
Example:
"Sinan"
Support Email
Example:
"sinan@razi.ai"
Product Name
Example:
"Razi"
Response
Notification config created successfully
Trial Period Expiry
Example:
"trial_period_expiry"
Time period for the event
Example:
[1, 2, 3]
Unit of measurement for the time period
Example:
"seconds"
Name of the template
Example:
"notificationservice-template-testing"
Sender email
Example:
"sinan@razi.ai"
Sender Name
Example:
"Sinan"
Support Email
Example:
"sinan@razi.ai"
Product Name
Example:
"Razi"
⌘I