post https://yourdomain.webexcampaign.io/campaignapi/resources/v3/profiles/updateBulk
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.
Headers
The following table describes the request headers:
Request Header | Description |
---|---|
content-Type | application/json |
authorization | Access token or API Secret Key in Bearer format Example: Bearer $(key) |
Body Parameters
The following table describes the parameters of the request body:
Parameter | Type | Mandatory | Description |
---|---|---|---|
profile-name | String | No | Specifies the profile name. |
key | String | Conditionally | Specifies the profile key. Either “key”, or “filter” ” is mandatory. Example key:"440000000001" |
requests | String | Yes | Specifies the attribute array. |
filter | String | Conditionally | Specifies the filter definition. Either “key”, or “filter” is mandatory. |
filter.attribute-name | String | Conditionally | Specifies the “attribute-id” or “attribute-name”. At least one parameter is mandatory to build a condition. |
filter.rel-op | String | Conditionally | Specifies the relational operator. The options are: Equals GreaterThan GreaterThanEquals NotEquals LessThan LessThanEquals |
filter.logical-op | String | Conditionally | Specifies the logical operator. The options are: and or |
filter.val | String | Conditionally | Specifies the value to compare. |
upsert | String | No | Used 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. |
attributes | String | Yes | Specifies the attributes to be created or updated with values based on given primary key of the profile or filter. |
update-link | String | No | Specifies 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. |
exparam | String | No | Specifies 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:
Parameter | Description |
---|---|
update-count | Specifies the profile update count. |
request-id | Specifies the "request-id". |
transaction-id | Specifies the unique transaction ID. |
Status | Specifies the status code of the operation. |
ActionType | Specifies the action type of the operation. |
Key | Specifies the key such as MSISDN, Email ID, or Device ID. |
Result | Specifies 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 Code | Code within API Response | Description |
---|---|---|
200 | 1010 | The request was not processed. |
3005 | Invalid Profile ID | |
7200 | Unable to Update Profile as User does not Exist and Upsert value is 2. | |
7201 | Unable to create profile as Profile already exist, Upsert value is 0. | |
7029 | Profile Attribute in update mentioned does not exist | |
7031 | Profile Id and Profile name do not match. | |
401 | 430 | Authorization failed. This resource is not allowed to access using this TOKEN or KEY |
498 | Invalid token or Access token expired | |
405 | 405 | Method not supported |
429 | 429 | Too many requests. Throttle limit reached for the time window. |
499 | 499 | Request failed. Check the exact reason of failure in application code and description of error stream. |
500 | 500 | Internal server error |
1001 | Invalid input JSON |