Assertions

Get a single Assertion

get
Authorizations
Path parameters
idOrEntityIdstringRequired
Responses
200
OK
get
GET /v2/assertions/{idOrEntityId} HTTP/1.1
Host: api.badgr.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "status": {
    "success": true,
    "description": "ok"
  },
  "result": [
    {
      "entityType": "Assertion",
      "id": "6116c84d1ff787222b6c4d15",
      "entityId": "i9CirfwJTuSfiqg0FFUBdQ",
      "openBadgeId": "https://api.badgr.io/public/assertions/i9CirfwJTuSfiqg0FFUBdQ",
      "createdAt": "2025-07-03T02:36:08.811Z",
      "createdBy": "Hey7J-GRSJeu6FNnHQwNyw",
      "badgeclass": "K829IK8RS6ercwkpeFOn-Q",
      "badgeclassOpenBadgeId": "https://api.badgr.io/public/badges/K829IK8RS6ercwkpeFOn-Q",
      "issuer": "ZvYydoQhRtOKalNzFPZR2A-Q",
      "issuerOpenBadgeId": "https://api.badgr.io/public/issuers/ZvYydoQhRtOKalNzFPZR2A",
      "image": "https://api.badgr.io/public/assertions/SsCfI7FlTr6hAJe4irXnfQ/image",
      "recipient": {
        "identity": "sha256$4c2657856f",
        "hashed": true,
        "type": "email",
        "salt": "jgsu868",
        "plaintextIdentity": "[email protected]"
      },
      "issuedOn": "2025-07-03T02:36:08.811Z",
      "narrative": "text",
      "evidence": [
        {
          "url": "https://example.com",
          "narrative": "text",
          "name": "text",
          "description": "text",
          "genre": "text",
          "audience": "text"
        }
      ],
      "revoked": true,
      "revocationReason": "text",
      "acceptance": "Unaccepted",
      "expires": "2025-07-03T02:36:08.811Z",
      "extensions": {
        "ANY_ADDITIONAL_PROPERTY": {}
      },
      "assertionRef": {
        "assertionUrl": "https://api.badgr.io/public/assertions/lY1LJ6K4RqG7ThGLYvWNng"
      },
      "badgeRef": {
        "badgeUrl": "https://api.badgr.io/public/badges/iOMWsaF1QbmMCofM54JlUg"
      },
      "issuerRef": {
        "issuerUrl": "https://api.badgr.ws/public/issuers/Uu4wd2I1SKmD3vmtMJ19hw"
      },
      "pending": true,
      "source": "local",
      "sourceUrl": "https://example.com/assertions/1",
      "originalJson": "{}",
      "imagePath": "uploads/badges/assertion-lY1LJ6K4RqG7ThGLYvWNng.png",
      "ob3AwardProperties": {
        "activityStart": "2025-07-03T02:36:08.811Z",
        "activityEnd": "2025-07-03T02:36:08.811Z",
        "licenseNumber": "text",
        "role": "text"
      }
    }
  ],
  "timestamp": "2025-07-03T02:36:08.811Z",
  "validationErrors": [
    "text"
  ],
  "nonFieldErrors": [
    "text"
  ],
  "fieldErrors": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "errorCode": "text",
  "warnings": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "latestTermsVersion": 1
}

Update an Assertion

put
Authorizations
Path parameters
idOrEntityIdstringRequired
Body
narrativestringOptional

Markdown narrative of the achievement

expiresstring · date-timeOptional
issuedOnstring · date-timeOptional

Timestamp when the assertion was issued

Responses
200
OK
put
PUT /v2/assertions/{idOrEntityId} HTTP/1.1
Host: api.badgr.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 408

