curl --request PUT \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/delivery-constraints" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"action": "set_did_delivery_constraints",
"delivery_constraints": {
"requested_cache_seconds": 86400,
"max_http_envelope_bytes": 26214400,
"max_unchunked_message_bytes": 16777216,
"max_chunk_bytes": 2097152,
"max_replicas": 2
},
"nonce": "<policy-nonce>",
"valid_until": "<epoch-milliseconds>",
"signer_key_id": "did:openpayload:1111111111111111111111#keys-1",
"canonical_payload": "<encoded-scale-payload>",
"signature": "<base64-ed25519-signature>"
}'
DIDs
Set DID delivery constraints
Publish clock-time retention, message, chunk, and replica limits for a DID
curl --request PUT \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/delivery-constraints" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"action": "set_did_delivery_constraints",
"delivery_constraints": {
"requested_cache_seconds": 86400,
"max_http_envelope_bytes": 26214400,
"max_unchunked_message_bytes": 16777216,
"max_chunk_bytes": 2097152,
"max_replicas": 2
},
"nonce": "<policy-nonce>",
"valid_until": "<epoch-milliseconds>",
"signer_key_id": "did:openpayload:1111111111111111111111#keys-1",
"canonical_payload": "<encoded-scale-payload>",
"signature": "<base64-ed25519-signature>"
}'
Set the delivery limits controlled by a DID operator. A policy rule may narrow these values but cannot increase them.
This mutation uses an authorized DID proof and the current Policy V2
Omit
policy_nonce. See Authorize a Directory update.
Request
string
required
The URL-encoded DID. It must equal the signed body
did.object
required
Requested delivery limits. Active values must be positive and at or below their network maxima.
integer
required
Operator-requested Cache retention in clock-time seconds, stored as a positive
u32. The chain preserves this request but derives an effective maximum of 172800 seconds.integer
required
Maximum raw HTTP request envelope. Maximum
26214400.integer
required
Maximum decoded encrypted message sent without chunking. Maximum
16777216.integer
required
Maximum decoded bytes in one chunk. Maximum
2097152.integer
Deprecated Policy V2 wire-compatibility field. Omit it. The Directory encodes the unbounded compatibility sentinel
4294967295.integer
Deprecated Policy V2 wire-compatibility field. Omit it. The Directory encodes the unbounded compatibility sentinel
65535.integer
required
Maximum Cache replicas. Maximum
4.effective_ttl_seconds; it is chain-derived and read-only. The active byte limits must satisfy the consistency rules described in Delivery policies.
curl --request PUT \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/delivery-constraints" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"action": "set_did_delivery_constraints",
"delivery_constraints": {
"requested_cache_seconds": 86400,
"max_http_envelope_bytes": 26214400,
"max_unchunked_message_bytes": 16777216,
"max_chunk_bytes": 2097152,
"max_replicas": 2
},
"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": "did:openpayload:1111111111111111111111",
"extrinsic": "set_did_delivery_constraints",
"tx_hash": "<transaction-hash>",
"message": "Chain extrinsic submitted"
}
202 Accepted confirms submission for processing, not final settlement. Read the constraints from finalized state before relying on them.
Straight to the point
PUT /dids/{url-encoded-did}/delivery-constraints
- Proof: authorized DID key
- Action:
set_did_delivery_constraints - Nonce: Policy V2
policy_nonce - Above-network active byte or replica values:
400 invalid_delivery_constraints - TTL above 48 hours: accepted as requested, effective value clamped to 48 hours
- Accepted submission:
202

