The statute is a gate, not a suggestion
Business and Professions Code § 7031 lets an unlicensed contractor be denied recovery in court — and can force disgorgement of amounts already paid. The license classification must cover the work you actually performed, not the trade you usually market.
Substantial compliance is narrow
Courts sometimes excuse a brief lapse if you were licensed at the start and the work stayed in class. That is not a plan. Letting the license expire mid-job, using someone else's number, or working outside your classification is how § 7031 motions get granted.
Put the number on the notice
Preliminary notices and liens should carry your CSLB number. Owners and title companies look for it. If you cannot show a license that covered the work on the dates you furnished labor, generate the document after you fix the license problem — not before.
Frequently asked questions
+Can I still collect if I forgot to renew my license?
B&P § 7031(c) allows a narrow exception: if you were licensed when the contract was signed, the lapse was brief, and you did not know and could not have known, a court may permit recovery. This is not a reliable strategy — renew before expiry.
+Does the license need to match the exact trade I performed?
Yes. The classification must cover the work you actually did. A general B license does not cover specialty plumbing or electrical work if that is what the job required. Working outside your classification is how § 7031 motions succeed.
+What if I used someone else's license number?
Using another person's license number is treated as unlicensed. Courts have consistently held that borrowing or sharing a number does not satisfy the statute, and disgorgement may still apply.