{
  "narrative": "text",
  "evidence": [
    {
      "url": "text",
      "narrative": "text",
      "name": "text",
      "description": "text",
      "genre": "text",
      "audience": "text"
    }
  ],
  "extensions": {
    "value": {
      "ANY_ADDITIONAL_PROPERTY": {}
    }
  },
  "expires": "2025-07-03T02:36:08.811Z",
  "issuedOn": "2025-07-03T02:36:08.811Z",
  "ob3AwardProperties": {
    "activityStart": "2025-07-03T02:36:08.811Z",
    "activityEnd": "2025-07-03T02:36:08.811Z",
    "licenseNumber": "text",
    "role": "text"
  }
}
{
  "status": {
    "success": true,
    "description": "ok"
  },
  "result": [
    {
      "entityType": "Assertion",
      "id": "6116c84d1ff787222b6c4d15",
      "entityId": "i9CirfwJTuSfiqg0FFUBdQ",
      "openBadgeId": "https://api.badgr.io/public/assertions/i9CirfwJTuSfiqg0FFUBdQ",
      "createdAt": "2025-07-03T02:36:08.811Z",
      "createdBy": "Hey7J-GRSJeu6FNnHQwNyw",
      "badgeclass": "K829IK8RS6ercwkpeFOn-Q",
      "badgeclassOpenBadgeId": "https://api.badgr.io/public/badges/K829IK8RS6ercwkpeFOn-Q",
      "issuer": "ZvYydoQhRtOKalNzFPZR2A-Q",
      "issuerOpenBadgeId": "https://api.badgr.io/public/issuers/ZvYydoQhRtOKalNzFPZR2A",
      "image": "https://api.badgr.io/public/assertions/SsCfI7FlTr6hAJe4irXnfQ/image",
      "recipient": {
        "identity": "sha256$4c2657856f",
        "hashed": true,
        "type": "email",
        "salt": "jgsu868",
        "plaintextIdentity": "[email protected]"
      },
      "issuedOn": "2025-07-03T02:36:08.811Z",
      "narrative": "text",
      "evidence": [
        {
          "url": "https://example.com",
          "narrative": "text",
          "name": "text",
          "description": "text",
          "genre": "text",
          "audience": "text"
        }
      ],
      "revoked": true,
      "revocationReason": "text",
      "acceptance": "Unaccepted",
      "expires": "2025-07-03T02:36:08.811Z",
      "extensions": {
        "ANY_ADDITIONAL_PROPERTY": {}
      },
      "assertionRef": {
        "assertionUrl": "https://api.badgr.io/public/assertions/lY1LJ6K4RqG7ThGLYvWNng"
      },
      "badgeRef": {
        "badgeUrl": "https://api.badgr.io/public/badges/iOMWsaF1QbmMCofM54JlUg"
      },
      "issuerRef": {
        "issuerUrl": "https://api.badgr.ws/public/issuers/Uu4wd2I1SKmD3vmtMJ19hw"
      },
      "pending": true,
      "source": "local",
      "sourceUrl": "https://example.com/assertions/1",
      "originalJson": "{}",
      "imagePath": "uploads/badges/assertion-lY1LJ6K4RqG7ThGLYvWNng.png",
      "ob3AwardProperties": {
        "activityStart": "2025-07-03T02:36:08.811Z",
        "activityEnd": "2025-07-03T02:36:08.811Z",
        "licenseNumber": "text",
        "role": "text"
      }
    }
  ],
  "timestamp": "2025-07-03T02:36:08.811Z",
  "validationErrors": [
    "text"
  ],
  "nonFieldErrors": [
    "text"
  ],
  "fieldErrors": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "errorCode": "text",
  "warnings": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "latestTermsVersion": 1
}

Revoke an Assertion

delete
Authorizations
Path parameters
idOrEntityIdstringRequired
Body
revocation_reasonstringOptional
Responses
200
OK
delete
DELETE /v2/assertions/{idOrEntityId} HTTP/1.1
Host: api.badgr.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 28

