Then there's "Tomorrow is Yesterday" where both Starfleet and UESPA make an appearance. The former is the party Kirk wants to contact, but he claims to the 20th century barbarian that UESPA is "our authority". Difficult to see what the writers were thinking there - one of the organizations being subjugate to another? Kirk lying about UESPA? Starfleet being in charge of navigation hazards (the reason Kirk wants to contact them) and UESPA in charge of space probing (as per the name)?
Timo Saloniemi
"Tomorrow is Yesterday":
KIRK: This is the Captain. Damage control parties on all decks, check in. All departments tie in with the record computer. Report casualties and operational readiness to the First Officer. Kirk out. Lieutenant Uhura, contact Starfleet Control. I want them alerted to the position of that black star that's in the area of Starbase 9.
CHRISTOPHER: Must have taken quite a lot to build a ship like this.
KIRK: There are only twelve like it in the fleet.
CHRISTOPHER: I see. Did the Navy
KIRK: We're a combined service, Captain. Our authority is the United Earth Space Probe Agency.
So Starfleet Control is some real organization Kirk ordered Uhura to contact.
I sort of assumed that if Kirk is being truthful with Christoper that the United Earth Space Probe Agency is the Earth based political agency that recruits Earth humans to serve in Starfleet and negotiates the terms and conditions and authorizes their service in Starfleet.
Could Kirk have been lying to Christopher?
In "Charlie X":
Captain's Log, star date 1535.8. UESPA headquarters notified of the mysterious loss of science probe vessel Antares.
This indicates that UESPA is as real in "Charlie X" as Starfleet Control is in "Tomorrow is Yesterday".
In "The Cage" some crewmen wear an emblem with an image of Earth, indicating membership in UESPA, and in "Where No Man Has Gone Before" a similar empblem is seen on a cup.


Therefore I deduce that up until the first season, and maybe later, the Enterprise crew were members of both the Earth UESPA and the Federation Starfleet, just as members of the National Guard in the USA are under both state and federal authority.