Get an application policy
curl --request GET \
--url https://api.example.com/applications/{applicationId}/policyimport requests
url = "https://api.example.com/applications/{applicationId}/policy"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/applications/{applicationId}/policy', 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.example.com/applications/{applicationId}/policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/applications/{applicationId}/policy"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/applications/{applicationId}/policy")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/applications/{applicationId}/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyApplications
Get an application policy
Read the control policy attached to a registered application identifier
Get an application policy
curl --request GET \
--url https://api.example.com/applications/{applicationId}/policyimport requests
url = "https://api.example.com/applications/{applicationId}/policy"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/applications/{applicationId}/policy', 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.example.com/applications/{applicationId}/policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/applications/{applicationId}/policy"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/applications/{applicationId}/policy")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/applications/{applicationId}/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyThe V3 response below is available on the USE2 OpenDispatch Directory with the production spec 123 chain.
Read the active application’s policy from finalized chain state. The shared V3 policy map stores one policy per
The policy’s rules and payload templates define the control action.
application_id. Its owner is the registered control DID. The Application policy applies independently of the recipient’s DID or Persona policy. Read the application record to confirm its control DID and status.
An Application policy supplies third-party metadata and control instructions. It does not route messages or change Cache retention. Register the Application through the Directory, then manage its V3 policy through the policy routes. This endpoint is read-only.
Request
string
required
Lowercase application identifier containing 1 through 64 letters, digits, dots, underscores, or hyphens.
curl --request GET \
--url "https://directory.example.com/applications/talaria/policy"
Response
{
"application_id": "talaria",
"control_did": "did:openpayload:1111111111111111111111",
"application_revision": 1,
"policy_revision": 1,
"policy_ttl_seconds": 60,
"policy": {
"policy_id": "0x<deterministic-64-hex-id>",
"scope": {"type": "APPLICATION", "id": "talaria"},
"revision": 1,
"operator_did": "did:openpayload:1111111111111111111111",
"policy_ttl_seconds": 60,
"ruleset": [
{
"id": "notify-on-cache",
"priority": 100,
"conditions": [{"type": "EventEquals", "value": "CacheStored"}],
"action": {
"type": "DeliveryPlan/v1",
"entry_step": "notify",
"steps": [{
"id": "notify",
"operation": "Send",
"recipient_did": "did:openpayload:1111111111111111111111",
"payload_template": {"action": "sendPush"}
}],
"transitions": []
}
}
]
},
"block_hash": "0x<finalized-block-hash>"
}
Send delivers an encrypted control DDN envelope to its named recipient DID. Call sends a signed HTTPS request to a DID service endpoint on a domain registered to the policy owner. See shared policies and control actions. The application service decides what sendPush means; OpenPayload does not send a push notification itself.
policy_ttl_seconds is the maximum time a Cache may reuse this policy lookup. It is separate from message retention. A missing or inactive application policy returns 404.
Straight to the point
GET /applications/{applicationId}/policy
Success: 200 with the finalized policy and control DID
Absent or inactive: 404

