Skip to main content

Open Badges

DokStamp supports the Open Badges 2.0 specification. When enabled on an institution, courses can emit digital badges that students can carry in badge backpacks (Badgr, Credly, etc.) and display on LinkedIn or CVs.

Enable badges on an institution

Set is_badges_enabled: true and provide a badge_image_uuid (the institution’s badge image file):
# First upload the badge image
FILE=$(curl -s -X POST https://api.dokstamp.eu/files \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "X-Tenant: {TENANT}" \
  -F "files[]=@institution-badge.png")

BADGE_IMAGE_UUID=$(echo $FILE | jq -r '.data[0].uuid')

# Enable badges on the institution
curl -X PATCH "https://api.dokstamp.eu/institutions/{institution_uuid}" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Tenant: {TENANT}" \
  -d "{
    \"is_badges_enabled\": true,
    \"badge_image_uuid\": \"$BADGE_IMAGE_UUID\"
  }"

Set a badge image on a course

Upload a course-specific badge image and attach it:
# Upload the course badge image
FILE=$(curl -s -X POST https://api.dokstamp.eu/files \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "X-Tenant: {TENANT}" \
  -F "files[]=@bcs-badge.png")

BADGE_IMAGE_UUID=$(echo $FILE | jq -r '.data[0].uuid')

# Link it to the course
curl -X PATCH "https://api.dokstamp.eu/courses/{course_uuid}" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Tenant: {TENANT}" \
  -d "{ \"badge_image_uuid\": \"$BADGE_IMAGE_UUID\" }"

Get the badge issuer profile

GET /institutions/{uuid}/badges/issuers
Returns the Open Badges 2.0 Issuer Profile JSON-LD. This URL is referenced inside badge assertions to identify the issuing institution.
{
  "@context": "https://w3id.org/openbadges/v2",
  "type": "Issuer",
  "id": "https://api.dokstamp.eu/institutions/550e8400.../badges/issuers",
  "name": "Federal University of Technology",
  "url": "https://fut.edu.br",
  "email": "badges@fut.edu.br"
}

Get the course badge image

GET /courses/{uuid}/badges/image
Returns the badge image file. This is the visual representation of the badge.

Get the badge assertion for a certificate

GET /certificates/{uuid}/badges/assertions
Returns a W3C Open Badges 2.0 BadgeAssertion for the certificate:
{
  "@context": "https://w3id.org/openbadges/v2",
  "type": "Assertion",
  "id": "https://api.dokstamp.eu/certificates/a1b2c3d4.../badges/assertions",
  "recipient": {
    "type": "email",
    "hashed": true,
    "salt": "deadsea",
    "identity": "sha256$..."
  },
  "badge": {
    "type": "BadgeClass",
    "id": "https://api.dokstamp.eu/courses/c3d4e5f6.../badges",
    "name": "Bachelor of Computer Science",
    "description": "Awarded for completing the 4-year BCS program.",
    "image": "https://api.dokstamp.eu/courses/c3d4e5f6.../badges/image",
    "criteria": { "narrative": "Completion of 3200-hour curriculum with passing grades." },
    "issuer": "https://api.dokstamp.eu/institutions/550e8400.../badges/issuers"
  },
  "verification": { "type": "hosted" },
  "issuedOn": "2024-12-01T00:00:00Z"
}

Badge baking

Open Badges can be “baked” into a PNG image — the assertion JSON is embedded in the image metadata. Students can then upload a single PNG file to any badge backpack for instant verification. Contact your DokStamp account manager to enable automatic badge baking on certificate issuance.

LinkedIn sharing

The public_verification_url from a certificate can be added as a LinkedIn “Licence & Certification” with the certificate UUID as the credential ID. Employers can verify the credential directly from LinkedIn.