I thought I~; I believe I did~
Describes what the speaker thought or believed about a past action or state.
つもりだった expresses a past intention or belief that may or may not have been fulfilled. It often carries a nuance of realization or contrast: you thought you did something, but now you're not sure or you realize you were wrong. For example, you might say かぎをかけたつもりだった when you think you locked the door, but later find it unlocked. It can also mean 'I intended to do...' but didn't, as in 行くつもりだった but something prevented you.
This pattern is common in spoken Japanese, especially when explaining a mistake or a misunderstanding. It's not as formal as ~はずだった, which implies a stronger logical expectation. With つもりだった, the speaker emphasizes their subjective belief or plan.
Be careful not to confuse it with つもりです, which states a current intention. つもりだった shifts the time frame to the past, so it's used when looking back on what you thought or planned.