---
title: "Register or Update a DID"
method: PUT
path: "/did"
tags: ["DID"]
---

# Register or Update a DID

`PUT /did`

Register or Updte a DID in the DHT

## Request body

- object
  - `did` string, required — The DID to register or update.
  - `sig` string, required
  - `seq` integer, required — A sequence number for the request, recommended to be a unix timestamp in seconds.
  - `v` string, required
  - `retention_proof` string — A retention proof calculated according to the spec-defined retention proof algorithm.

## Response `202`

Accepted. The server has accepted the request as valid and will publish it to the

- string

## Other responses

- `400` — Invalid request body.
- `401` — Invalid signature.
- `409` — DID already exists with a higher sequence number. May still be accepted if the Gateway supports historical resolution.

## Changes

- **2023-11-20** `4b01176296d1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/decentralized-identity/apis/did-dht-gateway-api/changes/did/put.md)

---

[API](https://skmtc.dev/decentralized-identity/apis/did-dht-gateway-api.md) · [All operations](https://skmtc.dev/decentralized-identity/apis/did-dht-gateway-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/decentralized-identity/did-dht-gateway-api/revisions/2df84fe481c8/schema)
