> For the complete documentation index, see [llms.txt](https://docs.cheqd.io/product/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheqd.io/product/advanced/did-registrar/create-resource.md).

# Create a DID-Linked Resource

Follow these instructions to create a new Resource linked to a DID using DID registrar. This tutorial will use the cheqd did regisrtar swagger API's and the Veramo CLI.

> ⚠️ **Before you begin...** Make sure you've completed [creating a DID](/product/advanced/did-registrar/create-did.md) for this tutorial for Veramo CLI

## 1. Request Create Operation

Use the `/{did}/create-resource` api to publish a new DID-Linked Resource

1. Paste the DID in the did path parameter
2. Generate request body by providing name, type and base64 encoded data
3. Click on execute to perform the request

   This response requests an `action` for you to sign the serialized payload again in a CLI. This is a security feature which means you are not passing your private key to the Registrar. Note down the serialized payload, jobId from the response.

## 2. Sign Payload

Sign the serialized payload in your CLI with the below command

```bash
veramo execute -m keyManagerSign
```

Fill in the prompts

1. keyRef: Enter the kid of the keyPair generated in the first step
2. algorithm: `Ed25519`
3. data to sign: Paste the serialized payload from the previous step
4. enconding: Select `base64`

<details>

<summary>Example Response</summary>

```json
    Arguments:  {
    "keyRef": "d2ce308f19ee116ee810956605632ccd024bad8dedd02baf49f248d03acdaa48",
    "algorithm": "Ed25519",
    "data": "CgtIZWxsbyBXb3JsZBIkZDRkNDQwNGItNmY3Zi00ZTAyLThkNDEtYjgxYWZiMWYwNWVkGiQxZGM1ODBmNS1hNWNhLTRhMzMtYWY4My00MzEyNmZlYTZmMmQiDFJlc291cmNlTmFtZTIMVGV4dERvY3VtZW50",
    "encoding": "base64"
    }

    Result : "RiJelgAtm26arp8-cYfLVyyYnvoAgnnaL1Lndf_6G_iuoQtrTRgt5TD1GCwJXb30y8Fc7L_jzN3hH4WZRzeqDw"
```

</details>

**NOTE:** If there are *n* verification methods for the controller then *n* signatures are required to publish a resource.

Copy the Result value from the response.

## 3. Submit Signature

Use the `/create-resource` api again

1. Create the payload using the following values
   * jobId
   * secret
     * signingResponse
       * verificationMethodId
       * signature
2. Click on Execute
3. The state in didState should be `finished` in the response, the DID is created successfully

## 4. Check your Resource is live

You can check your DID on the [Universal Resolver](https://dev.uniresolver.io/) or by going to: `https://resolver.cheqd.net/1.0/identifiers/{yourDID}/resources/{yourResourceId}`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cheqd.io/product/advanced/did-registrar/create-resource.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
