Create a DID

Create a DID and DID Document using cheqd Studio.

Create a DID Document.

post

This endpoint creates a DID and associated DID Document. As input, it can take the DID Document parameters via a form, or the fully-assembled DID Document itself.

Authorizations
Body
networkstring · enumOptional

Network to create the DID on (testnet or mainnet)

Possible values:
identifierFormatTypestring · enumOptional

Algorithm to use for generating the method-specific ID. The two styles supported are UUIDs and Indy-style Base58. See cheqd DID method documentation for more details.

Possible values:
verificationMethodTypestring · enumOptional

Type of verification method to use for the DID. See DID Core specification for more details. Only the types listed below are supported.

Possible values:
keystringOptional

The unique identifier in hexadecimal public key format used in the verification method to create the DID.

@contextstring[]OptionalExample: ["https://www.w3.org/ns/did/v1"]
Responses
200

The request was successful.

application/json
post
POST /did/create HTTP/1.1
Host: studio-api.cheqd.net
x-api-key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 266

"network='testnet'&identifierFormatType='uuid'&verificationMethodType='Ed25519VerificationKey2018'&service=[{'idFragment':'service-1','type':'LinkedDomains','serviceEndpoint':['https://example.com']}]&key='text'&@context=['https://www.w3.org/ns/did/v1']"
{
  "did": "text",
  "controllerKeyId": "text",
  "keys": [
    {}
  ],
  "services": [
    {
      "id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1",
      "type": "LinkedDomains",
      "serviceEndpoint": [
        "https://example.com"
      ],
      "priority": 0,
      "recipientKeys": [
        "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1"
      ],
      "routingKeys": [
        "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-2"
      ],
      "accept": [
        "didcomm/aip2;env=rfc587"
      ]
    }
  ]
}

Last updated

Was this helpful?