So for the past couple of weeks I had this problem where tables and layers that I would add in an existing service with the API would not show up on AGOL, but they were present on the server since I could successfully see them with the API, add data and query this data also.
I've just found out what was the problem which I'll post as an answer for anybody coming accross this problem.