Skip to main content

Keymaster API

Keymaster API (1.3.0)

Download OpenAPI specification:Download

Documentation for Keymaster API

Check if the Keymaster service is ready.

Returns a JSON object indicating the readiness status of the Keymaster service.

Responses

Response samples

Content type
application/json
{
  • "ready": true
}

List the available registries.

Responses

Response samples

Content type
application/json
{
  • "registries": [
    ]
}

Retrieve the current wallet.

Responses

Response samples

Content type
application/json
{
  • "wallet": {
    }
}

Save the wallet.

Request Body schema: application/json
required
required
object
object
counter
integer
object
current
string
object

Responses

Request samples

Content type
application/json
{
  • "wallet": {
    }
}

Response samples

Content type
application/json
{
  • "ok": true
}

Create a new wallet.

Request Body schema: application/json
optional
mnemonic
string

12 words separated by a space (optional).

overwrite
boolean
Default: false

Whether to overwrite the existing wallet.

Responses

Request samples

Content type
application/json
{
  • "mnemonic": "string",
  • "overwrite": false
}

Response samples

Content type
application/json
{
  • "wallet": {
    }
}

Create a backup of the current wallet.

Responses

Response samples

Content type
application/json
{
  • "ok": "string"
}

Recover the wallet from an existing backup.

Responses

Response samples

Content type
application/json
{
  • "wallet": {
    }
}

Check the integrity of the wallet.

Responses

Response samples

Content type
application/json
{
  • "check": {
    }
}

Fix the wallet by removing invalid or deactivated entries.

Responses

Response samples

Content type
application/json
{
  • "fix": {
    }
}

Decrypt and retrieve the wallet's mnemonic phrase.

Responses

Response samples

Content type
application/json
{
  • "mnemonic": "string"
}

Resolve a DID Document.

path Parameters
id
required
string

The DID or name to resolve.

query Parameters
atTime
string <date-time>

Timestamp to return the state of the DID as of this specific time (RFC3339/ISO8601 format).

atVersion
integer

Specific version of the DID Document to retrieve. Increments each time an update or delete operation occurs.

confirm
boolean

If true, returns the DID Document only if it is fully confirmed on the registry it references.

verify
boolean

If true, verifies the signature(s) of the DID operation(s) before returning the DID Document. If a signature is invalid, an error is thrown.

Responses

Response samples

Content type
application/json
{
  • "docs": {
    }
}

Revoke a DID.

Removes an existing DID from the system, effectively revoking it.

path Parameters
id
required
string

The DID to revoke.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Retrieve the current ID name.

Responses

Response samples

Content type
application/json
{
  • "current": "string"
}

Set the current ID.

Request Body schema: application/json
required
name
required
string

The name of the ID to set as current.

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

List all ID names in the wallet.

Responses

Response samples

Content type
application/json
{
  • "ids": [
    ]
}

Create a new ID in the wallet.

Request Body schema: application/json
required
name
string

The name of the new ID.

object

Optional parameters.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Resolve an ID to a DID Document.

path Parameters
id
required
string

The name or DID to resolve.

Responses

Response samples

Content type
application/json
{
  • "docs": { }
}

Remove an existing ID from the wallet.

path Parameters
id
required
string

The name of the ID to remove.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Rename an existing ID in the wallet.

path Parameters
id
required
string

The current name of the ID to be renamed.

Request Body schema: application/json
required
name
required
string

The new name for the ID.

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

Backup the specified ID.

path Parameters
id
required
string

The ID name or DID to back up.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Recover an existing ID from a backup reference.

path Parameters
id
required
string

The ID name or DID to recover.

Responses

Response samples

Content type
application/json
{
  • "recovered": "string"
}

List all name-to-DID mappings in the wallet.

Responses

Response samples

Content type
application/json
{
  • "names": {
    }
}

Add a new name-to-DID mapping.

Request Body schema: application/json
required
name
required
string

The human-readable name to associate with the DID.

did
required
string

The DID that this name should refer to.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "did": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

Retrieve the DID associated with a specific name.

Returns the DID for the provided human-readable name, if it exists.

path Parameters
name
required
string

The name for which you want the associated DID.

Responses

Response samples

Content type
application/json
{
  • "did": "string"
}

Remove an existing name-to-DID mapping.

path Parameters
name
required
string

The name whose mapping should be removed.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Create a default challenge DID with no parameters.

