Skip to main content

Assign/Unassign Users to Lead

Update campaign lead user assignments. Use this endpoint to assign agents to leads (so they can dial those contacts) or unassign them.

Endpoint

PUT https://{Cms_Domain_Name}:{port}/cms/configuration/voice/campaignLeadUserMapping

Authentication

HeaderValue
Content-Typeapplication/json
Acceptapplication/json
AuthorizationBasic {AuthToken}
note

This endpoint uses Basic authentication (Base64-encoded username:password), unlike other v6 endpoints that use Bearer tokens.

Request Body

{
"leadId": 2,
"campaignId": 1,
"assignedUserIds": ["anav_agent"],
"unassignedUserIds": ["exe_gs", "madhur1"]
}

Request Parameters

ParameterTypeRequiredDescription
leadIdIntegerYesLead identifier
campaignIdIntegerYesCampaign identifier
assignedUserIdsArray<String>YesUser IDs to assign to the lead (can be empty [])
unassignedUserIdsArray<String>YesUser IDs to remove from the lead (can be empty [])

Sample Request

curl -X 'PUT' \
'https://{Cms_Domain_Name}:{port}/cms/configuration/voice/campaignLeadUserMapping' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic {AuthToken}' \
-d '{
"leadId": 2,
"campaignId": 1,
"assignedUserIds": ["anav_agent"],
"unassignedUserIds": ["exe_gs", "madhur1"]
}'

Sample Response

{
"campaignLeadId": 1,
"assignedCampaignUserIds": [1],
"unassignedCampaignUserIds": [3817, 3802],
"leadId": 2,
"campaignId": 1,
"assignedUserIds": ["anav_agent"],
"unassignedUserIds": ["madhur1", "exe_gs"]
}

Response Fields

FieldTypeDescription
campaignLeadIdIntegerCampaign-lead mapping ID
assignedCampaignUserIdsArray<Integer>Internal campaign user IDs that were assigned
unassignedCampaignUserIdsArray<Integer>Internal campaign user IDs that were unassigned
leadIdIntegerLead identifier (echo of request)
campaignIdIntegerCampaign identifier (echo of request)
assignedUserIdsArray<String>User IDs that were assigned (echo of request)
unassignedUserIdsArray<String>User IDs that were unassigned (echo of request)

Usage Notes

  • To only assign users, pass an empty array for unassignedUserIds
  • To only unassign users, pass an empty array for assignedUserIds
  • User IDs must correspond to existing users in the contact center
  • Changes take effect immediately — assigned agents can start dialing the lead's contacts

Error Responses

Status CodeDescription
400Bad Request — Invalid lead/campaign ID or user IDs
401Unauthorized — Missing or invalid credentials
403Forbidden — Insufficient permissions
404Not Found — Lead or campaign does not exist
500Internal Server Error
{
"statusCode": 404,
"status": "Not Found",
"errorCode": "CONF-1001",
"errorMessage": "Object doesn't exist"
}