Currently the API documentation for registerTemplate has the following description for the "details" parameter:
Template details in key/value pairs.
This is not an adequate explanation for how to use it. This parameter must be in the format "details[id].keyname=keyvalue". For example, "details.somekey=somevalue".
This feature can be useful so the explanation in the API documentation should be updated, or it should be explained in more detail in the admin guide.