Responses

Response samples

Content type
application/json
{
  • "did": "string"
}

Create a challenge DID with custom data or options.

Request Body schema: application/json
optional
challenge
object

Arbitrary challenge data.

object

Additional options.

Responses

Request samples

Content type
application/json
{
  • "challenge": { },
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Create a response to an existing challenge DID.

Accepts a challenge DID (the DID of a previously created challenge) and an options object, then returns a new DID containing the response. Internally, the Keymaster finds matching credentials and bundles them into verifiable presentations. The response is encrypted for the original challenge's controller and stored as a new asset DID.

Request Body schema: application/json
required
challenge
string

DID of the challenge to respond to.

object

Additional parameters controlling how the response is created and stored.

Responses

Request samples

Content type
application/json
{
  • "challenge": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Verify a response to a challenge.

Request Body schema: application/json
required
response
string

DID of the challenge response asset to verify.

object

Additional verification parameters.

Responses

Request samples

Content type
application/json
{
  • "response": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "verify": {
    }
}

List all group DIDs owned by (or associated with) a specific ID.

query Parameters
owner
string

The name or DID of the owner ID for which to list groups.

Responses

Response samples

Content type
application/json
{
  • "groups": [
    ]
}

Create a new group asset (DID).

Request Body schema: application/json
required
name
string

The human-readable name of the group.

object

Additional parameters for creating the group.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Retrieve an existing group.

Returns the stored group object (including its name and members) for the given group DID or name.

path Parameters
name
required
string

The name or DID of the group to retrieve.

Responses

Response samples

Content type
application/json
{
  • "group": {
    }
}

Add a member to an existing group.

Adds a DID (or group) as a member of the specified group.

path Parameters
name
required
string

The name or DID of the group to update.

Request Body schema: application/json
required
member
required
string

The DID (or group DID) to add as a member.

Responses

Request samples

Content type
application/json
{
  • "member": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

Remove a member from an existing group.

path Parameters
name
required
string

The name or DID of the group to update.

Request Body schema: application/json
required
member
required
string

The DID (or group DID) to remove from the group.

Responses

Request samples

Content type
application/json
{
  • "member": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

Test membership in a group.

path Parameters
name
required
string

The name or DID of the group to test.

Request Body schema: application/json
optional
member
string

The DID or group DID to check for membership.

Responses

Request samples

Content type
application/json
{
  • "member": "string"
}

Response samples

Content type
application/json
{
  • "test": true
}

List all schema DIDs owned by (or associated with) a specific ID.

query Parameters
owner
string

The name or DID of the owner whose schemas should be listed.

Responses

Response samples

Content type
application/json
{
  • "schemas": [
    ]
}

Create a new schema.

Request Body schema: application/json
required
schema
object

A valid JSON Schema to be stored.

object

Additional creation parameters.

Responses

Request samples

Content type
application/json
{
  • "schema": { },
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Retrieve a stored schema.

path Parameters
id
required
string

The name or DID of the schema to retrieve.

Responses

Response samples

Content type
application/json
{
  • "schema": { }
}

Update an existing schema.

Replaces the schema (if valid) associated with the given DID or name. This operation will preserve the same DID while storing an updated schema in the underlying asset data.

path Parameters
id
required
string

The name or DID of the schema to update.

Request Body schema: application/json
required
schema
object

The new JSON Schema to store.

Responses

Request samples

Content type
application/json
{
  • "schema": { }
}

Response samples

Content type
application/json
{
  • "ok": true
}

Test if a DID or name refers to a valid schema.

Checks whether the given DID or name refers to an asset containing a valid JSON Schema. Returns true if it's a recognized valid schema, otherwise false.

path Parameters
id
required
string

The name or DID of the schema to test.

Request Body schema: application/json
optional
object

No required body parameters (reserved for future use).

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "test": true
}

Check whether the given ID (or DID) is an agent.

path Parameters
id
required
string

The ID name or DID to test.

Request Body schema: application/json
optional
object

No body required for this endpoint.

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "test": true
}

Prepare (bind) a credential without issuing it.

Request Body schema: application/json
required
schema
string

The schema DID or name to which this credential conforms.

subject
string

The subject DID (or name) for whom this credential is bound.

object

Optional parameters for credential creation.

Responses

Request samples

Content type
application/json
{
  • "schema": "string",
  • "subject": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "credential": { }
}

List all credentials currently held by the active ID.

Responses

Response samples

Content type
application/json
{
  • "held": [
    ]
}

Accept a credential into the "held" list of the current ID.

Request Body schema: application/json
required
did
required
string

The credential DID to hold.

Responses

Request samples

Content type
application/json
{
  • "did": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

Retrieve (decrypt) a held credential.

path Parameters
did
required
string

The credential DID to retrieve.

Responses

Response samples

Content type
application/json
{
  • "credential": { }
}

Remove a credential from the "held" list.

path Parameters
did
required
string

The credential DID to remove from holdings.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Publish a held credential publicly.

path Parameters
did
required
string

The credential DID to publish from the holder's wallet.

Request Body schema: application/json
optional
object

Additional parameters controlling the publication.

reveal
boolean
Default: false

Whether to include the full credential data or just a reference.

Responses

Request samples

Content type
application/json
{
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "ok": { }
}

Remove a published credential from the holder’s DID Document manifest.

path Parameters
did
required
string

The credential DID to unpublish.

Request Body schema: application/json
optional
object

No additional parameters by default.

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": "string"
}

List all credentials issued by the current ID.

Responses

Response samples

Content type
application/json
{
  • "issued": [
    ]
}

Issue a new credential.

Request Body schema: application/json
required
credential
object

A valid credential object. If omitted, options.schema and options.subject can be used to generate one.

object

Additional issuance parameters.

Responses

Request samples

Content type
application/json
{
  • "credential": { },
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Retrieve an issued credential by DID.

path Parameters
did
required
string

The DID of the issued credential to retrieve.

Responses

Response samples

Content type
application/json
{
  • "credential": { }
}

Update an existing issued credential.

path Parameters
did
required
string

The DID of the issued credential to update.

Request Body schema: application/json
required
credential
required
object

The new credential data to store.

Responses

Request samples

Content type
application/json
{
  • "credential": { }
}

Response samples

Content type
application/json
{
  • "ok": true
}

Revoke a previously issued credential.

path Parameters
did
required
string

The DID of the credential to revoke.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Rotate the current ID's keys.

Request Body schema: application/json
optional
object

No options required. Key rotation applies to the current ID.

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true
}

Encrypt a plaintext message into a DID asset.

Request Body schema: application/json
required
msg
string

The plaintext message to encrypt.

receiver
string

The DID (or name) of the intended recipient.

object

Additional encryption/creation parameters.

Responses

Request samples

Content type
application/json
{
  • "msg": "string",
  • "receiver": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Decrypt an encrypted message asset by DID.

Request Body schema: application/json
required
did
required
string

The DID representing the encrypted asset.

Responses

Request samples

Content type
application/json
{
  • "did": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Encrypt a JSON object into a DID asset.

Request Body schema: application/json
required
json
object

The JSON object to be encrypted.

receiver
string

The DID (or name) of the intended recipient.

object

Additional encryption/creation parameters (same fields as /keys/encrypt/message).

Responses

Request samples

Content type
application/json
{
  • "json": { },
  • "receiver": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Decrypt a JSON asset by DID.

Request Body schema: application/json
required
did
required
string

The DID representing the encrypted JSON asset.

Responses

Request samples

Content type
application/json
{
  • "did": "string"
}

Response samples

Content type
application/json
{
  • "json": { }
}

Add a signature to a JSON object using the current ID's keys.

Request Body schema: application/json
required
contents
required
string

A JSON string representing the data to be signed.

Responses

Request samples

Content type
application/json
{
  • "contents": "string"
}

Response samples

Content type
application/json
{
  • "signed": { }
}

Verify a JSON object's signature.

Request Body schema: application/json
required
json
required
object

The signed JSON object to verify, which must include a signature property.

Responses

Request samples

Content type
application/json
{
  • "json": { }
}

Response samples

Content type
application/json
{
  • "ok": true
}

Generate a JSON template from a schema.

Creates a JSON template object based on the specified schema. The template will include placeholder values that conform to the schema's structure and constraints.

path Parameters
id
required
string

The name or DID of the schema from which to generate a template.

Responses

Response samples

Content type
application/json
{
  • "template": { }
}

Create a new asset DID.

Request Body schema: application/json
required
data
object

Arbitrary data to store in this asset.

object

Additional creation parameters.

Responses

Request samples

Content type
application/json
{
  • "data": { },
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

List all asset DIDs owned by the current ID.

Responses

Response samples

Content type
application/json
{
  • "assets": [
    ]
}

Resolve (retrieve) an asset by DID or name.

path Parameters
id
required
string

The asset name or DID to resolve.

Responses

Response samples

Content type
application/json
{
  • "asset": { }
}

Update an existing asset.

path Parameters
id
required
string

The asset DID or name to update.

Request Body schema: application/json
required
data
object

The new data to store in this asset's DID Document.

Responses

Request samples

Content type
application/json
{
  • "data": { }
}

Response samples

Content type
application/json
{
  • "ok": true
}

Transfer ownership of an asset.

Transfers the ownership of the specified asset (identified by its DID or name) to a new controller.

path Parameters
id
required
string

The DID or name of the asset to transfer.

Request Body schema: application/json
required
controller
required
string

The DID of the new controller to transfer ownership to.

Responses

Request samples

Content type
application/json
{
  • "controller": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

Clone an existing asset.

Creates a new asset by cloning the data of an existing asset identified by its DID or name. The cloned asset will include a reference to the original asset in its metadata.

path Parameters
id
required
string

The DID or name of the asset to clone.

Request Body schema: application/json
optional
object

Additional parameters for cloning the asset.

registry
string

The registry in which to create the cloned asset (e.g., "local", "hyperswarm").

validUntil
string <date-time>

Expiration timestamp for the cloned asset.

Responses

Request samples

Content type
application/json
{
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Retrieve a boilerplate poll template.

Responses

Response samples

Content type
application/json
{
  • "template": {
    }
}

List polls owned by (or associated with) a given ID.

query Parameters
owner
string

The name or DID of the owner ID to list polls for.

Responses

Response samples

Content type
application/json
{
  • "polls": [
    ]
}

Create a new poll.

Request Body schema: application/json
required
object

The poll definition containing the required fields.

object

Additional parameters for poll creation.

Responses

Request samples

Content type
application/json
{
  • "poll": {
    },
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Retrieve the raw poll data by DID or name.

path Parameters
poll
required
string

The DID or name of the poll to retrieve.

Responses

Response samples

Content type
application/json
{
  • "poll": { }
}

Check if a DID or name refers to a valid poll.

path Parameters
poll
required
string

The DID or name of the poll to test.

Responses

Response samples

Content type
application/json
{
  • "test": true
}

View detailed poll information, including results if the caller is the poll owner.

path Parameters
poll
required
string

The DID or name of the poll to view.

Responses

Response samples

Content type
application/json
{
  • "poll": { }
}

Cast a vote in a poll.

Casts a vote in the specified poll. The vote is recorded as a ballot DID, which should be submitted to the poll owner.

path Parameters
poll
required
string

The DID or name of the poll to vote in.

Request Body schema: application/json
required
vote
required
integer

The numerical option index (1-based). Use 0 or set spoil in options to cast a spoiled ballot.

object

Additional vote parameters.

Responses

Request samples

Content type
application/json
{
  • "vote": 0,
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Record a received ballot in the poll.

Request Body schema: application/json
required
ballot
required
string

The DID of the ballot to record in the poll.

Responses

Request samples

Content type
application/json
{
  • "ballot": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

Publish final poll results to the poll’s DID Document.

path Parameters
poll
required
string

The DID or name of the poll to publish.

Request Body schema: application/json
optional
object

Publication parameters.

reveal
boolean
Default: false

If true, includes all ballots. If false, only the summary is published.

Responses

Request samples

Content type
application/json
{
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "ok": { }
}

Remove previously published poll results from the poll's DID Document.

path Parameters
poll
required
string

The DID or name of the poll to unpublish.

Request Body schema: application/json
optional
object

No additional parameters, unless needed for future expansions.

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true
}

Upload an image and create a DID for it.

Uploads an image as binary data and creates a DID for it. Additional options can be passed via the X-Options header.

header Parameters
X-Options
string

A JSON string containing additional options for the image creation process. Example: {"registry":"local","validUntil":"2025-12-31T23:59:59Z"}

Request Body schema: application/octet-stream
required

The image data to store as a DID asset.

string <binary>

Responses

Response samples

Content type
application/json
{
  • "did": "string"
}

Update an existing image.

Updates the binary data of an existing image identified by its DID.

path Parameters
id
required
string

The DID of the image to update.

Request Body schema: application/octet-stream
required

The new image data to replace the existing one.

string <binary>

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Retrieve an image by its DID.

Fetches the image data and metadata associated with the specified DID.

path Parameters
id
required
string

The DID of the image to retrieve.

Responses

Response samples

Content type
application/json
{
  • "image": {
    }
}

Test if the specified image is valid.

Checks whether the image associated with the given DID is valid or meets specific criteria.

path Parameters
id
required
string

The DID of the image to test.

Responses

Response samples

Content type
application/json
{
  • "test": true
}

Upload a binary document and create a DID for it.

Accepts binary data as the request body and creates a DID for the uploaded document. Additional options can be passed via the X-Options header.

header Parameters
X-Options
string

A JSON string containing additional options for the document creation process. Example: {"registry":"local","validUntil":"2025-12-31T23:59:59Z"}

Request Body schema: application/octet-stream
required

The binary document data to store as a DID asset.

string <binary>

Responses

Response samples

Content type
application/json
{
  • "did": "string"
}

Update an existing binary document.

Updates the binary data of an existing document identified by its DID. Additional options can be passed via the X-Options header.

path Parameters
id
required
string

The DID of the document to update.

header Parameters
X-Options
string

A JSON string containing additional options for the document update process. Example: {"registry":"local","validUntil":"2025-12-31T23:59:59Z"}

Request Body schema: application/octet-stream
required

The new binary document data to replace the existing one.

string <binary>

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Retrieve a binary document by its DID.

Fetches the binary document data and metadata associated with the specified DID.

path Parameters
id
required
string

The DID of the document to retrieve.

Responses

Response samples

Content type
application/json
{
  • "document": {
    }
}

Test if the specified document is valid.

Checks whether the document associated with the given DID is valid or meets specific criteria.

path Parameters
id
required
string

The DID of the document to test.

Responses

Response samples

Content type
application/json
{
  • "test": true
}

Retrieve data from the CAS (Content Addressable Storage)

path Parameters
cid
required
string

The CID (Content Identifier) of the data to retrieve

Responses

Response samples

Content type
application/json
"Not Found"

Create a new group vault.

Creates a new group vault asset and returns its DID.

Request Body schema: application/json
required
object

Additional options for group vault creation.

registry
string

The registry in which to create the group vault DID (e.g., "local", "hyperswarm").

validUntil
string <date-time>

Optional expiration date/time for the group vault.

Responses

Request samples

Content type
application/json
{
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Retrieve a group vault by DID.

Returns the group vault object for the specified DID.

path Parameters
id
required
string

The DID of the group vault to retrieve.

Responses

Response samples

Content type
application/json
{
  • "groupVault": {
    }
}

Test if a DID refers to a valid group vault.

Checks whether the specified DID or name refers to a valid group vault asset.

path Parameters
id
required
string

The DID or name of the group vault to test.

Responses

Response samples

Content type
application/json
{
  • "test": true
}

Add a member to a group vault.

Adds a new member to the specified group vault if the caller has permission.

path Parameters
id
required
string

The DID of the group vault.

Request Body schema: application/json
required
memberId
required
string

The DID of the member to add to the group vault.

Responses

Request samples

Content type
application/json
{
  • "memberId": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

List all members of a group vault. (available only to group vault owner)

Returns an object containing all member DIDs of the specified group vault.

path Parameters
id
required
string

The DID of the group vault.

Responses

Response samples

Content type
application/json
{
  • "members": {
    }
}

Remove a member from a group vault.

Removes the specified member from the group vault if the caller has permission.

path Parameters
id
required
string

The DID of the group vault.

member
required
string

The DID of the member to remove from the group vault.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Add an item to a group vault.

Adds a new item (binary data) to the specified group vault. The item name must be provided in the X-Options header as JSON.

path Parameters
id
required
string

The DID of the group vault.

header Parameters
X-Options
required
string

A JSON string containing additional options, including the item name. Example: {"name":"myfile.txt"}

Request Body schema: application/octet-stream
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

List all items in a group vault.

Returns an index of all items stored in the specified group vault.

path Parameters
id
required
string

The DID of the group vault.

Responses

Response samples

Content type
application/json
{
  • "items": {
    }
}

Remove an item from a group vault.

Deletes the specified item from the group vault if the caller has permission.

path Parameters
id
required
string

The DID of the group vault.

name
required
string

The name of the item to remove from the group vault.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Retrieve an item from a group vault.

Returns the binary data for a specific item stored in the group vault.

path Parameters
id
required
string

The DID of the group vault.

name
required
string

The name of the item to retrieve from the group vault.

Responses

Response samples

Content type
application/json
{
  • "error": "string"
}

List all Dmail messages for the current or specified owner.

Returns a mapping of Dmail DIDs to Dmail item objects for the current wallet or for the specified owner.

query Parameters
owner
string

The name or DID of the owner whose Dmail messages should be listed.

Responses

Response samples

Content type
application/json
{
  • "dmail": {
    }
}

Create a new Dmail message.

Request Body schema: application/json
required
message
object

The Dmail message object to create.

options
object

Additional creation options (e.g., registry, validUntil).

Responses

Request samples

Content type
application/json
{
  • "message": {
    },
  • "options": { }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Import a Dmail message into the inbox.

Request Body schema: application/json
required
did
string

The DID of the Dmail message to import.

Responses

Request samples

Content type
application/json
{
  • "did": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

Retrieve a Dmail message by DID.

path Parameters
id
required
string

The DID of the Dmail message to retrieve.

Responses

Response samples

Content type
application/json
{
  • "message": { }
}

Update an existing Dmail message.

path Parameters
id
required
string

The DID of the Dmail message to update.

Request Body schema: application/json
required
message
object

The updated Dmail message object.

Responses

Request samples

Content type
application/json
{
  • "message": { }
}

Response samples

Content type
application/json
{
  • "ok": true
}

Remove a Dmail message from the mailbox.

path Parameters
id
required
string

The DID of the Dmail message to remove.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Create a Notice and mark a Dmail message as sent.

path Parameters
id
required
string

The DID of the Dmail message to send.

Responses

Response samples

Content type
application/json
{
  • "did": "string"
}

File (move) a Dmail message to a different folder by updating its tags.

Updates the tags of a Dmail message, allowing it to be moved between folders such as inbox, archive, or trash.

path Parameters
id
required
string

The DID of the Dmail message to file.

Request Body schema: application/json
required
tags
required
Array of strings

The new tags to assign to the Dmail message (e.g., ["inbox"], ["archived"], ["deleted"]).

Responses

Request samples

Content type
application/json
{
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "ok": true
}

List all attachments for a specific Dmail message.

Returns a mapping of attachment names to their metadata for the specified Dmail DID.

path Parameters
id
required
string

The DID of the Dmail message whose attachments should be listed.

Responses

Response samples

Content type
application/json
{
  • "attachments": {
    }
}

Add an attachment to a specific Dmail message.

Uploads a binary attachment and associates it with the specified Dmail message. The attachment name must be provided in the X-Options header as JSON.

path Parameters
id
required
string

The DID of the Dmail message to attach the file to.

header Parameters
X-Options
required
string

A JSON string containing additional options, including the attachment name. Example: {"name":"myfile.txt"}

Request Body schema: application/octet-stream
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Remove an attachment from a specific Dmail message.

Deletes the specified attachment from the Dmail message identified by its DID.

path Parameters
id
required
string

The DID of the Dmail message.

name
required
string

The name of the attachment to remove.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Download a specific attachment from a Dmail message.

Returns the binary data for the specified attachment associated with the given Dmail DID.

path Parameters
id
required
string

The DID of the Dmail message.

name
required
string

The name of the attachment to download.

Responses

Response samples

Content type
application/json
"string"

Create a new notice asset.

Creates a new notice asset (e.g., for Dmail delivery) and returns its DID.

Request Body schema: application/json
required
message
object

The NoticeMessage object to create.

options
object

Additional creation options (e.g., registry, validUntil).

Responses

Request samples

Content type
application/json
{
  • "message": {
    },
  • "options": { }
}

Response samples

Content type
application/json
{
  • "did": "string"
}

Update an existing notice asset.

Updates the NoticeMessage data for the specified notice DID.

path Parameters
id
required
string

The DID of the notice to update.

Request Body schema: application/json
required
message
object

The updated NoticeMessage object.

Responses

Request samples

Content type
application/json
{
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "ok": true
}

Refresh all notices.

Refreshes the state of all notice assets, updating any that have changed.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}