Skip to main content
A DID service tells compatible clients where or how an identity can be reached. For example, it can advertise a Relay, Cache, or Archive endpoint. This is an authorized public-state change. Read Authorize a Directory update before constructing canonical_payload.

Path parameters

string
required
The DID to update.

Request body

string
required
The DID to update. It must match the path.
string
required
The operation name. Use AddService.
object
required
The public service value for this operation.
string
required
The complete DID URL for this service, such as did:openpayload:...#relay, did:openpayload:...#cache, or did:openpayload:...#archive.
string
required
Use OpenPayloadRelayService for Forward policy steps, OpenPayloadCacheService for Store, or OpenPayloadArchiveService for Archive. A single physical endpoint can be published under separate service IDs when it supports both Cache and Archive roles.
string | string[]
required
One URI or an array of URIs. Responses use the canonical array form.
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.
string[]
DID URL references to verification methods allowed to authorize use of the service. Include this for OpenPayloadCacheService so recipients can prove retrieval and acknowledgement access. An Archive entry does not replace the Cache entry used for those proofs.
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.
Each service is a separate mutation and consumes the current document_nonce. Fetch the nonce again, rebuild the canonical payload, and sign it before submitting the second service.

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.
202 Accepted means the Directory accepted the request for processing. It does not confirm final settlement.

Straight to the point

  • Action: AddService
  • Canonical item: the complete service object
  • Nonce domain: DID document
  • Accepted payload encoding: 0x hex or Base64 SCALE bytes

Complete messaging DID document

See both services in context with the verification and key-agreement methods they depend on.