{
  "revocation_reason": "text"
}
{
  "status": {
    "success": true,
    "description": "ok"
  },
  "result": [
    {
      "entityType": "Assertion",
      "id": "6116c84d1ff787222b6c4d15",
      "entityId": "i9CirfwJTuSfiqg0FFUBdQ",
      "openBadgeId": "https://api.badgr.io/public/assertions/i9CirfwJTuSfiqg0FFUBdQ",
      "createdAt": "2025-07-03T02:36:08.811Z",
      "createdBy": "Hey7J-GRSJeu6FNnHQwNyw",
      "badgeclass": "K829IK8RS6ercwkpeFOn-Q",
      "badgeclassOpenBadgeId": "https://api.badgr.io/public/badges/K829IK8RS6ercwkpeFOn-Q",
      "issuer": "ZvYydoQhRtOKalNzFPZR2A-Q",
      "issuerOpenBadgeId": "https://api.badgr.io/public/issuers/ZvYydoQhRtOKalNzFPZR2A",
      "image": "https://api.badgr.io/public/assertions/SsCfI7FlTr6hAJe4irXnfQ/image",
      "recipient": {
        "identity": "sha256$4c2657856f",
        "hashed": true,
        "type": "email",
        "salt": "jgsu868",
        "plaintextIdentity": "[email protected]"
      },
      "issuedOn": "2025-07-03T02:36:08.811Z",
      "narrative": "text",
      "evidence": [
        {
          "url": "https://example.com",
          "narrative": "text",
          "name": "text",
          "description": "text",
          "genre": "text",
          "audience": "text"
        }
      ],
      "revoked": true,
      "revocationReason": "text",
      "acceptance": "Unaccepted",
      "expires": "2025-07-03T02:36:08.811Z",
      "extensions": {
        "ANY_ADDITIONAL_PROPERTY": {}
      },
      "assertionRef": {
        "assertionUrl": "https://api.badgr.io/public/assertions/lY1LJ6K4RqG7ThGLYvWNng"
      },
      "badgeRef": {
        "badgeUrl": "https://api.badgr.io/public/badges/iOMWsaF1QbmMCofM54JlUg"
      },
      "issuerRef": {
        "issuerUrl": "https://api.badgr.ws/public/issuers/Uu4wd2I1SKmD3vmtMJ19hw"
      },
      "pending": true,
      "source": "local",
      "sourceUrl": "https://example.com/assertions/1",
      "originalJson": "{}",
      "imagePath": "uploads/badges/assertion-lY1LJ6K4RqG7ThGLYvWNng.png",
      "ob3AwardProperties": {
        "activityStart": "2025-07-03T02:36:08.811Z",
        "activityEnd": "2025-07-03T02:36:08.811Z",
        "licenseNumber": "text",
        "role": "text"
      }
    }
  ],
  "timestamp": "2025-07-03T02:36:08.811Z",
  "validationErrors": [
    "text"
  ],
  "nonFieldErrors": [
    "text"
  ],
  "fieldErrors": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "errorCode": "text",
  "warnings": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "latestTermsVersion": 1
}

Get list of Assertions for the specified scope

get
Authorizations
Path parameters
scopestring · enumRequiredPossible values:
idOrEntityIdstringRequired
Query parameters
recipientstringOptional

A recipient identifier to filter by

numinteger · int32Optional

Request pagination of results, before/after cursors may be provided in response header

include_expiredbooleanOptionalDefault: false
include_revokedbooleanOptionalDefault: false
afterstringOptional

Pagination cursor provided in "Link" response header

beforestringOptional

Pagination cursor provided in "Link" response header

