Data retention varies depending on your license:
Ubidots STEM: 1 month of data retention.
Ubidots: 24 months of data retention.
If your project requires longer data retention, feel free to reach out to our support team at support@ubidots.com, or using the in-app chat channel.