# OpenAPI For Dfinity

> Version 1.0

HashKey DID API for dfinity

## Path Details

* API Endpoint: <https://api.hashkey.id/icp/api>

### \[GET]/did/{did}

* Summary Get DID info
* Description Get DID info

#### Responses

* 200 OK

`application/json`

```ts
{
  code?: integer
  data: {
    id?: integer
	// DID for user
    did?: string
	// Address for user
    addr?: string
	// Principal for user
    principal?: string
	// Token ID for user in DID nft contract
    tokenId?: string
    userInfo: {
      userId?: integer
	  // Nickname for user
      nickname?: string
	  // DID card url for user. Full url with protocol and host.
      photoUrl?: string
	  // User card background number
      backgroundNumber?: integer
	  // User card backfrount number
      backfrontNumber?: integer
	  // Avatar url for user. Full url with protocol and host.
      headUrl?: string
      photoParts?: string
    }
  }
  msg?: string
}
```

## References

### #/components/schemas/DIDInfo

```ts
{
  id?: integer
  did?: string
  addr?: string
  principal?: string
  tokenId?: string
  userInfo: {
    userId?: integer
    nickname?: string
    photoUrl?: string
    backgroundNumber?: integer
    backfrontNumber?: integer
    headUrl?: string
    photoParts?: string
    createdAt?: string
    updatedAt?: string
    ldz?: string
  }
  createdAt?: string
  updatedAt?: string
}
```


---

# Agent Instructions: 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:

```
GET https://docs.hashkey.id/developers/api-reference/openapi-icp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
