Docs state: “The platform supports bulk operations for efficient data management.” Trying to bulk-create users from a CSV file using the Python Platform SDK. We have a list of 500 employees. The goal is simple. Read CSV, construct CreateUserRequest objects, and call post_users_users.
The first batch of 50 users creates successfully. 200 OK. Headers look clean. The second batch fails immediately with 409 Conflict. No specific error details in the response body, just a generic conflict message.
Here is the loop logic. We’re using the genesyscloud package version 128.0.0.
from genesyscloud.rest import ApiException
import csv
def create_users_from_csv(file_path):
with open(file_path, 'r') as f:
reader = csv.DictReader(f)
user_requests = []
for row in reader:
req = CreateUserProfileRequest(
email=row['email'],
name=row['name'],
external_id=row['employee_id']
)
user_requests.append(req)
# Batch size of 50
for i in range(0, len(user_requests), 50):
batch = user_requests[i:i+50]
try:
resp = api_client.post_users_users(body=batch)
print(f"Batch {i//50 + 1} successful")
except ApiException as e:
print(f"Batch {i//50 + 1} failed: {e.status} {e.reason}")
raise
The CSV has unique emails and external IDs. Checked the database. No duplicates. The 409 happens consistently on the second batch. First batch always works.
Is the SDK reusing the same transaction ID or something? The docs don’t mention rate limiting causing conflicts. Just 429s. This feels like a client-side caching issue or a bug in the bulk endpoint handler.
Anyone seen this before? Or is there a specific flag to clear the session state between batches?