If you haven't responded, take your time before responding. Ask her why she has ended the relationship. From there you can deduce whether to try to get her back or not.
She might reply or not. If she doesn't reply, don't bother. If you had responded, don't continue conversing with her if her response isn't positive. You need to employ no contact rule.
Exercise no contact rule, not communicating with her in whatsoever way, for four weeks. During this time you'll have let the healing process begin its course, had enough time to reflect on the relationship and know whether you would want her back in your life.
After the no-contact period if she doesn't respond then contact her. Start with a 'hello' text and build on it. Don't jump into the relationship issues right away. If she responds talk in general terms and not frequently. From her responses, you'll know whether there's a chance of getting together.
Or, after a month you can send her a text wishing her all the best and that she'll find a man after her heart. This is after you'd reflected on the relationship and arrived at the decision to move on with your life or her responses are not inviting.