From Bitterly Divided: The South’s Inner Civil War, by David Williams (New Press, 2010), Kindle pp. 187-189:
Harriet Tubman, famous for her prewar service on the Underground Railroad, headed a ring of spies and scouts who operated along the South Carolina coast. Mary Louveste, an employee at Virginia’s Gosport Navy Yard, where the Confederacy’s ironclad warship Virginia was under construction, smuggled out plans and other documents related to the new secret weapon. She carried the material to Washington, D.C., where she placed it in the hands of Union Secretary of the Navy Gideon Welles. “Mrs. Louveste encountered no small risk in bringing this information … and other facts,” Welles recalled years later in support of her pension application. “I am aware of none more meritorious than this poor colored woman whose zeal and fidelity I remember and acknowledge with gratitude.” There was even a black Union spy in the Confederate White House. Mary Elizabeth Bowser, an associate of Unionist Richmond socialite Elizabeth Van Lew, worked as a maid at the presidential residence. She funneled anything worthy of note to Van Lew, who passed the information on to the Federals at City Point.
A black Virginia couple named Dabney proved to be one of the most innovative spy teams of the war. In early 1863, as Union and Confederate armies eyed each other across the Rappahannock River, they escaped enslavement and the husband found work as a cook and groom for the Federals stationed at the river. He became interested in the army’s telegraph system and asked some of the soldiers how it worked. Soon after, his wife went back across the lines to get a job doing laundry for a Confederate general. Within a short time, the husband began updating Union officers on Rebel troop movements. The officers were astonished at how accurate the information seemed to be and asked the man how he knew such things. He took them to a hill overlooking the river and pointed across to the headquarters of General Robert E. Lee.
That clothes-line tells me in half an hour just what goes on at Lee’s headquarters. You see my wife over there; she washes for the officers, and cooks, and waits around, and as soon as she hears about any movement or anything going on, she comes down and moves the clothes on that line so I can understand it in a minute. That there gray shirt is Longstreet; and when she takes it off, it means he’s gone down about Richmond. That white shirt means Hill; and when she moves it up to the west end of the line, Hill’s corps has moved upstream. That red one is Stonewall. He’s down on the right now, and if he moves, she will move that red shirt.
Blankets with pins at the bottom revealed deceptive troop movements intended to distract Union commanders. During the weeks leading up to the Battle of Chancellorsville, thanks to the Dabneys’ clothesline telegraph, Confederates could not make a move without the Federals knowing about it.