Responses
200
List of Assertions
get
GET /v2/{scope}/{idOrEntityId}/assertions HTTP/1.1
Host: api.badgr.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "status": {
    "success": true,
    "description": "ok"
  },
  "result": [
    {
      "entityType": "Assertion",
      "id": "6116c84d1ff787222b6c4d15",
      "entityId": "i9CirfwJTuSfiqg0FFUBdQ",
      "openBadgeId": "https://api.badgr.io/public/assertions/i9CirfwJTuSfiqg0FFUBdQ",
      "createdAt": "2025-07-03T02:36:08.811Z",
      "createdBy": "Hey7J-GRSJeu6FNnHQwNyw",
      "badgeclass": "K829IK8RS6ercwkpeFOn-Q",
      "badgeclassOpenBadgeId": "https://api.badgr.io/public/badges/K829IK8RS6ercwkpeFOn-Q",
      "issuer": "ZvYydoQhRtOKalNzFPZR2A-Q",
      "issuerOpenBadgeId": "https://api.badgr.io/public/issuers/ZvYydoQhRtOKalNzFPZR2A",
      "image": "https://api.badgr.io/public/assertions/SsCfI7FlTr6hAJe4irXnfQ/image",
      "recipient": {
        "identity": "sha256$4c2657856f",
        "hashed": true,
        "type": "email",
        "salt": "jgsu868",
        "plaintextIdentity": "[email protected]"
      },
      "issuedOn": "2025-07-03T02:36:08.811Z",
      "narrative": "text",
      "evidence": [
        {
          "url": "https://example.com",
          "narrative": "text",
          "name": "text",
          "description": "text",
          "genre": "text",
          "audience": "text"
        }
      ],
      "revoked": true,
      "revocationReason": "text",
      "acceptance": "Unaccepted",
      "expires": "2025-07-03T02:36:08.811Z",
      "extensions": {
        "ANY_ADDITIONAL_PROPERTY": {}
      },
      "assertionRef": {
        "assertionUrl": "https://api.badgr.io/public/assertions/lY1LJ6K4RqG7ThGLYvWNng"
      },
      "badgeRef": {
        "badgeUrl": "https://api.badgr.io/public/badges/iOMWsaF1QbmMCofM54JlUg"
      },
      "issuerRef": {
        "issuerUrl": "https://api.badgr.ws/public/issuers/Uu4wd2I1SKmD3vmtMJ19hw"
      },
      "pending": true,
      "source": "local",
      "sourceUrl": "https://example.com/assertions/1",
      "originalJson": "{}",
      "imagePath": "uploads/badges/assertion-lY1LJ6K4RqG7ThGLYvWNng.png",
      "ob3AwardProperties": {
        "activityStart": "2025-07-03T02:36:08.811Z",
        "activityEnd": "2025-07-03T02:36:08.811Z",
        "licenseNumber": "text",
        "role": "text"
      }
    }
  ],
  "timestamp": "2025-07-03T02:36:08.811Z",
  "validationErrors": [
    "text"
  ],
  "nonFieldErrors": [
    "text"
  ],
  "fieldErrors": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "errorCode": "text",
  "warnings": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "latestTermsVersion": 1
}

Issue a new Assertion to a recipient

post
Authorizations
Path parameters
scopestring · enumRequiredPossible values:
idOrEntityIdstringRequired

The entity ID of the selected scope entity

Example: K829IK8RS6ercwkpeFOn-Q
Body

Request to award an assertion. When request scope is issuers, one of badgeclass or badgeclassOpenBadgeId must be provided.

badgeclassstringOptional

ID or Entity ID of the badge class to be awarded

Example: K829IK8RS6ercwkpeFOn-Q
badgeclassOpenBadgeIdstring · uriOptional

OB URL of the badge class to be awarded

Example: https://api.badgr.io/public/badges/K829IK8RS6ercwkpeFOn-Q
issuedOnstring · date-timeOptional

Timestamp when the assertion was issued

allowDuplicateAwardsbooleanOptional

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

narrativestringOptional

Markdown narrative of the achievement

expiresstring · date-timeOptional
Responses
201
Created
post
POST /v2/{scope}/{idOrEntityId}/assertions HTTP/1.1
Host: api.badgr.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 650

