400 BAD REQUEST: INVALID_VALUE
Is it possible to create a contact list via POST /api/v2/outbound/contactlists without hitting this validation wall? I’m sending the payload below and getting rejected on contactUriScheme. The docs say call is valid, but the API complains.
{
"name": "Test List",
"contactUriScheme": "call",
"contacts": [
{
"id": "c1",
"contactUri": "tel:+15550199",
"contactType": "voice"
}
]
}
You need to align your payload with the current schema version. The contactUriScheme field is strictly validated against the type field in the contact list definition, and simply setting call isn’t enough if the underlying contact objects don’t match the expected URI format for that scheme.
Cause:
The API rejects the request because the contacts array items are missing the required type property that matches the list’s contactUriScheme. Also, the contactUri value tel:+155 is likely being flagged as invalid if it’s not fully formatted according to E.164 standards expected by the outbound engine. The validation error INVALID_VALUE usually points to a mismatch between the list’s declared scheme and the actual contact data structure.
Solution:
Ensure every contact object includes a type field that matches the list’s contactUriScheme. For call schemes, the type should typically be PHONE. Also, verify your phone numbers are properly formatted. Here’s the corrected payload structure:
{
"name": "Test List",
"contactUriScheme": "call",
"contacts": [
{
"id": "c1",
"contactUri": "tel:+15551234567",
"type": "PHONE"
}
]
}
If you’re using the Genesys Cloud SDK, the ContactListItem model enforces this relationship. In JavaScript, it looks like this:
const contact = new PlatformClient.models.ContactListItem();
contact.id = "c1";
contact.contactUri = "tel:+15551234567";
contact.type = "PHONE";
const list = new PlatformClient.models.ContactList();
list.name = "Test List";
list.contactUriScheme = "call";
list.contacts = [contact];
// POST /api/v2/outbound/contactlists
platformClient.OutboundApi.postOutboundContactlists(list)
.then(res => console.log("List created", res.body))
.catch(err => console.error("Failed", err.message));
Double-check your number formatting. If you’re dealing with international numbers, stick to E.164. The outbound engine is strict about this.
The problem here is missing the type field. docs state “each contact requires a type matching the scheme.” you also need address. try this:
{
"name": "Test List",
"contactUriScheme": "call",
"contacts": [{
"id": "c1",
"type": "call",
"address": "+15550001234"
}]
}
it should work now.