curl --request PUT \
--url "https://directory.example.com/delivery-policies/personas/example.com" \
--header "Content-Type: application/json" \
--data '{
"persona": "example.com",
"action": "set_persona_policy_v2",
"policy": {
"policy_id": "0x<64-hex-policy-id>",
"scope": {"type":"PERSONA","id":"example.com"},
"revision": 4,
"operator_did": "did:openpayload:1111111111111111111111",
"ruleset": [
{
"id": "legal-delivery",
"priority": 100,
"conditions": [
{"type":"TagEquals","value":"Legal"}
],
"action": {
"type": "DeliveryPlan/v1",
"entry_step": "inspection",
"steps": [
{
"id": "inspection",
"operation": "Forward",
"targets": [
{
"service_did": "did:openpayload:1111111111111111111111",
"service_id": "did:openpayload:1111111111111111111111#inspection",
"priority": 100,
"weight": 100
}
]
}
],
"transitions": []
}
}
]
},
"nonce": "<policy-nonce>",
"valid_until": "<epoch-milliseconds>",
"signer_key_id": "did:openpayload:1111111111111111111111#keys-1",
"canonical_payload": "<encoded-scale-payload>",
"signature": "<base64-ed25519-signature>"
}'
Delivery policies
Set a Persona delivery policy
Create or replace the ordered routing rules owned by a registered Persona
curl --request PUT \
--url "https://directory.example.com/delivery-policies/personas/example.com" \
--header "Content-Type: application/json" \
--data '{
"persona": "example.com",
"action": "set_persona_policy_v2",
"policy": {
"policy_id": "0x<64-hex-policy-id>",
"scope": {"type":"PERSONA","id":"example.com"},
"revision": 4,
"operator_did": "did:openpayload:1111111111111111111111",
"ruleset": [
{
"id": "legal-delivery",
"priority": 100,
"conditions": [
{"type":"TagEquals","value":"Legal"}
],
"action": {
"type": "DeliveryPlan/v1",
"entry_step": "inspection",
"steps": [
{
"id": "inspection",
"operation": "Forward",
"targets": [
{
"service_did": "did:openpayload:1111111111111111111111",
"service_id": "did:openpayload:1111111111111111111111#inspection",
"priority": 100,
"weight": 100
}
]
}
],
"transitions": []
}
}
]
},
"nonce": "<policy-nonce>",
"valid_until": "<epoch-milliseconds>",
"signer_key_id": "did:openpayload:1111111111111111111111#keys-1",
"canonical_payload": "<encoded-scale-payload>",
"signature": "<base64-ed25519-signature>"
}'
Create or replace the policy for an active Persona with one active Persona-controller signature. Persona v1 fixes
controller_threshold at 1; multi-signature threshold authorization is reserved for a future contract.
The policy scope.id is the canonical DNS Persona, not a DID. Rules can narrow the Persona’s constraints and match a tag, recipient DID, or both.
Request
string
required
The registered Persona. It must equal
policy.scope.id after normalization.string
required
Deterministic 32-byte policy identifier encoded as
0x plus 64 hexadecimal characters.curl --request PUT \
--url "https://directory.example.com/delivery-policies/personas/example.com" \
--header "Content-Type: application/json" \
--data '{
"persona": "example.com",
"action": "set_persona_policy_v2",
"policy": {
"policy_id": "0x<64-hex-policy-id>",
"scope": {"type":"PERSONA","id":"example.com"},
"revision": 4,
"operator_did": "did:openpayload:1111111111111111111111",
"ruleset": [
{
"id": "legal-delivery",
"priority": 100,
"conditions": [
{"type":"TagEquals","value":"Legal"}
],
"action": {
"type": "DeliveryPlan/v1",
"entry_step": "inspection",
"steps": [
{
"id": "inspection",
"operation": "Forward",
"targets": [
{
"service_did": "did:openpayload:1111111111111111111111",
"service_id": "did:openpayload:1111111111111111111111#inspection",
"priority": 100,
"weight": 100
}
]
}
],
"transitions": []
}
}
]
},
"nonce": "<policy-nonce>",
"valid_until": "<epoch-milliseconds>",
"signer_key_id": "did:openpayload:1111111111111111111111#keys-1",
"canonical_payload": "<encoded-scale-payload>",
"signature": "<base64-ed25519-signature>"
}'
Response
202 Response
{
"status": "accepted",
"did": "example.com",
"extrinsic": "apply_policy_v2_with_proof",
"tx_hash": "<transaction-hash>",
"message": "Chain extrinsic submitted"
}
Straight to the point
PUT /delivery-policies/personas/{persona}
- Persona must be active
- Action:
set_persona_policy_v2 - Revision:
1on creation, otherwise finalized revision plus one - Authorization: one active Persona controller in Persona v1
- Complete create or replacement
- Invalid graph, incompatible service, or non-public route endpoint:
400 invalid_delivery_policy - Accepted submission:
202

