Policy v2 (experimental)
Receive delivery events for approval notifications
Receives delivery events for policy version 2 notifications.
POST
/
v2
/
notifications
/
events
cURL
# EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
# Delivery events; clients do not call it
curl -X POST "https://parmana-api-real.vercel.app/v2/notifications/events" \
-H "Content-Type: application/json" \
-d '[{"type":"Delivery"}]'// EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
// Delivery events; clients do not call it
const response = await fetch(
"https://parmana-api-real.vercel.app/v2/notifications/events",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify([{ type: "Delivery" }]),
},
);
console.log(response.status, await response.text());# EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
# Delivery events; clients do not call it
import json
import urllib.request
BODY = r'[{"type":"Delivery"}]'
def main() -> None:
request = urllib.request.Request(
"https://parmana-api-real.vercel.app/v2/notifications/events",
data=json.dumps(json.loads(BODY)).encode("utf-8"),
method="POST",
headers={
"Content-Type": "application/json",
},
)
with urllib.request.urlopen(request) as response:
print(response.status, response.read().decode("utf-8"))
if __name__ == "__main__":
main()const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([{}])
};
fetch('https://parmana-api-real.vercel.app/v2/notifications/events', 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://parmana-api-real.vercel.app/v2/notifications/events",
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([
[
]
]),
CURLOPT_HTTPHEADER => [
"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://parmana-api-real.vercel.app/v2/notifications/events"
payload := strings.NewReader("[\n {}\n]")
req, _ := http.NewRequest("POST", url, payload)
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://parmana-api-real.vercel.app/v2/notifications/events")
.header("Content-Type", "application/json")
.body("[\n {}\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://parmana-api-real.vercel.app/v2/notifications/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {}\n]"
response = http.request(request)
puts response.read_body{
"recorded": 1
}{
"error": "invalid_request",
"message": "capability must look like namespace:verb."
}{
"error": "not_verified"
}⌘I
cURL
# EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
# Delivery events; clients do not call it
curl -X POST "https://parmana-api-real.vercel.app/v2/notifications/events" \
-H "Content-Type: application/json" \
-d '[{"type":"Delivery"}]'// EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
// Delivery events; clients do not call it
const response = await fetch(
"https://parmana-api-real.vercel.app/v2/notifications/events",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify([{ type: "Delivery" }]),
},
);
console.log(response.status, await response.text());# EXPERIMENTAL Policy version 2. Available only where the deployment enables it.
# Delivery events; clients do not call it
import json
import urllib.request
BODY = r'[{"type":"Delivery"}]'
def main() -> None:
request = urllib.request.Request(
"https://parmana-api-real.vercel.app/v2/notifications/events",
data=json.dumps(json.loads(BODY)).encode("utf-8"),
method="POST",
headers={
"Content-Type": "application/json",
},
)
with urllib.request.urlopen(request) as response:
print(response.status, response.read().decode("utf-8"))
if __name__ == "__main__":
main()const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([{}])
};
fetch('https://parmana-api-real.vercel.app/v2/notifications/events', 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://parmana-api-real.vercel.app/v2/notifications/events",
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([
[
]
]),
CURLOPT_HTTPHEADER => [
"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://parmana-api-real.vercel.app/v2/notifications/events"
payload := strings.NewReader("[\n {}\n]")
req, _ := http.NewRequest("POST", url, payload)
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://parmana-api-real.vercel.app/v2/notifications/events")
.header("Content-Type", "application/json")
.body("[\n {}\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://parmana-api-real.vercel.app/v2/notifications/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {}\n]"
response = http.request(request)
puts response.read_body{
"recorded": 1
}{
"error": "invalid_request",
"message": "capability must look like namespace:verb."
}{
"error": "not_verified"
}