It would be very useful if through the API Spaces could be archived or unarchived. Right now this is not a feature available.