When Were Blacks First Allowed to Vote?

When the black slaves were freed after the civil war they earned the right to vote under the 15th amendment. However, many blacks were unable to vote because unfair treatment and the 15 amendment was ratified.