Host your DID document

Your DID document is the public part of your identity on the Notabene network. It holds your public keys and tells other institutions where to deliver Travel Rule messages to you. In production you publish it on your own domain, at the address your DID points to, while in sandbox Notabene publishes it and you have nothing to do.

1. Get your DID document

Notabene creates your DID document together with your account. Download it from Settings › My Organization in the dashboard, or read it through the API with an access token, as described in Authentication.

API reference
curl https://sandbox.notabene.id/api/v1/identity \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'const response = await fetch('https://sandbox.notabene.id/api/v1/identity', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer YOUR_ACCESS_TOKEN',
  },
});
const answer = response.status === 204 ? null : await response.json();import requests

response = requests.get(
    'https://sandbox.notabene.id/api/v1/identity',
    headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
)
answer = None if response.status_code == 204 else response.json()
Response200
{
  "did": "did:web:example.com:pt",
  "document": {
    "@context": [
      "https://www.w3.org/ns/did/v1",
      "https://w3id.org/security/suites/jws-2020/v1"
    ],
    "id": "did:web:example.com:pt",
    "verificationMethod": [
      {
        "id": "did:web:example.com:pt#nb-signing",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "Qm3P8a5DdOU1x9xKq0GZ4vFgk2Yc7Wbz2rNnT0sJmVw"
        }
      },
      {
        "id": "did:web:example.com:pt#nb-key-agreement",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "OKP",
          "crv": "X25519",
          "x": "hS9pQmV4c2tXbk1hY0w2ZlJ0eUJ3c0ZqNXpQa0h1dE0"
        }
      },
      {
        "id": "did:web:example.com:pt#nb-pii",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "EC",
          "crv": "P-256",
          "x": "QPd12KIDz9nFplcr_zn0aUHZlS5xeAxF1yBhevpPixU",
          "y": "eyqRi-hjnxxItYmZjWiHKvmJF3yMvCcz0T3lvVhZLXU"
        }
      }
    ],
    "authentication": [
      "did:web:example.com:pt#nb-signing"
    ],
    "assertionMethod": [
      "did:web:example.com:pt#nb-signing"
    ],
    "keyAgreement": [
      "did:web:example.com:pt#nb-key-agreement",
      "did:web:example.com:pt#nb-pii"
    ],
    "service": [
      {
        "id": "did:web:example.com:pt#didcomm",
        "type": "DIDCommMessaging",
        "serviceEndpoint": {
          "uri": "https://eu-a.notabene.id/didcomm",
          "accept": [
            "didcomm/v2"
          ],
          "routingKeys": []
        }
      }
    ]
  }
}
curl https://sandbox.notabene.id/api/v1/identity \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
const response = await fetch('https://sandbox.notabene.id/api/v1/identity', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer YOUR_ACCESS_TOKEN',
  },
});
const answer = response.status === 204 ? null : await response.json();
import requests

response = requests.get(
    'https://sandbox.notabene.id/api/v1/identity',
    headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
)
answer = None if response.status_code == 204 else response.json()
{
  "did": "did:web:example.com:pt",
  "document": {
    "@context": [
      "https://www.w3.org/ns/did/v1",
      "https://w3id.org/security/suites/jws-2020/v1"
    ],
    "id": "did:web:example.com:pt",
    "verificationMethod": [
      {
        "id": "did:web:example.com:pt#nb-signing",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "Qm3P8a5DdOU1x9xKq0GZ4vFgk2Yc7Wbz2rNnT0sJmVw"
        }
      },
      {
        "id": "did:web:example.com:pt#nb-key-agreement",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "OKP",
          "crv": "X25519",
          "x": "hS9pQmV4c2tXbk1hY0w2ZlJ0eUJ3c0ZqNXpQa0h1dE0"
        }
      },
      {
        "id": "did:web:example.com:pt#nb-pii",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "EC",
          "crv": "P-256",
          "x": "QPd12KIDz9nFplcr_zn0aUHZlS5xeAxF1yBhevpPixU",
          "y": "eyqRi-hjnxxItYmZjWiHKvmJF3yMvCcz0T3lvVhZLXU"
        }
      }
    ],
    "authentication": [
      "did:web:example.com:pt#nb-signing"
    ],
    "assertionMethod": [
      "did:web:example.com:pt#nb-signing"
    ],
    "keyAgreement": [
      "did:web:example.com:pt#nb-key-agreement",
      "did:web:example.com:pt#nb-pii"
    ],
    "service": [
      {
        "id": "did:web:example.com:pt#didcomm",
        "type": "DIDCommMessaging",
        "serviceEndpoint": {
          "uri": "https://eu-a.notabene.id/didcomm",
          "accept": [
            "didcomm/v2"
          ],
          "routingKeys": []
        }
      }
    ]
  }
}

