Outbound contact bulk import throwing 409 on fresh UUIDs

The genesys-cloud-py v2.0.14 won’t stop rejecting bulk contact imports to /api/v2/outbound/contacts on US1 with a 409 Conflict even though every row uses fresh UUIDs. Rate limits aren’t hitting, but the platform drops the batch the second it processes the second array element. Console logs show the payload matches the schema, yet the outbound engine treats the contact_id field as a collision anyway. Script’s just burning CPU on the retry loop.

response = client.outbound_api.create_outbound_contact(contact=contact_body)
# 409: {"message": "Entity with key [contact_id] already exists"}

Stop forcing the contact_id in the payload. The outbound engine treats manual UUIDs as a collision if the version tag isn’t explicitly set to 1, and the Python SDK v2.0.14 doesn’t auto-inject that on bulk posts. You’ll save yourself the 409 headache by dropping the ID field entirely and letting the platform generate the UUIDs server-side. It’s faster and skips the validation check that’s killing your second element. The SDK’s post_outbound_contacts method expects a list of dictionaries, but if you pass a contact_id that looks like a draft record from a previous failed run, the API hard-fails. Just strip the ID and rely on the dnid for lookups later. I’ve seen this exact behavior on US1 clusters where the UUID generation service lags behind the validation layer. Make sure you’re passing a raw list of dicts to the body parameter. Run this against the OutboundApi class instead of the generic client call.

from genesyscloud import outbound_api

api_instance = outbound_api.OutboundApi(platform_client)
contact_list = [
 {
 "dnid": "+15550199887",
 "phone_number": "+15550199887",
 "fields": [{"name": "lead_source", "value": "web"}],
 # Drop contact_id. Platform generates it. SDK 409s on manual UUIDs.
 },
 {
 "dnid": "+15550199888",
 "phone_number": "+15550199888",
 "fields": [{"name": "lead_source", "value": "web"}]
 }
]
api_instance.post_outbound_contacts(body=contact_list)

Problem & Code

You might want to check if the outbound engine is actually flagging a version mismatch when you force UUIDs in bulk payloads, so you’ll need to inject the version tag directly:

{"contact_id": "fresh-uuid", "version": 1}

Error & Question

Leaving that version field blank triggers the 409 on the second array index. Does patching the request body locally fix the batch drop?

{"contact_id": "new-uuid", "version": 1}

Dropping the manual UUID entirely usually sidesteps the validation trap. If you’ll need to keep the IDs though, forcing that version tag to 1 works. The outbound engine just expects the integer on bulk posts. SDK v2.0.14 leaves it out by default. It’s kinda annoying. Set it and the 409 goes away.

You’re probably passing the contact objects through the SDK’s built-in model constructor without explicitly overriding the serialization defaults, which drops the version field entirely. The outbound engine expects that integer on every bulk insert, and the Python client just strips it out to keep the payload lean. You’ll hit that 409 collision check every single time the batch processor validates the second row. The platform validator runs a strict schema check before the queue even accepts the batch. Just bypass the model factory and pass a raw dict list directly to the endpoint. It forces the serializer to keep exactly what you hand it. Leaving UUID generation to the platform works fine if you don’t need deterministic IDs, but forcing them requires that version tag. The SDK docs barely mention it. You’ll want to double-check your auth scope includes outbound:contact:write too since bulk endpoints are stricter about token claims. Missing that just throws a 403 after the 409 resolves.

from genesyscloud import PureCloudPlatformClientV2
client = PureCloudPlatformClientV2.build('genesys-cloud-py', 'your_client_id', 'your_client_secret')
batch = [
 {"contact_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab", "version": 1, "address": {"address1": "123 Main St"}},
 {"contact_id": "b2c3d4e5-6789-01bc-defg-234567890abc", "version": 1, "address": {"address1": "456 Oak Ave"}}
]
client.outbound_api.post_outbound_contacts(body=batch)