curl samples
Set these once:
export DILIGENCE_BASE_URL="https://api.example.diligence.id"
export DILIGENCE_API_KEY="YOUR_API_KEY"
export MGMT="$DILIGENCE_BASE_URL/management"
export API_VERSION="2026-08-30"
lifecycle.sh runs the whole sequence.
Management
List issuers
curl -sS "$MGMT/issuers?api-version=$API_VERSION" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY"
Create an issuer
curl -sS -X POST "$MGMT/issuers?api-version=$API_VERSION" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Sample Issuer",
"organisationReference": "YOUR_ORGANISATION_REFERENCE",
"issuerType": "Root",
"signingKey": { "algorithm": "ES256", "provider": "Software" }
}'
Configure an issuer, conditionally
ETAG=$(curl -sS -D - -o /dev/null "$MGMT/issuers/YOUR_ISSUER_ID?api-version=$API_VERSION" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY" | grep -i '^etag:' | cut -d' ' -f2- | tr -d '\r')
curl -sS -X PATCH "$MGMT/issuers/YOUR_ISSUER_ID?api-version=$API_VERSION" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY" \
-H "Content-Type: application/json" \
-H "If-Match: $ETAG" \
-d '{ "displayName": "Sample Issuer (renamed)", "statusMechanism": "StatusList" }'
Check readiness, then activate
curl -sS "$MGMT/issuers/YOUR_ISSUER_ID/readiness?api-version=$API_VERSION" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY"
curl -sS -X POST "$MGMT/issuers/YOUR_ISSUER_ID/activate?api-version=$API_VERSION" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY"
Create a credential configuration
curl -sS -X POST "$MGMT/credential-configurations?api-version=$API_VERSION" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"issuerId": "YOUR_ISSUER_ID",
"identifier": "sample-membership",
"displayName": "Sample Membership",
"credentialType": "SampleMembership",
"format": "dc+sd-jwt",
"claims": [ { "name": "member_number", "displayName": "Member number", "required": true } ]
}'
Create a verification policy
curl -sS -X POST "$MGMT/verification-policies?api-version=$API_VERSION" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"policyIdentifier": "sample-check",
"displayName": "Sample membership check",
"organisationReference": "YOUR_ORGANISATION_REFERENCE",
"credentialConfigurations": ["sample-membership"],
"requireActiveCredentialStatus": true
}'
Product
Issue a credential
curl -sS -X POST "$DILIGENCE_BASE_URL/v1.0/credentials/issuance" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: sample-issue-001" \
-d '{
"issuerId": "YOUR_ISSUER_ID",
"credentialConfiguration": "sample-membership",
"externalSubjectReference": "sample-subject",
"claims": { "member_number": "M-000123" }
}'
The idempotency key comes from your own business identifier and is reused on every retry — not regenerated.
Read an issuance
curl -sS "$DILIGENCE_BASE_URL/v1.0/credentials/issuance/YOUR_TRANSACTION_ID" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY"
Read credential status
curl -sS "$DILIGENCE_BASE_URL/v1.0/credentials/YOUR_CREDENTIAL_ID/status" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY"
Revoke
curl -sS -X POST "$DILIGENCE_BASE_URL/v1.0/credentials/YOUR_CREDENTIAL_ID/revoke" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reason": "Sample" }'
Permanent. There is no un-revoke.
Create a verification
curl -sS -X POST "$DILIGENCE_BASE_URL/v1.0/verifications" \
-H "Authorization: ApiKey $DILIGENCE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: sample-verify-001" \
-d '{ "policyIdentifier": "sample-check" }'