The decision was reached around 5 a.m. after more than seven hours of meetings at a hotel in Oliva, an hour from Valencia, involving the players, RFEF officials, the National Sports Council (CSD) and the women's players' union FUTPRO.
As part of the deal to end the boycott, between six and nine senior officials of the football federation will be invited to leave their jobs or will be sacked, a source told Reuters on Wednesday, shortly before the federation announced it had relieved its secretary general Andreu Camps of his duties.
The list of RFEF departures was drawn up during a marathon meeting between the players, their FUTPRO union, members of the Spanish National Sports Council (CSD), and the RFEF's head of women's' football Rafael Del Amo, which ended early on Wednesday.
Some of the names were put forward by the players themselves, the source added.
The players had said they would not represent Spain until there were further changes at the federation, deepening a crisis that started after former (RFEF) boss Luis Rubiales kissed Jenni Hermoso on the lips during the World Cup presentation ceremony.
"A joint commission will be created between RFEF, CSD and players to follow up on the agreements, which will be signed tomorrow," CSD President Victor Francos told reporters.
"The players have expressed their concern about the need for profound changes in the RFEF, which has committed to making these changes immediately."
Later on Wednesday, the RFEF announced the first measure was to remove the adjective "female" from the women's national team's official brand to harmonize it with the men's squad. From now on, both will be known as "Spanish national football team".
"Beyond it being a symbolic step, we want it to be a change of concept, and the recognition that football is football, no matter who plays it," RFEF President Pedro Rocha said, adding this would promote a more egalitarian concept of the sport.
The remaining changes have yet to be made public though the federation issued another statement on Wednesday evening pledging to give the players a 'safe environment'.
After most of the Women's World Cup winners were selected for upcoming games, the players said earlier this week they would take the "best decision" for their future and health and after studying the legal implications of being included in a squad list they had asked to be left off.
They also alleged the call-up was not issued within the parameters of world's soccer governing body FIFA.
The players could have faced sanctions including fines of up 30,000 euros ($32,000) and the suspension of their federation licence for two to 15 years if they had refused the call-up.
Twenty players who said they were boycotting the team were called up by new coach Montse Tome, and while all of them reported for training on Tuesday two decided to leave the squad.
'See a process'
Mapi Leon and Patri Guijarro, who were part of a revolt that pre-dated the World Cup, said they did not feel mentally ready to return and said they needed to "see a process" of change.
"The situation for Patri and me is different from the rest of my colleagues. In the end we are not in a state to return," Leon told reporters after leaving the camp.
Francos said that any players who dropped out of the squad would not be sanctioned.
The revolt by the players was triggered after former RFEF chief Rubiales kissed forward Hermoso on the lips following Spain's World Cup victory.
She disputed his insistence the kiss was consensual, sparking a national debate about macho culture in sport and eventually led to Rubiales's resignation.
Hermoso was not in the squad list announced on Monday and accused the RFEF of trying to divide and manipulate the players.
Spain are set to make their debut in the Women's Nations League against Sweden in Gothenburg on Friday before playing against Switzerland in Cordoba on Sept. 26.
The Nations League will determine which teams from Europe qualify for the 2024 Paris Olympic Games.