It sounds a little unnatural.
If you still have a headache, I would say: "I've had a headache all day (today)".
If the headache went away, I would say:
"I had a headache today".
*You can put today at the beginning of the sentence, but to me it sounds better at the end.