MedicalTrace

Sign a credential

Sign a draft credential and enqueue an integrity commitment.

Requires credential:issue and an active grant for the credential’s claim type. The caller’s organization must be the issuer on the draft. The demo signature is HMAC-SHA256-DEV, not a production issuer key. Signing does not make the claim true.

1. Request URL

POST https://api.medicaltrace.net/v1/credentials/55555555-5555-4555-8555-555555555555/sign

2. Request parameters

ParameterInRequiredTypeDescription
AuthorizationheaderYesstringBearer token from POST /auth/login. The sample value demo.local.jwt is a placeholder.
X-Organization-IdheaderYesstringThe issuer organization on the draft.
idpathYesstringCredential id returned by the draft call.

3. Request example

curl -s -X POST 'https://api.medicaltrace.net/v1/credentials/55555555-5555-4555-8555-555555555555/sign' \
  -H 'authorization: Bearer demo.local.jwt' \
  -H 'x-organization-id: 33333333-3333-4333-8333-333333333333'

4. Response data

HTTP 201. The body below uses the fictional DEMO-BED-001 fixtures.

{
  "id": "55555555-5555-4555-8555-555555555555",
  "lifecycle": "ANCHOR_PENDING",
  "status": "ACTIVE",
  "payloadDigest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "signedEnvelope": {
    "schemaVersion": 1,
    "claimType": "electrical_safety_inspection",
    "alg": "HMAC-SHA256-DEV",
    "signature": "demo-signature"
  }
}

5. Response fields

FieldTypeDescriptionExample
lifecyclestringANCHOR_PENDING after sign. The chain confirmation can still be pending.ANCHOR_PENDING
payloadDigeststringDigest of the canonical envelope.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
signedEnvelope.algstringDemo algorithm label.HMAC-SHA256-DEV