CZT detectors are primary candidates for many next-generation X-ray diffraction imaging systems. We have conducted a study to evaluate performance tradeoffs and limitations of CZT energy-sensitive detectors in coded aperture X-ray imaging (CAXI) architectures. We have found, as expected, that performance of the coded aperture architecture depends critically on energy resolution (ER) of the detector. We have also found that spectrum tail, as measured for mono-energetic sources, is less important although the incomplete charge collection leads to distorted system level information. We have built a mathematical model for the energy spectrum that can be used to optimize the detector geometry (pixel size, detector thickness), detector fabrication (injecting vs. non-injecting contacts) and operating conditions (HV bias, count rate) for the optimum performance of the coded aperture X-ray imaging systems.