Publish only the document object, because the response also holds your DID.

2. Find where it must be hosted

The address comes from your DID: your domain, then your jurisdiction as a folder, then did.json. It must be served over HTTPS on exactly that host, and example.com and www.example.com count as two different addresses.

DIDAddress of its document
did:web:example.com:pthttps://example.com/pt/did.json
did:web:static.example.com:pthttps://static.example.com/pt/did.json
DIDAddress of its document
did:web:example.com:pthttps://example.com/pt/did.json
did:web:static.example.com:pthttps://static.example.com/pt/did.json

3. Publish it

Either host a copy of the document at that address, or redirect the address to Notabene’s copy.

OptionWhat you do
Host a copySave the document as did.json at that address, served over HTTPS as JSON. Publish it again whenever it changes. Only a copy can hold your own key.
RedirectRedirect that address to the address of Notabene’s copyplaceholder. The document then stays up to date without any action from you, but it cannot hold your own key.
OptionWhat you do
Host a copySave the document as did.json at that address, served over HTTPS as JSON. Publish it again whenever it changes. Only a copy can hold your own key.
RedirectRedirect that address to the address of Notabene’s copy (placeholder). The document then stays up to date without any action from you, but it cannot hold your own key.

To receive personal data that only you can decrypt, add your own public key to your copy next to Notabene’s keys, as described in Encryption. Leave the keys already in it in place, including the PII key whose id ends in #nb-pii, because Notabene uses them for more than personal data. The format and id your own key should use are still to be published. (placeholder)

4. Check that it is online

Open the address in a browser or with curl, and check that it returns your DID document with your DID as its id.

cURL
curl -sL https://example.com/pt/did.json
curl -sL https://example.com/pt/did.json

Most often the problem is a redirect from example.com to www.example.com, a login page or firewall in front of the file, or an HTML error page instead of JSON. If the document stops answering later, the dashboard Inbox shows the warning “Your DID doc is unreachable”.

What the document contains

Notabene generates the document for you, as in the response of step 1. Publish it as it is, unless you add your own key for end-to-end encryption.

PartWhat it is
idYour DID. It must match the address the document is served from.
verificationMethodYour public keys. The private keys stay with your node.
authentication, assertionMethodThe key that signs your messages.
keyAgreementThe keys counterparty institutions use to encrypt data for you.
serviceWhere counterparty institutions deliver Travel Rule messages to you: your node’s DIDComm endpoint.
PartWhat it is
idYour DID. It must match the address the document is served from.
verificationMethodYour public keys. The private keys stay with your node.
authentication, assertionMethodThe key that signs your messages.
keyAgreementThe keys counterparty institutions use to encrypt data for you.
serviceWhere counterparty institutions deliver Travel Rule messages to you: your node’s DIDComm endpoint.

To learn more about DID documents, see the W3C DID specification.

How it works

Host a copy
Redirect
Steps
Host a copy
Redirect

Optional

← → the step before and after · Esc all steps
Step 1
1Get your DID document
You, from the dashboard or the API

Notabene creates your DID document together with your account, and 1. Get your DID document shows how to download or read it.

← → the step before and after · Esc all steps
Step 2
2Find where it must be hosted
From your DID

Your DID tells you where the document must be hosted, and 2. Find where it must be hosted gives the rule with examples.

← → the step before and after · Esc all steps
Host a copy · Step 3
3Publish the file
You, on your web server

Save the document as did.json at that address, served over HTTPS as JSON. See 3. Publish it.

← → the step before and after · Esc all steps
Host a copy · Optional
Add your own key
You, for end-to-end encryption

To receive Travel Rule data that only you can decrypt, add your own public key to the copy, next to Notabene’s keys. See 3. Publish it.

← → the step before and after · Esc all steps
Redirect · Step 3
3Redirect to Notabene
You, on your web server

Redirect that address to Notabene’s copy, which stays up to date by itself. See 3. Publish it.

← → the step before and after · Esc all steps
Step 4
4Check that it is online
You

Open the address in a browser or with curl and check that it returns your DID document, as in 4. Check that it is online.

← → the step before and after · Esc all steps

Activating your account is a separate step, step 5 of Create your account, and it does not wait for your DID document.


Did this page help you?