Sign an mDoc
Signs the provided mDoc payload using the referenced Document Signer Certificate (DSC).
Analytic events
- MOBILE_CREDENTIAL_SIGN_START
- MOBILE_CREDENTIAL_SIGN_SUCCESS
- MOBILE_CREDENTIAL_SIGN_FAIL
SecuritybearerAuth
Request
Responses
200
mDoc signed
400
Bad Request
post/v2/credentials/mobile/sign
Request samples
- Payload
- curl
- Node.js
- JavaScript
- Python
- C#
- Java
application/json
{- "payload": {
- "deviceKeyInfo": {
- "deviceKey": {
- "kty": "EC",
- "crv": "P-256",
- "x": "jKAl2NpqH74ZxdeTKFzyBZx2wApbu0YKjENFQAAxMsM",
- "y": "QilxqwP16cUuprqeVptoCTqJVWzQYJi0J_32h_BwrCY"
}
}, - "docType": "org.iso.18013.5.1.mDL",
- "validityInfo": {
- "validFrom": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z",
- "expectedUpdate": "2019-08-24T14:15:22Z"
}, - "itemsToSign": {
- "org.iso.18013.5.1": {
- "given_name": {
- "type": "string",
- "value": "John"
}, - "family_name": {
- "type": "string",
- "value": "Doe"
}, - "driver_privileges": {
- "type": "org.iso.18013.5.1.driving_privileges",
- "value": [
- {
- "vehicle_category_code": "CAR",
- "expiry_date": "2024-10-20",
- "issue_date": "2018-08-09",
- "codes": [
- {
- "code": "S01",
- "sign": "<",
- "value": "8000"
}, - {
- "code": "78"
}
]
}, - {
- "vehicle_category_code": "PEOPLE MOVER",
- "expiry_date": "2024-10-20",
- "issue_date": "2017-02-23"
}
]
}
}
}, - "branding": {
- "name": "Example Branding",
- "description": "Example Branding Description",
- "backgroundColor": "#FFFFFF",
- "watermarkImage": "data:image/png;base64,{image-data}",
- "issuerLogo": "data:image/png;base64,{image-data}",
- "issuerIcon": "data:image/svg+xml;base64,{image-data}"
}
}, - "documentSignerId": "d1bd2bfe-76e0-46bd-a958-78eaa909132a"
}
Response samples
- 200
- 400
application/json
{- "encoded": "string",
- "decoded": {
- "namespaces": {
- "org.iso.18013.5.1": {
- "digestID": 10,
- "random": "K5eA64iprBx903wg0T59Nw==",
- "elementIdentifier": "given_name",
- "elementValue": {
- "type": "string",
- "value": "jae"
}
}
}, - "issuerAuth": "hEOhASahGCFZAh0wg..."
}
}