First, check for fluid leaking out. And loss of inventory from the reservoir.
If there's air in the lines the pedal will be mushy when you first press it, but you can pump it & then it holds. Bleed your brakes.
If the pedal sinks slowly & smoothly to the floor while you're pressing not-very-hard on the pedal, then it's a bad master cylinder. I guess it doesn't hurt to try bleeding them, but it's usually not a permanent fix.