edit api for external calling