curl --request PUT \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/document/services/did%3Aopenpayload%3A1111111111111111111111%23relay" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateService",
"service": {
"id": "did:openpayload:1111111111111111111111#relay",
"type": "OpenPayloadRelayService",
"serviceEndpoint": ["https://relay.example.com"],
"authorization": [
"did:openpayload:1111111111111111111111#signing"
],
"priority": 10
},
"nonce": "<nonce>",
"valid_until": "<future-epoch-milliseconds>",
"signer_key_id": "root",
"canonical_payload": "<payload>",
"signature": "<signature>"
}'
{
"status": "accepted",
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateService",
"tx_hash": "<transaction-hash>",
"message": "DID document modification submitted"
}
DID documents
Update a DID service
Update a DID service in a public OpenPayload DID document.
curl --request PUT \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/document/services/did%3Aopenpayload%3A1111111111111111111111%23relay" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateService",
"service": {
"id": "did:openpayload:1111111111111111111111#relay",
"type": "OpenPayloadRelayService",
"serviceEndpoint": ["https://relay.example.com"],
"authorization": [
"did:openpayload:1111111111111111111111#signing"
],
"priority": 10
},
"nonce": "<nonce>",
"valid_until": "<future-epoch-milliseconds>",
"signer_key_id": "root",
"canonical_payload": "<payload>",
"signature": "<signature>"
}'
{
"status": "accepted",
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateService",
"tx_hash": "<transaction-hash>",
"message": "DID document modification submitted"
}
Update the public endpoint, authorization references, or priority of an existing DID service. The service
When a delivery policy references this service, every endpoint must be a public HTTPS base URI without credentials, a query string, or a fragment. Localhost, local/internal names, and known non-public or special-use IP literals are not valid policy route targets.
id in the body must match the URL component.
Read Authorize a Directory update before constructing canonical_payload.
Path parameters
string
required
The DID to update.
string
required
The service ID.
Request body
string
required
The DID to update. It must match the path.
string
required
The operation name. Use
UpdateService.object
required
The public service value for this operation.
string
required
Use
OpenPayloadRelayService, OpenPayloadCacheService, or OpenPayloadArchiveService when the service will be referenced by a Forward, Store, or Archive policy step, respectively.string | string[]
required
One URI or an array of URIs. The canonical representation is an array.
string[]
Optional authorized verification-method DID URLs.
integer
Optional non-negative
u32 priority.string
required
The request nonce.
string
required
The authorization expiration time.
string
The public signing-key identifier. Defaults to
root.string
required
The payload supplied by an OpenPayload-compatible signer.
string
required
The authorization signature.
curl --request PUT \
--url "https://directory.example.com/dids/did%3Aopenpayload%3A1111111111111111111111/document/services/did%3Aopenpayload%3A1111111111111111111111%23relay" \
--header "Content-Type: application/json" \
--data '{
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateService",
"service": {
"id": "did:openpayload:1111111111111111111111#relay",
"type": "OpenPayloadRelayService",
"serviceEndpoint": ["https://relay.example.com"],
"authorization": [
"did:openpayload:1111111111111111111111#signing"
],
"priority": 10
},
"nonce": "<nonce>",
"valid_until": "<future-epoch-milliseconds>",
"signer_key_id": "root",
"canonical_payload": "<payload>",
"signature": "<signature>"
}'
Response
string
required
The submission status.
string
required
The affected DID.
string
required
The document operation.
string
required
The transaction hash.
string
required
A human-readable submission result.
{
"status": "accepted",
"did": "did:openpayload:1111111111111111111111",
"action": "UpdateService",
"tx_hash": "<transaction-hash>",
"message": "DID document modification submitted"
}
202 Accepted means the Directory accepted the request for processing. It does not confirm final settlement.Straight to the point
- Action:
UpdateService - Body service ID must equal the URL-decoded
serviceId - Sign the SCALE authorization bytes, not JSON text

