@julian yes. BadgeFed has an API. But the concept is really simple, it is a Note (or Document) that has an attachment. The attachment is a property of the ActivityPub object usually used for videos or images. In this case the attachment includes a full OpenBadge object.
The only restriction is that the Note attributed (activitypub actor) MUST be the url in the OpenBadge issuer (issuer = actor). Also the recipient url from the OpenBadge SHOULD be mentioned in the Note.
With this simple mechanism you can pretty much create a compatible badge that can be decentralized with BadgeFed.