add api for spaces