All pages
Powered by GitBook
1 of 1

Loading...

Create a DID

Create a Decentralized Identifier (DID) with the did:cheqd DID method using cheqd Studio.

In cheqd Studio, you can easily create and publish a did:cheqd DID to the cheqd testnet or mainnet, anchoring it on-ledger with associated public keys and metadata. This DID can then be used to:

  • Sign and issue verifiable credentials as an 'issuer'.

  • Establish a trusted identity on cheqd for entities like organisations, digital products or AI Agents.

  • Serve as the parent identifier for DID-Linked Resources (e.g. status lists, trust registries).

This tutorial walks through the process of creating an Issuer DID using cheqd Studio's API or interface, including how to configure your keys, DID Document, and optional service endpoints.

🔐 Once registered, the DID becomes publicly resolvable and forms the cryptographic foundation of your identity as an issuer in decentralized ecosystems.

Step 1: Set up your account

Make sure you have set up your account with cheqd Studio and have generated an API key to authenticate with our APIs, using our guides below:

Step 2: Create a DID and associated DID Document

Using the /did/create API, users have two options for creating a did:cheqd DID and associated DID Document on-ledger:

  1. Filling out a simple form using the application/x-www-url-form-encoded or application/json option within an API client of your choice.

  2. Compiling a full DID Document body yourself using the application/json option, using already created identity keys, within an API client of your choice.

Option 1. Choose from a few variables and we will compile the DID for you

This is the easiest way to create DIDs on cheqd and is recommended for users who are not overly familiar with compiling DID Documents.

Using application/x-www-url-form-encoded

Using the application/x-www-url-form-encoded option, users are able to choose between the following variables to compile your DID:

network (required)
  • "testnet" (recommended for testing)

  • "mainnet" (recommended for production)

identifierFormatType (required)
  • "uuid" - this is a Universally Unique Identifier (recommended)

  • "base58btc" - this is an identifier which is commonly used for Hyperledger Indy transactions

verificationMethodType (required)
  • "Ed25519VerificationKey2018" (recommended)

  • "Ed25519VerificationKey2020"

service (optional)

This input field contains the required inputs for adding in a service section to the DID Document upon creation.

From this request, cheqd Studio will automatically create and publish a DID and associated DID Document to the ledger and return it as a response.

Expected response format

Using application/json

Alternatively, you can use the application/json option and pass only a few specific inputs, for example:

Or, if you have that you want to use, you can reference the created key ID, kid, in the request:

Note that if you are passing a kid that is already created, you must also specify the verificationMethodType within options.

Using the application/json option, users are able to choose between the following variables to compile your DID:

network (required)
  • "testnet" (recommended for testing)

  • "mainnet" (recommended for production)

identifierFormatType (required)
  • "uuid" - this is a Universally Unique Identifier (recommended)

  • "base58btc" - this is an identifier which is commonly used for Hyperledger Indy transactions

verificationMethodType (required)
  • "Ed25519VerificationKey2018" (recommended)

  • "Ed25519VerificationKey2020"

  • "JSONWebKey2020"

key (optional)
  • "8255ddadd75695e01f3d98fcec8ccc7861a030b317d4326b0e48a4d579ddc43a"

  • This is a kid that should have been created using our .

Note that this should be nested under

Option 2. Publish a fully compiled DID Document body yourself

Instead of generating a DID Document using simple parameters, you can create a fully formatted DID Document yourself. Before, submitting a manually created DID, you will need to have to input the key material into the DID document.

Step 1: Create a new keypair

Use the to generate a new keypair within the Credential Service key management store. Copy the publicKeyHex.

Step 2 (option 1): Utilise the DID Document template helper

To simplify this process of formatting a DID Document using your own keys, we've created a . Simply paste in your publicKeyHex and choose the variables to compile your DID Document template.

Step 3: Paste the response

Within the /did/create JSON payload, paste the response of your DID Document template, with your own signing keys.

Request format:

Step 2 (option 2) Use application/json options

Alternatively, you can use the application/json request format below.

You can use the kid created from Step 1 within the options section, and then compile the remainder of tour DID Document.

Step 3: Hit execute on the API

Hit execute on the API below to create your did:cheqd DID and associated DID Document.

List DIDs associated with your account

After creating a DID or multiple DIDs, users can list all the created DIDs associated with their account. Using the /did/list API.

Alternatives

Below are a list of alternatives for creating cheqd DIDs.

"JSONWebKey2020"
Note that this should be nested under options
options
created a keypair already
Key Create API
created a set of identity keys
/key/create API
Helper Tool in our DID Registrar here

Set Up Your Account

Set up your account with cheqd Studio and get your API key to start using the APIs.

Create API Keys

Create one or more API keys used to authenticate with the cheqd Studio APIs.

Cover

Credo

Credo is an SDK which supports the European Architecture and Reference Framework (ARF) standards as well as AnonCreds with full cheqd support for DIDs.

Cover

ACA-Py

ACA-Py plugin supports full cheqd support for DIDs as well as Verifiable Credentials.

Cover

Veramo

The Veramo SDK Plugin supports JSON, JSON-LD credentials as well as cheqd Credential Payments in an SDK.

Cover

DID Registrar

Simple setup for building cheqd DIDs into existing applications using REST APIs, building into the Universal Registrar.

Cover

Walt.id Community Stack

Walt.id Community Stack is an SDK that supports the European Architecture and Reference Framework (ARF) standards for identity, with full cheqd support.

