In Manteca, the city's Planning and Building Safety Divisions approve permits for retaining walls more than 4 feet tall counting the footing, or walls that support a surcharge, the city's word for extra load on the soil above. Ask Manteca's Building Safety Division what counts as a surcharge on your lot. For any wall, permit or not is the city's call, so we check with them on every project.
On a property line, the city also decides the material. Where the ground on one side sits 18 inches or more above the other, the wall has to be reinforced concrete or reinforced concrete block, so it's worth knowing where your lot line runs before you fall for a particular look.
Around Manteca we see a lot of grade changes between neighboring lots, raised beds along back fences and yards being leveled for a pool or a patio. We build the same walls in Lathrop and Ripon, and we check with the city there the same way before we start.