light-mode-image
Learn
MATTR VII PlatformDIDs

Create a DID

Takes a supported DID method and returns a new DID with its generated keys and required information. This endpoint also registers the DID Document when applicable.

MATTR VII currently supports creating DIDs of the following methods:

  • did:key: The most basic type of DID. The public key forms the DID and has no further data associated with it.
  • did:web: This type of DID requires hosting the DID document on a publicly accessible domain in order to make the document and its contents available.

Analytics Events

DID_CREATE_STARTDID_CREATE_SUCCESSDID_CREATE_FAIL

Roles

adminissuerverifierdts-provider
POST/v1/dids
AuthorizationBearer <token>

In: header

Options for creating the decentralized identifier

methodstring

Used to determine the type of DID to be created based on its DID method.

Value in"key" | "web"
options?object

To define a key type for a did:key or to define a domain for did:web

Items1 <= items

Response Body

curl -X POST "https://example.vii.au01.mattr.global/v1/dids" \  -H "Content-Type: application/json" \  -d '{    "method": "web",    "options": {      "url": "learn.vii.au01.mattr.global"    }  }'

{
  "did": "did:web:learn.vii.au01.mattr.global",
  "registrationStatus": "COMPLETED",
  "localMetadata": {
    "keys": [
      {
        "didDocumentKeyId": "did:web:learn.vii.au01.mattr.global#z12KiP7r",
        "kmsKeyId": "96fa6a94-a8cf-4afd-825b-70b46bdb60ee"
      },
      {
        "didDocumentKeyId": "did:web:learn.vii.au01.mattr.global#nCxqyzxHFi",
        "kmsKeyId": "378dfe87-6eba-4779-a402-34ff5b267840"
      },
      {
        "didDocumentKeyId": "did:web:learn.vii.au01.mattr.global#2vcj3MjR4d",
        "kmsKeyId": "a0cba537-ffe1-486d-aedd-6ead80e75519"
      },
      {
        "didDocumentKeyId": "did:web:learn.vii.au01.mattr.global#CU6dJt9p8t",
        "kmsKeyId": "250c4e1f-bae3-44ca-9f4e-4f7ff15851e2"
      }
    ],
    "registered": 1674421454614,
    "initialDidDocument": {
      "@context": [
        "https://w3.org/ns/did/v1",
        "https://w3id.org/security/suites/x25519-2019/v1",
        "https://w3id.org/security/suites/jws-2020/v1",
        "https://w3id.org/security/suites/ed25519-2018/v1",
        "https://w3id.org/security/bbs/v1"
      ],
      "id": "did:web:learn.vii.au01.mattr.global",
      "verificationMethod": [
        {
          "id": "did:web:learn.vii.au01.mattr.global#z12KiP7r",
          "controller": "did:web:learn.vii.au01.mattr.global",
          "type": "JsonWebKey2020",
          "publicKeyJwk": {
            "kty": "EC",
            "crv": "P-256",
            "x": "PZWoBmV7vjJ55Aq5hFAPIH6uDA-V3G0ueVe22ahgL7w",
            "y": "7kzcj257Zvfpzyj2gFWrnCIbXZxQ6WyDOo2MdA6mpMI"
          }
        },
        {
          "id": "did:web:learn.vii.au01.mattr.global#2vcj3MjR4d",
          "controller": "did:web:learn.vii.au01.mattr.global",
          "type": "Ed25519VerificationKey2018",
          "publicKeyBase58": "2vcj3MjR4dSKq5asFQ9oor7iZsqTKTfBpjLHgaP15Y24"
        },
        {
          "id": "did:web:learn.vii.au01.mattr.global#nCxqyzxHFi",
          "controller": "did:web:learn.vii.au01.mattr.global",
          "type": "Bls12381G2Key2020",
          "publicKeyBase58": "nCxqyzxHFioYCVwinAwJzTPwfs84pPaseZQFkfGXUxx5ZD93HE43aXicYsyj2s5HYFSSYw9WtRaWsKeF9qn2jBVZ2UNuQCdG1qna9jpZPTvWQY1t2Z2hxhhs8MV5P5QaozB"
        }
      ],
      "authentication": [
        "did:web:learn.vii.au01.mattr.global#2vcj3MjR4d"
      ],
      "assertionMethod": [
        "did:web:learn.vii.au01.mattr.global#z12KiP7r",
        "did:web:learn.vii.au01.mattr.global#2vcj3MjR4d",
        "did:web:learn.vii.au01.mattr.global#nCxqyzxHFi"
      ],
      "capabilityDelegation": [
        "did:web:learn.vii.au01.mattr.global#z12KiP7r",
        "did:web:learn.vii.au01.mattr.global#2vcj3MjR4d",
        "did:web:learn.vii.au01.mattr.global#nCxqyzxHFi"
      ],
      "capabilityInvocation": [
        "did:web:learn.vii.au01.mattr.global#z12KiP7r",
        "did:web:learn.vii.au01.mattr.global#2vcj3MjR4d",
        "did:web:learn.vii.au01.mattr.global#nCxqyzxHFi"
      ],
      "keyAgreement": [
        {
          "id": "did:web:learn.vii.au01.mattr.global#CU6dJt9p8t",
          "controller": "did:web:learn.vii.au01.mattr.global",
          "type": "X25519KeyAgreementKey2019",
          "publicKeyBase58": "CU6dJt9p8twE4hmyGVFbVpUMmu6G732bVgD1tNupwYY7"
        }
      ]
    }
  }
}
{
  "code": "string",
  "message": "string",
  "details": [
    {
      "value": "string",
      "msg": "Invalid value",
      "param": "id",
      "location": "body"
    }
  ]
}

How would you rate this page?