Cover

cheqd Cosmos CLI

Cosmos CLI which directly communicates with the cheqd network. This should only be used for testing environments.

{
  "idFragment": "service-1",
  "type": "LinkedDomains",
  "serviceEndpoint": [
    "https://example.com"
  ]
}
{
  "did": "did:cheqd:testnet:ca029356-69dc-4cb4-a4c6-13b959ffaad6",
  "keys": [
    {
      "kid": "1a07cb379cd6f2d9acddf9a6d6af4e930d5696818a38020bde2b6ead5cd85039",
      "kms": "postgres",
      "type": "Ed25519",
      "publicKeyHex": "1a07cb379cd6f2d9acddf9a6d6af4e930d5696818a38020bde2b6ead5cd85039",
      "meta": {
        "algorithms": [
          "EdDSA",
          "Ed25519"
        ]
      },
      "controller": "did:cheqd:testnet:ca029356-69dc-4cb4-a4c6-13b959ffaad6"
    }
  ],
  "services": [],
  "provider": "did:cheqd:testnet",
  "controllerKeyRefs": [
    "1a07cb379cd6f2d9acddf9a6d6af4e930d5696818a38020bde2b6ead5cd85039"
  ],
  "controllerKeys": [
    {
      "kid": "1a07cb379cd6f2d9acddf9a6d6af4e930d5696818a38020bde2b6ead5cd85039",
      "kms": "postgres",
      "type": "Ed25519",
      "publicKeyHex": "1a07cb379cd6f2d9acddf9a6d6af4e930d5696818a38020bde2b6ead5cd85039",
      "meta": {
        "algorithms": [
          "EdDSA",
          "Ed25519"
        ]
      },
      "controller": "did:cheqd:testnet:ca029356-69dc-4cb4-a4c6-13b959ffaad6"
    }
  ],
  "controllerKeyId": "1a07cb379cd6f2d9acddf9a6d6af4e930d5696818a38020bde2b6ead5cd85039"
}
{
  "network": "testnet",
  "identifierFormatType": "uuid",
  "options": {
    "verificationMethodType": "Ed25519VerificationKey2018"
  }
}
{
  "network": "testnet",
  "identifierFormatType": "uuid",
  "options": {
    "key": "8255ddadd75695e01f3d98fcec8ccc7861a030b317d4326b0e48a4d579ddc43a", // Pass kid if you have created a key separately
    "verificationMethodType": "Ed25519VerificationKey2018"
  }
}
{
  "didDocument": {
    "id": "did:cheqd:testnet:0ff9df5d-653b-4f77-a66c-0035abc34d63",
    "controller": [
      "did:cheqd:testnet:0ff9df5d-653b-4f77-a66c-0035abc34d63"
    ],
    "verificationMethod": [
      {
        "id": "did:cheqd:testnet:0ff9df5d-653b-4f77-a66c-0035abc34d63#key-1",
        "type": "JsonWebKey2020",
        "controller": "did:cheqd:testnet:0ff9df5d-653b-4f77-a66c-0035abc34d63",
        "publicKeyJwk": {
          "crv": "Ed25519",
          "kty": "OKP",
          "x": "BFSLOxwMJgpmWRtTUuo0JAvz6VXGp4WDDcN0dFfCQKo"
        }
      }
    ],
    "authentication": [
      "did:cheqd:testnet:0ff9df5d-653b-4f77-a66c-0035abc34d63#key-1"
    ]
  }
}
"options": {
    "key": "8255ddadd75695e01f3d98fcec8ccc7861a030b317d4326b0e48a4d579ddc43a",
    "verificationMethodType": "Ed25519VerificationKey2018"
  },
  "didDocument": {
    "@context": [
      "https://www.w3.org/ns/did/v1"
    ],
    "id": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0",
    "controller": [
      "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"
    ],
    "authentication": [
      "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1"
    ],
    "service": [
      {
        "id": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1",
        "type": "LinkedDomains",
        "serviceEndpoint": [
          "https://example.com"
        ]
      }
    ]
  }
}

Fetch DIDs associated with an account.

get
/did/list

This endpoint returns the list of DIDs controlled by the account.

Authorizations
x-api-keystringRequired
Query parameters
networkstring · enumOptional

Filter DID by the network published.

Possible values:
providerIdstringOptional

Filter DID by the provider.

metadatabooleanOptional

Include metadata in response.

createdAtstring · dateOptional

Filter resource by created date

pagenumberOptional

Page number.

limitnumberOptional

Number of items to be listed in a single page.

Responses
200

The request was successful.

application/json
400

A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.

401

Access token is missing or invalid

500

An internal error has occurred. Additional state information plus metadata may be available in the response body.

get
/did/list
{
  "total": 1,
  "dids": [
    "text"
  ]
}
GET /did/list HTTP/1.1
Host: studio-api.cheqd.net
x-api-key: YOUR_API_KEY
Accept: */*

Create a DID Document.

post
/did/create

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
x-api-keystringRequired
Body
networkstring · enumOptional

Network to create the DID on (testnet or mainnet)

Possible values:
providerIdstringOptional

Identity Provider to create the DID

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
400

A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.

application/json
401

Access token is missing or invalid

500

An internal error has occurred. Additional state information plus metadata may be available in the response body.

application/json
post
/did/create
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: 286

"network='testnet'&providerId='text'&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"
      ]
    }
  ]
}