Twenty-nine American peace activists, participating in a demonstration by boating down the embattled river border that separates Nicaragua from Costa Rica, were reported today by a spokesman for the group to have been taken into custody by anti-Sandinista rebels who were holding them in Costa Rica.

Sharon Hostetler, a spokeswoman for the U.S.-based organization, Witness For Peace, said at a news conference here that the 29 activists -- and an undetermined number of journalists, some of them also Americans -- were stopped while traveling down the San Juan River in a long, covered launch, in a demonstration the organization calls "Flotilla for Peace."

Witness For Peace, an ecumenical Christian group that opposes U.S. policy in Central America, has sent 1,500 American activists to Nicaragua for brief periods over the past two years. The visitors work with Nicaraguans in war zones in the hope of discouraging rebel attacks.

In Washington, a State Department spokesman said late today, "at the present time we are attempting to clarify the situation on the ground," and that three U.S. Embassy officers from Managua had been dispatched by car to the area where the incident took place. He said Washington had asked the governments of Costa Rica and Nicaragua to help.

In Miami, a spokesman for the rebel group that allegedly had taken the demonstrators into custody denied that his group was holding them and said in a telephone interview that the incident had been manufactured by the leftist Sandinista government of Nicararagua and its supporters "for propaganda purposes," Washington Post staff writer Joanne Omang reported.

Spokesmen for Reuter news agency, and NBC and ABC networks confirmed that they had sent reporters and technicians with the group. None had been expected to report in by any particular time.

At a news conference in San Francisco, witness For Peace said one of the Americans on the boat was Robert Heifetz, son of concert violinist Jascha Heifetz, United Press International reported.

Hostetler said that members at the Witness For Peace headquarters in Managua who were in radio contact with the boat had heard shots fired and had been told by the radio operator on the craft that three armed men on the Costa Rican side of the river had ordered the boat to the bank and ordered everyone to disembark.

She said that happened at 7:45 a.m. today and that three hours later the same radio operator, Warren Armstrong, 25, of Wayne, Pa., came on the radio and told them in Spanish, "We are with brothers who are treating us well." According to Hostetler, he said no one had been harmed.

There was no indication by Hostetler to which rebel organization the three men belonged, but she said Armstrong had referred to the men as contras, or counterrevolutionaries, as the rebels are commonly called here.

The San Juan River has, especially for the past three months, been the scene of heavy fighting between Sandinista troops and the forces of rebel leader Eden Pastora. The Sandinista Army said this week that with air strikes and ground forces it had completely destroyed all Pastora's bases along the river in Nicaraguan territory since this increased fighting began in May, driving Pastora's forces back into Costa Rica. Pastora was the military commander of a rebel group called the Revolutionary Democratic Alliance, or ARDE, until the group broke up last year when other leaders made common cause with a larger rebel organization and Pastora refused.

Before the activists' trip began Monday, Pastora had reportedly announced in Costa Rica that his forces would attack the Witness For Peace group if it tried to navigate the San Juan River. He reportedly referred to the peace activists as "wolves in sheep's clothing," and "politicians disguised as pastors," according to Hostetler.

But Edgard Macias, who identified himself as a spokesman for ARDE, said in Miami that Pastora's weekend threats "were rejected by the directorate of ARDE and countermanded. We never attack unarmed people or kidnap anybody." He said ARDE political director Jose Davila had told him ARDE knew nothing of the whereabouts of the Americans.

"The Sandinistas have done all this for propaganda purposes. It has no basis in fact," Macias said. "We totally reject all these accusations."

The largest force fighting the leftist Nicaraguan government is the U.S.-backed Nicaraguan Democratic Force, or FDN, which is based mostly in the north along the Honduran border. Pastora's group is based in the south along the Costa Rican border.

Vicki Kemper, a spokeswomen for the peace group, said in Washington her organization would hold the Reagan administration and those members of Congress who recently voted for aid to the contras responsible for any action against the Americans. However, Pastora's group denies receiving U.S. government support.

According to Hostetler, Armstrong, the radio operator, continued to communicate to the Managua office informing them that the shooting had come from the Costa Rican side of the river, that the peace activists were at a point known as Las Crucitas in Costa Rican territory and that the men who had stopped them were wearing partial uniforms, which he could not describe in further detail. He then apparently had to disembark with the others, according to a transcript of the radio communication.

A spokesman for the U.S. Embassy said it had notified the Nicaraguan government of the incident as well as the State Department.

According to a broadcast on government-controlled radio, a Sandinista Army helicopter sighted the boat on the Costa Rican side of the river late this afternoon.

According to an embassy spokesman, there was no further news about activists and the journalists.