DID Web
Create a did:web
CURL
Endpoint: /v1/{target}/did-service-api/dids/create/web | API Reference
Example Request
curl -X 'POST' \
'https://{orgId}.enterprise.test.waltid.cloud/v1/{target}/did-service-api/dids/create/web' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"type": "single_key_id",
"keyId": "waltid.users.kms1.secp256r1",
"domain": "waltid.enterprise.test.waltid.cloud",
"path" : "users/alice"
}''
Body
{
"type": "single_key_id",
"keyId": "waltid.users.kms1.secp256r1",
"domain": "waltid.enterprise.test.waltid.cloud",
"path" : "users/alice"
}
Path Parameters
orgID: - When performing operations within an organization, it is essential to use the organization's Base URL or another valid host alias. For example, if your organization is namedtest, your default Base URL will betest.enterprise-sandbox.walt.devwhen using the sandbox environment.target: resourceIdentifier - The target indicates the organization + tenant + DID service in which to execute the DID creation ({organizationID}.{tenantID}.{didServiceID}), e.g.waltid.users.did1
Body Parameters
keyId: resourceIdentifier - Specifies the key for which to generate a DID + DID Document. Please make sure that the key is stored in a KMS service under the same tenant as the DID service.domain: string - The domain name to be used for the DID:web. This is the domain under which the DID will be- registered.
path: string - The path to be used for the DID:web. This is the path under which the DID will be registered :- for tenant level DIDs, the path should be
{tenant}/user, eg :users/alice. - for organization level DIDs, the path should be the
userdirectly , eg:alice.
- for tenant level DIDs, the path should be
Response
201- DID created successfully.
{
"did": "did:web:waltid.enterprise.test.waltid.cloud:users:alice",
"document": {
"context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/jws-2020/v1"
],
"id": "did:web:waltid.enterprise.test.waltid.cloud:users:alice",
"verificationMethod": [
{
"id": "did:web:waltid.enterprise.test.waltid.cloud:users:alice#RbI8c98cFuu16mtpoeb3Axcx62ST5y4pd-aUX-PffqA",
"type": "JsonWebKey2020",
"controller": "did:web:waltid.enterprise.test.waltid.cloud:users:alice",
"publicKeyJwk": {
"kty": "EC",
"crv": "P-256",
"kid": "RbI8c98cFuu16mtpoeb3Axcx62ST5y4pd-aUX-PffqA",
"x": "S-AzRQsvoO6TZ-hzQP3Zg7mZIoBdYO9ni3exxM2PTKY",
"y": "32ImttHl0wU52b0RjlBfdzCWFMXIkFSehhzu_HjwI6M"
}
}
],
"assertionMethod": [
"did:web:waltid.enterprise.test.waltid.cloud:users:alice#RbI8c98cFuu16mtpoeb3Axcx62ST5y4pd-aUX-PffqA"
],
"authentication": [
"did:web:waltid.enterprise.test.waltid.cloud:users:alice#RbI8c98cFuu16mtpoeb3Axcx62ST5y4pd-aUX-PffqA"
],
"capabilityDelegation": [
"did:web:waltid.enterprise.test.waltid.cloud:users:alice#RbI8c98cFuu16mtpoeb3Axcx62ST5y4pd-aUX-PffqA"
],
"capabilityInvocation": [
"did:web:waltid.enterprise.test.waltid.cloud:users:alice#RbI8c98cFuu16mtpoeb3Axcx62ST5y4pd-aUX-PffqA"
],
"keyAgreement": [
"did:web:waltid.enterprise.test.waltid.cloud:users:alice#RbI8c98cFuu16mtpoeb3Axcx62ST5y4pd-aUX-PffqA"
]
}
}
Last updated on July 29, 2025
