What is the ISO country code for Kosovo/other unrecognised countries?

The short answer: UNK for Kosovo travel documents, but a code prefixed with “X” in general terms.

The long answer: ISO 3166-1 alpha-2 and ISO 3166-1 alpha-3 define the two and three-letter codes for countries, respectively, but some unrecognised countries such as Kosovo have no such code. Because ISO-3166 reserves the “X” prefix for user-assigned codes it is often used where an alpha-2 or alpha-3 value is missing. Note that some “X” prefixed codes are in use by travel document specifications, where Kosovo uses UNK, and NATO.

Therefore, if you wish to define your own codes beyond those in the ISO specification, use an “X” prefix e.g. “XTP”.