Added the 'thread' key, which stands for either 'mailid' or 'reference'.