Bulk Create / Update contact profiles API

This API is used to bulk create or update up to 100 contact profiles that match the given criteria in a single request.

📘

Know your endpoint

Based on the domain you use to log in to Webex Campaign, the endpoint domain for your API varies. For more information, refer to the Know Your API Endpoints section.

Go to the Postman Collection section to learn how to import a Postman collection. Click the below button, If you already know how to import a postman collection.

Run In Postman

Headers

The following table describes the request headers:

Request HeaderDescription
content-Typeapplication/json
authorizationAccess token or API Secret Key in Bearer format

Example: Bearer $(key)

Body Parameters

The following table describes the parameters of the request body:

ParameterTypeMandatoryDescription
profile-nameStringNoSpecifies the profile name.
keyStringConditionallySpecifies the profile key. Either “key”, or “filter” ” is mandatory. Example key:"440000000001"
requestsStringYesSpecifies the attribute array.
filterStringConditionallySpecifies the filter definition. Either “key”, or “filter” is mandatory.
filter.attribute-nameStringConditionallySpecifies the “attribute-id” or “attribute-name”. At least one parameter is mandatory to build a condition.
filter.rel-opStringConditionallySpecifies the relational operator. The options are:

Equals
GreaterThan
GreaterThanEquals
NotEquals
LessThan
LessThanEquals
filter.logical-opStringConditionallySpecifies the logical operator. The options are:

and
or
filter.valStringConditionallySpecifies the value to compare.
upsertStringNoUsed to create or update profile. The options are:
0 - Creates a Profile if it does not exist.
1 - (Default) Creates a Profile if it does not exist. Updates Profile, if exists.
* 2 - Update Profile if exists.
attributesStringYesSpecifies the attributes to be created or updated with values based on given primary key of the profile or filter.
update-linkStringNoSpecifies the update link. The options are:

1 - Ignores the link profile and return success after updating the profile.
2 - (Default) Creates an empty linked profile and then updates the main profile.
* 3 - Fail the complete profile update if link does not exists.
exparamStringNoSpecifies the extra parameters that can be passed for audit logging purpose. You can pass up to 10 extra parameters.
{


   "profile-name": "profile_test",
   "upsert": "1",
   "exparam1": "val1",
   "exparam2": "val2",
   "requests": [{
	"attributes": [{
	
		"attribute-name": "firstname",
		"val": "John"
			}, {

		"attribute-name": "lastname",
		"val": "Smith"
			}
		],
	"filter": [
	{
		"attribute-name": "",
		"rel-op": "equals",
		"val": "1001",
		"logical-op": "and"
				}, 
	{
		"attribute-name": "atbname1",
		"rel-op": "equals",
		"val": "1002",
		"logical-op": "and"
		    }
		  ]
		}
	]
}

{


  "profile-name": "profile_test",
  "upsert": "1",
  "exparam1": "val1",
  "exparam2": "val2",
  "exparam3": "val3",
  "requests": [{
	"key": "4400000000001",
	"attributes": [{
	
	  "attribute-name": "firstname",
	  "val": "Matt"
		}, {

	  "attribute-name": "lastname",
	  "val": "Adam"
		}
		]
	}
	]
}

Response Parameters

This API will return the following response parameters:

ParameterDescription
update-countSpecifies the profile update count.
request-idSpecifies the "request-id".
transaction-idSpecifies the unique transaction ID.
StatusSpecifies the status code of the operation.
ActionTypeSpecifies the action type of the operation.
KeySpecifies the key such as MSISDN, Email ID, or Device ID.
ResultSpecifies the status of the operation.

Failure Response Codes

The API will return code within the response as per the following table in case of failure scenarios.

HTTP Status CodeCode within API ResponseDescription
2001010The request was not processed.
3005Invalid Profile ID
7200Unable to Update Profile as User does not Exist and Upsert value is 2.
7201Unable to create profile as Profile already exist, Upsert value is 0.
7029Profile Attribute in update mentioned does not exist
7031Profile Id and Profile name do not match.
401430Authorization failed. This resource is not allowed to access using this TOKEN or KEY
498Invalid token or Access token expired
405405Method not supported
429429Too many requests. Throttle limit reached for the time window.
499499Request failed. Check the exact reason of failure in application code and description of error stream.
500500Internal server error
1001Invalid input JSON
Language