The CITES treaty pretty much makes the trade in wild caught birds illegal. Captive hatched birds on the other hand are excluded from the treaty. Breeders need to register and band their captive birds, band and register fledglings, sell only banded/registered birds and maintain records of such sales.
Unregistered birds are not permitted to cross international borders and there is supposed to be heavy fines for those caught illegally trafficking in protected species - including pet owners who have acquired an unregistered protected pet.