How to add custom additional fields - BlockcertValidationError



I’m trying to create certificates containing custom additional fields. My cert-tools conf.ini contains the following line:
additional_global_fields = {"fields": [{"path": "$.badge.xyz_custom_field","value": "this going to contain some data"}]}

When trying to execute the cert-issuer I get the following error:
cert_schema.schema_tools.schema_validator.BlockcertValidationError: There are some fields in the certificate that do not correspond to the expected schema. This has likely been tampered with. Unmapped fields are: <>

How can I add a custom additional field both as additional_global_fields and as additional_per_recipient_fields in the cert-tools conf.ini?

I probably have to add a @context because of the canonicalization of the JSON-LD certificate. But how can I do this and do I have to do something else?

Thanks in advance!

Kind regards,


Hi Uzu,
Yes, that’s exactly right. Each of your new terms has to be defined in a JSON-LD context. You can either point to an existing JSON-LD context, or embed them directly in the context of the certificate. For an example of the latter, see the JSON-LD specification section 3.1. In this case, the @context value would be an array listing the existing context links, and your new definition. Roughly like this:

  "@context": [
             "xyz_custom_field": "http://path/to/xyz_custom_field",
              ... // and all other custom fields

This is a doc oversight, so I’m going to create an issue to fix this.

Verification failed when adding other fields

Hi Kim and Uzu,

Can you guys help me understand how to add a custom field in the CSV roster file.I.e. instead of just ‘name’,‘pubkey’,‘identity’ in the file ‘roster_testnet.csv’, I want to add ‘additional1’. I am a little confused by the above.

  • What does it mean by JSON path?

  • Do I still need to add a JSON-LD file for custom recipient fields? If so can this be done as a local file?

  • What is path in the below for, is it to the csv file or the JSON-LD?

additional_per_recipient_fields = {“fields”: [{“path”: “$.xyz_additional”,“value”: “|EVIDENCE|”,“csv_column”: “additional1”}]}

  • Do any other fields have to be filled out e.g. ‘value’ or ‘evidence’?



Hi @jake666 & @uzu;

Did you succeed to create custom field? Could you create an additional field for cert which is verifiable? If you did, could you share steps and structure?



Is this solved? We would like to add a custom field to the CSV file