diff --git a/tests/sanity/tests/API/Api.ts b/tests/sanity/tests/API/Api.ts
index 6d66e506ef..c0c61385e0 100644
--- a/tests/sanity/tests/API/Api.ts
+++ b/tests/sanity/tests/API/Api.ts
@@ -66,7 +66,7 @@ export class ApiEndpoint {
 
   async leaveWorkspace (email: string, username: string, password: string): Promise<any> {
     const token = await this.loginAndGetToken(username, password)
-    const url = AccountUrl
+    const url = this.baseUrl
     const payload = {
       method: 'leaveWorkspace',
       params: [email]