---
title: "Update a DID"
method: POST
path: "/update"
tags: ["Universal Registrar"]
---

# Update a DID

`POST /update`

This endpoint updates a DID. As input it takes the existing DID, a DID document, plus optional DID registration [options](https://identity.foundation/did-registration/#options) and [secrets](https://identity.foundation/did-registration/#secret) needed to update a DID. The output is a state object that represents the current state of the DID update process.

See the [DID Registration](https://identity.foundation/did-registration/#update) specification for additional details.

## Request body

- UpdateRequest — Input fields for a DID operation.
  - `jobId` union — This input field is used to keep track of an ongoing DID operation process. See <a href="https://identity.foundation/did-registration/#jobid">https://identity.foundation/did-registration/#jobid</a>.
    - unknown
    - string
    - object
  - `options` RequestOptions — This input field contains an object with various options for the DID operation, such as the network where the DID operation should be executed. See <a href="https://identity.foundation/did-registration/#options">https://identity.foundation/did-registration/#options</a>.
    - `clientSecretMode` boolean
    - `storeSecrets` boolean
    - `returnSecrets` boolean
    - `requestVerificationMethod` VerificationMethodTemplate[]
      - `id` string
      - `type` string
      - `controller` string
      - `purpose` string[]
      - `publicKeyJwk` union
        - object
        - unknown
  - `secret` RequestSecret — This input field contains an object with DID controller keys and other secrets needed for performing the DID operation. See https://identity.foundation/did-registration/#secret.
    - `verificationMethod` union[]
      - union
        - VerificationMethodPublicData — A verification method public data object, see https://identity.foundation/did-registration/#verification-method-public-data
          - `id` string
          - `type` string, required
          - `controller` string
          - `purpose` string[]
          - `publicKeyJwk` object
          - `publicKeyMultibase` string
        - VerificationMethodPrivateData — A verification method private data object, see https://identity.foundation/did-registration/#verification-method-private-data
          - `id` string
          - `type` string, required
          - `controller` string
          - `purpose` string[]
          - `privateKeyJwk` object
          - `privateKeyMultibase` string
    - `signingResponse` union
      - object
      - unknown
    - `decryptionResponse` union
      - object
      - unknown
  - `did` string, required — This input field indicates the DID that is the target of the DID update operation.
  - `didDocumentOperation` string[] — This input field indicates which update operation(s) should be applied to a DID’s associated DID document. See <a href="https://identity.foundation/did-registration/#diddocumentoperation">https://identity.foundation/did-registration/#diddocumentoperation</a>.
  - `didDocument` DidDocument[] — This input field contains either a complete DID document, or an incremental change (diff) to a DID document. See <a href="https://identity.foundation/did-registration/#diddocument">https://identity.foundation/did-registration/#diddocument</a>.
    - `id` string
    - `controller` union
      - unknown
      - string
      - string[]
    - `verificationMethod` object[]
    - `service` object[]

## Response `200`

The request was successful, and the DID may or may not be fully updated yet, as indicated by the "didState.state" and "jobId" output fields. Additional state information plus metadata are available in the response body.

- UpdateState — The state after a DID operation.
  - `jobId` union
    - unknown
    - string
    - object
  - `didState` DidState, required — The current state of a DID.
    - `state` string, required
    - `did` string
    - `secret` DidStateSecret — This output field contains an object with DID controller keys and other secrets. See https://identity.foundation/did-registration/#didstatesecret.
      - `verificationMethod` union[]
        - union
          - VerificationMethodPublicData — A verification method public data object, see https://identity.foundation/did-registration/#verification-method-public-data
            - `id` string
            - `type` string, required
            - `controller` string
            - `purpose` string[]
            - `publicKeyJwk` object
            - `publicKeyMultibase` string
          - VerificationMethodPrivateData — A verification method private data object, see https://identity.foundation/did-registration/#verification-method-private-data
            - `id` string
            - `type` string, required
            - `controller` string
            - `purpose` string[]
            - `privateKeyJwk` object
            - `privateKeyMultibase` string
          - VerificationMethodTemplate[]
            - `id` string
            - `type` string
            - `controller` string
            - `purpose` string[]
            - `publicKeyJwk` union
              - …
    - `didDocument` DidDocument
      - `id` string
      - `controller` union
        - unknown
        - string
        - string[]
      - `verificationMethod` object[]
      - `service` object[]
  - `didRegistrationMetadata` object
  - `didDocumentMetadata` object

## Other responses

- `400` — A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.
- `500` — An internal error has occurred. Additional state information plus metadata may be available in the response body.

---

[API](https://skmtc.net/decentralized-identity/apis/universal-registrar.md) · [All operations](https://skmtc.net/decentralized-identity/apis/universal-registrar/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/decentralized-identity/universal-registrar/versions/bf85477559de/schema)