{
  "badgeclass": "K829IK8RS6ercwkpeFOn-Q",
  "badgeclassOpenBadgeId": "https://api.badgr.io/public/badges/K829IK8RS6ercwkpeFOn-Q",
  "issuedOn": "2025-07-03T02:36:08.811Z",
  "recipient": {
    "identity": "[email protected]",
    "type": "email",
    "hashed": true
  },
  "allowDuplicateAwards": true,
  "narrative": "text",
  "evidence": [
    {
      "url": "https://example.com",
      "narrative": "text",
      "name": "text",
      "description": "text",
      "genre": "text",
      "audience": "text"
    }
  ],
  "extensions": {
    "value": {
      "ANY_ADDITIONAL_PROPERTY": {}
    }
  },
  "expires": "2025-07-03T02:36:08.811Z",
  "ob3AwardProperties": {
    "activityStart": "2025-07-03T02:36:08.811Z",
    "activityEnd": "2025-07-03T02:36:08.811Z",
    "licenseNumber": "text",
    "role": "text"
  }
}
{
  "status": {
    "success": true,
    "description": "ok"
  },
  "result": [
    {
      "entityType": "Assertion",
      "id": "6116c84d1ff787222b6c4d15",
      "entityId": "i9CirfwJTuSfiqg0FFUBdQ",
      "openBadgeId": "https://api.badgr.io/public/assertions/i9CirfwJTuSfiqg0FFUBdQ",
      "createdAt": "2025-07-03T02:36:08.811Z",
      "createdBy": "Hey7J-GRSJeu6FNnHQwNyw",
      "badgeclass": "K829IK8RS6ercwkpeFOn-Q",
      "badgeclassOpenBadgeId": "https://api.badgr.io/public/badges/K829IK8RS6ercwkpeFOn-Q",
      "issuer": "ZvYydoQhRtOKalNzFPZR2A-Q",
      "issuerOpenBadgeId": "https://api.badgr.io/public/issuers/ZvYydoQhRtOKalNzFPZR2A",
      "image": "https://api.badgr.io/public/assertions/SsCfI7FlTr6hAJe4irXnfQ/image",
      "recipient": {
        "identity": "sha256$4c2657856f",
        "hashed": true,
        "type": "email",
        "salt": "jgsu868",
        "plaintextIdentity": "[email protected]"
      },
      "issuedOn": "2025-07-03T02:36:08.811Z",
      "narrative": "text",
      "evidence": [
        {
          "url": "https://example.com",
          "narrative": "text",
          "name": "text",
          "description": "text",
          "genre": "text",
          "audience": "text"
        }
      ],
      "revoked": true,
      "revocationReason": "text",
      "acceptance": "Unaccepted",
      "expires": "2025-07-03T02:36:08.811Z",
      "extensions": {
        "ANY_ADDITIONAL_PROPERTY": {}
      },
      "assertionRef": {
        "assertionUrl": "https://api.badgr.io/public/assertions/lY1LJ6K4RqG7ThGLYvWNng"
      },
      "badgeRef": {
        "badgeUrl": "https://api.badgr.io/public/badges/iOMWsaF1QbmMCofM54JlUg"
      },
      "issuerRef": {
        "issuerUrl": "https://api.badgr.ws/public/issuers/Uu4wd2I1SKmD3vmtMJ19hw"
      },
      "pending": true,
      "source": "local",
      "sourceUrl": "https://example.com/assertions/1",
      "originalJson": "{}",
      "imagePath": "uploads/badges/assertion-lY1LJ6K4RqG7ThGLYvWNng.png",
      "ob3AwardProperties": {
        "activityStart": "2025-07-03T02:36:08.811Z",
        "activityEnd": "2025-07-03T02:36:08.811Z",
        "licenseNumber": "text",
        "role": "text"
      }
    }
  ],
  "timestamp": "2025-07-03T02:36:08.811Z",
  "validationErrors": [
    "text"
  ],
  "nonFieldErrors": [
    "text"
  ],
  "fieldErrors": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "errorCode": "text",
  "warnings": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "latestTermsVersion": 1
}

Revoke multiple Assertions

post
Authorizations
Body
idstringOptional

ID of the Assertion to revoke

Example: 62aa04adf5afe00d0a6dac72
entityIdstringOptional

Entity ID of the Assertion to revoke

Example: i9CirfwJTuSfiqg0FFUBdQ
revocationReasonstringRequired

Short description of why the Assertion is being revoked

Example: Course was cancelled
revokedbooleanRead-onlyOptional
reasonstringRead-onlyOptional

Error reason if assertion could not be revoked

codestringRead-onlyOptional

Error code if assertion could not be revoked

Responses
200
OK
post
POST /v2/assertions/revoke HTTP/1.1
Host: api.badgr.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 113

[
  {
    "id": "62aa04adf5afe00d0a6dac72",
    "entityId": "i9CirfwJTuSfiqg0FFUBdQ",
    "revocationReason": "Course was cancelled"
  }
]
[
  {
    "id": "62aa04adf5afe00d0a6dac72",
    "entityId": "i9CirfwJTuSfiqg0FFUBdQ",
    "revocationReason": "Course was cancelled",
    "revoked": true,
    "reason": "text",
    "code": "text"
  }
]

Last updated

Was this helpful?