Are minor sevenths allowed in baroque counterpoint? I ask because in the first measure of Bach's Invention No. 1 the upper voice and lower voice have an interval of a minor seventh (the upper voice plays C while the lower voice plays D).
They are absolutely allowed and are treated in many different ways. In order to avoid a continuance of asking so many specialized questions, I would urge you to study Johann Fux's Gradus ad Parnassum which is the foundation for counterpoint and studied by all composers.
Also, for future reference, if Bach does it, then it's okay.
@jjmusicnotes already answered the question with yes. The particular example you mention goes like:
(2nd half of the first bar).
The d occurs in the lower voice in a rising line of steps in between c and an e; It's on a weak count and as it is a short sixteenth it immediately dissolves into an e which is consonant with the c in the uppoer voice. So this is a simple passing note and its effect is to smoothen the melody line. In this example, the seventh may sound harsh if the tempo is too low and if you deliberately emphasize the counter beat (the second half of the 3rd count); If it does, it probably means you got the tempo and/or the emphasis wrong.
Another typical case where you see minor sevenths (in classsic and in Baroque) is when the seventh actually has the function of the seventh degree in a (major or minor) 7th chord (typically the 5th degree of the scale or dominant 7th chord). This is not such an instance.
In such cases the seventh would typically descend to the third of the chord that lies a fourth above the seventh chord, forming a (semi)cadence.
I want to encourage you to think in terms other than "allowed" and "not allowed" when it comes to Baroque counterpoint. As commenters on another answer have suggested, Bach breaks the "rules" all the time. Better to think of what's usual and what's not usual. Baroque music is full of things that the Gradus ad Parnassum forbids. Take a look at the counterpoint books by Kennan and Gauldin for a more practical approach. (There are other books, but I haven't read them and can't judge them.)