---
title: "POST /dids/create"
method: POST
path: "/dids/create"
tags: ["Dids"]
---

# POST /dids/create

`POST /dids/create`

Create a new did.

## Headers

- `x-tenant-id` string

## Request body

- union
  - KeyOrJwkDidCreateOptions
    - `method` 'key' | 'jwk', required
    - `options` object, required
      - `keyType` 'ed25519' | 'bls12381g1g2' | 'bls12381g1' | 'bls12381g2' | 'x25519' | 'p256' | 'p384' | 'p521' | 'k256', required
    - `secret` object
      - `privateKeyBase58` string
      - `seedBase58` string
  - DidCreateBaseOptions
    - `method` string
    - `did` string
    - `options` AnyJsonObject — JSON object that can contain any key-value pairs
    - `secret` AnyJsonObject — JSON object that can contain any key-value pairs
    - `didDocument` DidDocumentJson — Represents a DID document.
      - `publicKey` VerificationMethod[]
        - `id` string, required
        - `type` string, required
        - `controller` string, required
        - `publicKeyBase58` string
        - `publicKeyBase64` string
        - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
          - `alg` string
          - `crv` string
          - `e` string
          - `ext` boolean
          - `key_ops` string[]
          - `kid` string
          - `kty` string, required
          - `n` string
          - `use` string
          - `x` string
          - `y` string
        - `publicKeyHex` string
        - `publicKeyMultibase` string
        - `blockchainAccountId` string
        - `ethereumAddress` string
        - `conditionOr` VerificationMethod[]
        - `conditionAnd` VerificationMethod[]
        - `threshold` number, double
        - `conditionThreshold` VerificationMethod[]
        - `conditionWeightedThreshold` ConditionWeightedThreshold[]
          - `condition` VerificationMethod, required — recursive
          - `weight` number, double, required
        - `conditionDelegated` string
        - `relationshipParent` string[]
        - `relationshipChild` string[]
        - `relationshipSibling` string[]
      - `service` Service[]
        - `id` string, required
        - `type` string, required
        - `serviceEndpoint` union, required
          - union — Represents an endpoint of a Service entry in a DID document.
            - string
            - RecordStringAny — Construct a type with a set of properties K of type T
          - ServiceEndpoint[]
            - union — Represents an endpoint of a Service entry in a DID document.
              - …
      - `verificationMethod` VerificationMethod[]
        - `id` string, required
        - `type` string, required
        - `controller` string, required
        - `publicKeyBase58` string
        - `publicKeyBase64` string
        - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
          - `alg` string
          - `crv` string
          - `e` string
          - `ext` boolean
          - `key_ops` string[]
          - `kid` string
          - `kty` string, required
          - `n` string
          - `use` string
          - `x` string
          - `y` string
        - `publicKeyHex` string
        - `publicKeyMultibase` string
        - `blockchainAccountId` string
        - `ethereumAddress` string
        - `conditionOr` VerificationMethod[]
        - `conditionAnd` VerificationMethod[]
        - `threshold` number, double
        - `conditionThreshold` VerificationMethod[]
        - `conditionWeightedThreshold` ConditionWeightedThreshold[]
          - `condition` VerificationMethod, required — recursive
          - `weight` number, double, required
        - `conditionDelegated` string
        - `relationshipParent` string[]
        - `relationshipChild` string[]
        - `relationshipSibling` string[]
      - `controller` union
        - string
        - string[]
      - `alsoKnownAs` string[]
      - `id` string, required
      - `@context` union
        - string
        - string[]
        - 'https://www.w3.org/ns/did/v1'
      - `authentication` union[]
        - union
          - string
          - VerificationMethod — Represents the properties of a Verification Method listed in a DID document. This data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility.
            - `id` string, required
            - `type` string, required
            - `controller` string, required
            - `publicKeyBase58` string
            - `publicKeyBase64` string
            - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
              - …
            - `publicKeyHex` string
            - `publicKeyMultibase` string
            - `blockchainAccountId` string
            - `ethereumAddress` string
            - `conditionOr` VerificationMethod[]
            - `conditionAnd` VerificationMethod[]
            - `threshold` number, double
            - `conditionThreshold` VerificationMethod[]
            - `conditionWeightedThreshold` ConditionWeightedThreshold[]
              - …
            - `conditionDelegated` string
            - `relationshipParent` string[]
            - `relationshipChild` string[]
            - `relationshipSibling` string[]
      - `assertionMethod` union[]
        - union
          - string
          - VerificationMethod — Represents the properties of a Verification Method listed in a DID document. This data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility.
            - `id` string, required
            - `type` string, required
            - `controller` string, required
            - `publicKeyBase58` string
            - `publicKeyBase64` string
            - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
              - …
            - `publicKeyHex` string
            - `publicKeyMultibase` string
            - `blockchainAccountId` string
            - `ethereumAddress` string
            - `conditionOr` VerificationMethod[]
            - `conditionAnd` VerificationMethod[]
            - `threshold` number, double
            - `conditionThreshold` VerificationMethod[]
            - `conditionWeightedThreshold` ConditionWeightedThreshold[]
              - …
            - `conditionDelegated` string
            - `relationshipParent` string[]
            - `relationshipChild` string[]
            - `relationshipSibling` string[]
      - `keyAgreement` union[]
        - union
          - string
          - VerificationMethod — Represents the properties of a Verification Method listed in a DID document. This data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility.
            - `id` string, required
            - `type` string, required
            - `controller` string, required
            - `publicKeyBase58` string
            - `publicKeyBase64` string
            - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
              - …
            - `publicKeyHex` string
            - `publicKeyMultibase` string
            - `blockchainAccountId` string
            - `ethereumAddress` string
            - `conditionOr` VerificationMethod[]
            - `conditionAnd` VerificationMethod[]
            - `threshold` number, double
            - `conditionThreshold` VerificationMethod[]
            - `conditionWeightedThreshold` ConditionWeightedThreshold[]
              - …
            - `conditionDelegated` string
            - `relationshipParent` string[]
            - `relationshipChild` string[]
            - `relationshipSibling` string[]
      - `capabilityInvocation` union[]
        - union
          - string
          - VerificationMethod — Represents the properties of a Verification Method listed in a DID document. This data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility.
            - `id` string, required
            - `type` string, required
            - `controller` string, required
            - `publicKeyBase58` string
            - `publicKeyBase64` string
            - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
              - …
            - `publicKeyHex` string
            - `publicKeyMultibase` string
            - `blockchainAccountId` string
            - `ethereumAddress` string
            - `conditionOr` VerificationMethod[]
            - `conditionAnd` VerificationMethod[]
            - `threshold` number, double
            - `conditionThreshold` VerificationMethod[]
            - `conditionWeightedThreshold` ConditionWeightedThreshold[]
              - …
            - `conditionDelegated` string
            - `relationshipParent` string[]
            - `relationshipChild` string[]
            - `relationshipSibling` string[]
      - `capabilityDelegation` union[]
        - union
          - string
          - VerificationMethod — Represents the properties of a Verification Method listed in a DID document. This data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility.
            - `id` string, required
            - `type` string, required
            - `controller` string, required
            - `publicKeyBase58` string
            - `publicKeyBase64` string
            - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
              - …
            - `publicKeyHex` string
            - `publicKeyMultibase` string
            - `blockchainAccountId` string
            - `ethereumAddress` string
            - `conditionOr` VerificationMethod[]
            - `conditionAnd` VerificationMethod[]
            - `threshold` number, double
            - `conditionThreshold` VerificationMethod[]
            - `conditionWeightedThreshold` ConditionWeightedThreshold[]
              - …
            - `conditionDelegated` string
            - `relationshipParent` string[]
            - `relationshipChild` string[]
            - `relationshipSibling` string[]

