can I say that I was kidding or I was joking which one is correct English

Both "I was kidding" and "I was joking" are correct English expressions. They can be used interchangeably to convey the meaning that you were not being serious, but rather making a joke.