latestOpenAPI 3.0.12026-08-1091181421.2 KB

44eb39b4bd65

Issuers
Assertions
BadgeClasses

Issue a new Assertion to a recipient

post/v2/{scope}/{idOrEntityId}/assertions

Path parameters

scope'badgeclasses' | 'issuers' required
idOrEntityIdstring required

The entity ID of the selected scope entity

Request body

allowDuplicateAwardsboolean

If set to false and the recipient already has this assertion, then the request will fail

badgeclassstring nullable

ID or Entity ID of the badge class to be awarded

badgeclassOpenBadgeIdstring uri nullable

OB URL of the badge class to be awarded

expiresstring date-time nullable
issuedOnstring date-time nullable

Timestamp when the assertion was issued

narrativestring nullable

Markdown narrative of the achievement

Example request

{
  "badgeclass": "K829IK8RS6ercwkpeFOn-Q",
  "badgeclassOpenBadgeId": "https://api.badgr.io/public/badges/K829IK8RS6ercwkpeFOn-Q",
  "recipient": {
    "identity": "jane.doe@example.com"
  }
}

Response

Created

errorCodestring nullable
fieldErrorsobject required
latestTermsVersioninteger nullable
nonFieldErrorsstring[] required
timestampstring date-time nullable
validationErrorsstring[] required
warningsobject required

Example response

{
  "result": [
    {
      "assertionRef": {
        "assertionUrl": "https://api.badgr.io/public/assertions/lY1LJ6K4RqG7ThGLYvWNng"
      },
      "badgeRef": {
        "badgeUrl": "https://api.badgr.io/public/badges/iOMWsaF1QbmMCofM54JlUg"
      },
      "badgeclass": "K829IK8RS6ercwkpeFOn-Q",
      "badgeclassOpenBadgeId": "https://api.badgr.io/public/badges/K829IK8RS6ercwkpeFOn-Q",
      "createdBy": "Hey7J-GRSJeu6FNnHQwNyw",
      "entityId": "i9CirfwJTuSfiqg0FFUBdQ",
      "entityType": "Assertion",
      "id": "6116c84d1ff787222b6c4d15",
      "image": "https://api.badgr.io/public/assertions/SsCfI7FlTr6hAJe4irXnfQ/image",
      "imagePath": "uploads/badges/assertion-lY1LJ6K4RqG7ThGLYvWNng.png",
      "issuer": "ZvYydoQhRtOKalNzFPZR2A-Q",
      "issuerOpenBadgeId": "https://api.badgr.io/public/issuers/ZvYydoQhRtOKalNzFPZR2A",
      "issuerRef": {
        "issuerUrl": "https://api.badgr.ws/public/issuers/Uu4wd2I1SKmD3vmtMJ19hw"
      },
      "openBadgeId": "https://api.badgr.io/public/assertions/i9CirfwJTuSfiqg0FFUBdQ",
      "originalJson": "{}",
      "recipient": {
        "identity": "sha256$4c2657856f",
        "plaintextIdentity": "jane.doe@example.com",
        "salt": "jgsu868"
      },
      "source": "local",
      "sourceUrl": "https://example.com/assertions/1"
    }
  ],
  "status": {
    "description": "ok"
  }
}