## Response `200`

Ok

- DidCreateFinishedResponse
  - `jobId` string
  - `didRegistrationMetadata` AnyJsonObject, required — JSON object that can contain any key-value pairs
  - `didDocumentMetadata` DidResolutionMetadata, required
    - `contentType` string
    - `error` union
      - string
      - 'invalidDid' | 'notFound' | 'representationNotSupported' | 'unsupportedDidMethod'
    - `message` string
    - `servedFromCache` boolean
  - `didState` object, required
    - `secret` AnyJsonObject — JSON object that can contain any key-value pairs
    - `didDocument` DidDocumentJson, required — Represents a DID document.
      - `publicKey` VerificationMethod[]
        - `id` string, required
        - `type` string, required
        - `controller` string, required
        - `publicKeyBase58` string
        - `publicKeyBase64` string
        - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
          - `alg` string
          - `crv` string
          - `e` string
          - `ext` boolean
          - `key_ops` string[]
          - `kid` string
          - `kty` string, required
          - `n` string
          - `use` string
          - `x` string
          - `y` string
        - `publicKeyHex` string
        - `publicKeyMultibase` string
        - `blockchainAccountId` string
        - `ethereumAddress` string
        - `conditionOr` VerificationMethod[]
        - `conditionAnd` VerificationMethod[]
        - `threshold` number, double
        - `conditionThreshold` VerificationMethod[]
        - `conditionWeightedThreshold` ConditionWeightedThreshold[]
          - `condition` VerificationMethod, required — recursive
          - `weight` number, double, required
        - `conditionDelegated` string
        - `relationshipParent` string[]
        - `relationshipChild` string[]
        - `relationshipSibling` string[]
      - `service` Service[]
        - `id` string, required
        - `type` string, required
        - `serviceEndpoint` union, required
          - union — Represents an endpoint of a Service entry in a DID document.
            - string
            - RecordStringAny — Construct a type with a set of properties K of type T
          - ServiceEndpoint[]
            - union — Represents an endpoint of a Service entry in a DID document.
              - …
      - `verificationMethod` VerificationMethod[]
        - `id` string, required
        - `type` string, required
        - `controller` string, required
        - `publicKeyBase58` string
        - `publicKeyBase64` string
        - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
          - `alg` string
          - `crv` string
          - `e` string
          - `ext` boolean
          - `key_ops` string[]
          - `kid` string
          - `kty` string, required
          - `n` string
          - `use` string
          - `x` string
          - `y` string
        - `publicKeyHex` string
        - `publicKeyMultibase` string
        - `blockchainAccountId` string
        - `ethereumAddress` string
        - `conditionOr` VerificationMethod[]
        - `conditionAnd` VerificationMethod[]
        - `threshold` number, double
        - `conditionThreshold` VerificationMethod[]
        - `conditionWeightedThreshold` ConditionWeightedThreshold[]
          - `condition` VerificationMethod, required — recursive
          - `weight` number, double, required
        - `conditionDelegated` string
        - `relationshipParent` string[]
        - `relationshipChild` string[]
        - `relationshipSibling` string[]
      - `controller` union
        - string
        - string[]
      - `alsoKnownAs` string[]
      - `id` string, required
      - `@context` union
        - string
        - string[]
        - 'https://www.w3.org/ns/did/v1'
      - `authentication` union[]
        - union
          - string
          - VerificationMethod — Represents the properties of a Verification Method listed in a DID document. This data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility.
            - `id` string, required
            - `type` string, required
            - `controller` string, required
            - `publicKeyBase58` string
            - `publicKeyBase64` string
            - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
              - …
            - `publicKeyHex` string
            - `publicKeyMultibase` string
            - `blockchainAccountId` string
            - `ethereumAddress` string
            - `conditionOr` VerificationMethod[]
            - `conditionAnd` VerificationMethod[]
            - `threshold` number, double
            - `conditionThreshold` VerificationMethod[]
            - `conditionWeightedThreshold` ConditionWeightedThreshold[]
              - …
            - `conditionDelegated` string
            - `relationshipParent` string[]
            - `relationshipChild` string[]
            - `relationshipSibling` string[]
      - `assertionMethod` union[]
        - union
          - string
          - VerificationMethod — Represents the properties of a Verification Method listed in a DID document. This data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility.
            - `id` string, required
            - `type` string, required
            - `controller` string, required
            - `publicKeyBase58` string
            - `publicKeyBase64` string
            - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
              - …
            - `publicKeyHex` string
            - `publicKeyMultibase` string
            - `blockchainAccountId` string
            - `ethereumAddress` string
            - `conditionOr` VerificationMethod[]
            - `conditionAnd` VerificationMethod[]
            - `threshold` number, double
            - `conditionThreshold` VerificationMethod[]
            - `conditionWeightedThreshold` ConditionWeightedThreshold[]
              - …
            - `conditionDelegated` string
            - `relationshipParent` string[]
            - `relationshipChild` string[]
            - `relationshipSibling` string[]
      - `keyAgreement` union[]
        - union
          - string
          - VerificationMethod — Represents the properties of a Verification Method listed in a DID document. This data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility.
            - `id` string, required
            - `type` string, required
            - `controller` string, required
            - `publicKeyBase58` string
            - `publicKeyBase64` string
            - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
              - …
            - `publicKeyHex` string
            - `publicKeyMultibase` string
            - `blockchainAccountId` string
            - `ethereumAddress` string
            - `conditionOr` VerificationMethod[]
            - `conditionAnd` VerificationMethod[]
            - `threshold` number, double
            - `conditionThreshold` VerificationMethod[]
            - `conditionWeightedThreshold` ConditionWeightedThreshold[]
              - …
            - `conditionDelegated` string
            - `relationshipParent` string[]
            - `relationshipChild` string[]
            - `relationshipSibling` string[]
      - `capabilityInvocation` union[]
        - union
          - string
          - VerificationMethod — Represents the properties of a Verification Method listed in a DID document. This data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility.
            - `id` string, required
            - `type` string, required
            - `controller` string, required
            - `publicKeyBase58` string
            - `publicKeyBase64` string
            - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
              - …
            - `publicKeyHex` string
            - `publicKeyMultibase` string
            - `blockchainAccountId` string
            - `ethereumAddress` string
            - `conditionOr` VerificationMethod[]
            - `conditionAnd` VerificationMethod[]
            - `threshold` number, double
            - `conditionThreshold` VerificationMethod[]
            - `conditionWeightedThreshold` ConditionWeightedThreshold[]
              - …
            - `conditionDelegated` string
            - `relationshipParent` string[]
            - `relationshipChild` string[]
            - `relationshipSibling` string[]
      - `capabilityDelegation` union[]
        - union
          - string
          - VerificationMethod — Represents the properties of a Verification Method listed in a DID document. This data type includes public key representations that are no longer present in the spec but are still used by several DID methods / resolvers and kept for backward compatibility.
            - `id` string, required
            - `type` string, required
            - `controller` string, required
            - `publicKeyBase58` string
            - `publicKeyBase64` string
            - `publicKeyJwk` JsonWebKey — Encapsulates a JSON web key type that includes only the public properties that can be used in DID documents. The private properties are intentionally omitted to discourage the use (and accidental disclosure) of private keys in DID documents.
              - …
            - `publicKeyHex` string
            - `publicKeyMultibase` string
            - `blockchainAccountId` string
            - `ethereumAddress` string
            - `conditionOr` VerificationMethod[]
            - `conditionAnd` VerificationMethod[]
            - `threshold` number, double
            - `conditionThreshold` VerificationMethod[]
            - `conditionWeightedThreshold` ConditionWeightedThreshold[]
              - …
            - `conditionDelegated` string
            - `relationshipParent` string[]
            - `relationshipChild` string[]
            - `relationshipSibling` string[]
    - `did` string, required
    - `state` 'finished', required

## Other responses

- `202` — Wait for action to complete
- `500` — Error creating did

---

[API](https://skmtc.net/openwallet-foundation/apis/credo-rest-api.md) · [All operations](https://skmtc.net/openwallet-foundation/apis/credo-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openwallet-foundation/credo-rest-api/revisions/33596742b733/schema)
