Update notification config
curl --request PUT \
--url https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs/{id} \
--header 'Content-Type: application/json' \
--header 'x-admin-api-key: <x-admin-api-key>' \
--data '
{
"unit": "seconds",
"timePeriod": [
1,
2,
3
],
"templateName": "notificationservice-template-testing",
"senderEmail": "Sinan",
"senderName": "Sinan",
"supportEmail": "sinan@razi.ai",
"productName": "Razi"
}
'import requests
url = "https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs/{id}"
payload = {
"unit": "seconds",
"timePeriod": [1, 2, 3],
"templateName": "notificationservice-template-testing",
"senderEmail": "Sinan",
"senderName": "Sinan",
"supportEmail": "sinan@razi.ai",
"productName": "Razi"
}
headers = {
"x-admin-api-key": "<x-admin-api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-admin-api-key': '<x-admin-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
unit: 'seconds',
timePeriod: [1, 2, 3],
templateName: 'notificationservice-template-testing',
senderEmail: 'Sinan',
senderName: 'Sinan',
supportEmail: 'sinan@razi.ai',
productName: 'Razi'
})
};
fetch('https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'unit' => 'seconds',
'timePeriod' => [
1,
2,
3
],
'templateName' => 'notificationservice-template-testing',
'senderEmail' => 'Sinan',
'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/{id}"
payload := strings.NewReader("{\n \"unit\": \"seconds\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"Sinan\",\n \"senderName\": \"Sinan\",\n \"supportEmail\": \"sinan@razi.ai\",\n \"productName\": \"Razi\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs/{id}")
.header("x-admin-api-key", "<x-admin-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"unit\": \"seconds\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"Sinan\",\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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-admin-api-key"] = '<x-admin-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"unit\": \"seconds\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"Sinan\",\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
Update notification config
Updates a notification config with the provided details. Note: This endpoint is restricted for internal use only.
PUT
/
api
/
v1
/
notification-configs
/
{id}
Update notification config
curl --request PUT \
--url https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs/{id} \
--header 'Content-Type: application/json' \
--header 'x-admin-api-key: <x-admin-api-key>' \
--data '
{
"unit": "seconds",
"timePeriod": [
1,
2,
3
],
"templateName": "notificationservice-template-testing",
"senderEmail": "Sinan",
"senderName": "Sinan",
"supportEmail": "sinan@razi.ai",
"productName": "Razi"
}
'import requests
url = "https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs/{id}"
payload = {
"unit": "seconds",
"timePeriod": [1, 2, 3],
"templateName": "notificationservice-template-testing",
"senderEmail": "Sinan",
"senderName": "Sinan",
"supportEmail": "sinan@razi.ai",
"productName": "Razi"
}
headers = {
"x-admin-api-key": "<x-admin-api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-admin-api-key': '<x-admin-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
unit: 'seconds',
timePeriod: [1, 2, 3],
templateName: 'notificationservice-template-testing',
senderEmail: 'Sinan',
senderName: 'Sinan',
supportEmail: 'sinan@razi.ai',
productName: 'Razi'
})
};
fetch('https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'unit' => 'seconds',
'timePeriod' => [
1,
2,
3
],
'templateName' => 'notificationservice-template-testing',
'senderEmail' => 'Sinan',
'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/{id}"
payload := strings.NewReader("{\n \"unit\": \"seconds\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"Sinan\",\n \"senderName\": \"Sinan\",\n \"supportEmail\": \"sinan@razi.ai\",\n \"productName\": \"Razi\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://dev-billing-api.iqraa.ai/api/v1/api/v1/notification-configs/{id}")
.header("x-admin-api-key", "<x-admin-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"unit\": \"seconds\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"Sinan\",\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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-admin-api-key"] = '<x-admin-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"unit\": \"seconds\",\n \"timePeriod\": [\n 1,\n 2,\n 3\n ],\n \"templateName\": \"notificationservice-template-testing\",\n \"senderEmail\": \"Sinan\",\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
Path Parameters
The ID of the notification config
Body
application/json
Unit of measurement for the time period
Example:
"seconds"
Time period for the event
Example:
[1, 2, 3]
Name of the template
Example:
"notificationservice-template-testing"
Sender Name
Example:
"Sinan"
Sender Name
Example:
"Sinan"
Support Email
Example:
"sinan@razi.ai"
Product Name
Example:
"Razi"
Response
Notification config updated 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