Skip to content

Commit 6b49e7d

Browse files
committed
Replace user_id with custom_user_id in user creation requests for consistency
1 parent 8ae5fcf commit 6b49e7d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

recallrai/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async def create_user(
8989
TimeoutError: If the request times out.
9090
RecallrAIError: For other API-related errors.
9191
"""
92-
response = await self._http.post("/api/v1/users", data={"user_id": user_id, "metadata": metadata or {}})
92+
response = await self._http.post("/api/v1/users", data={"custom_user_id": user_id, "metadata": metadata or {}})
9393
if response.status_code == 409:
9494
detail = response.json().get("detail", f"User with ID {user_id} already exists")
9595
raise UserAlreadyExistsError(message=detail, http_status=response.status_code)

recallrai/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def create_user(
7575
TimeoutError: If the request times out.
7676
RecallrAIError: For other API-related errors.
7777
"""
78-
response = self._http.post("/api/v1/users", data={"user_id": user_id, "metadata": metadata or {}})
78+
response = self._http.post("/api/v1/users", data={"custom_user_id": user_id, "metadata": metadata or {}})
7979
if response.status_code == 409:
8080
detail = response.json().get("detail", f"User with ID {user_id} already exists")
8181
raise UserAlreadyExistsError(message=detail, http_status=response.status_code)

0 commit comments

Comments
 (0)