https://en.wikipedia.org/wiki/Letter_of_marque
These were licenses given to private individuals (seadogs) from the middle ages to the 19th century to attack ships and seize goods at sea on authority of a monarch. The only difference between theses privateers or corsairs and pirates was the letter of Marque.
Interestingly the US Constitution (Article 1, Section 8) gave congress the power to issue such letters and make rules concerning captures at Land and Sea.