This API is used to add contacts to a datastores. This is an asynchronous API, which means, it takes the data and gives an ACK, and internally, it will insert the record into a datastores asynchronously.
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.
Request 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 elements in the request body:
Parameter | Type | Mandatory | Description |
---|---|---|---|
datastore-id | String | Conditionally Mandatory | Specifies the id of the datastore. |
feed-id | String | Yes | Specifies the feed it. |
records: | Object | Conditionally Mandatory | The parameters of the datastore. |
Request Example
{
"datastore-id":"1466",
"feed-id":"1499",
"records":[
{ "msisdn":"+442332223424","firstname":"John Smith","emailid" :"[email protected]" },
{ "msisdn":"+442332223425","firstname":"John Smith","emailid" :"[email protected]" },
{ "msisdn":"+442332223427","firstname":"John Smith","emailid" :"[email protected]" },
{ "msisdn":"+442332223428","firstname":"John Smith","emailid" :"[email protected]","accountid":"bc12434" },
{ "msisdn":"+442332223422","firstname":"John Smith" }
]
}
Response Parameters
This API will return the following response parameters:
Parameter | Description |
---|---|
result | Returns the result of the operation as an object for a valid datastore-id. - correlation_id: Returns a correlation id. - description: Returns the description of the response in case of failure. - status: Returns the response code in case of failure. For successful operation, a response code 0 is returned. |
statuscode | Returns the response code in case of failure. For a successful transaction, a response code 0 is returned. |
description | Returns the description of the response in case of failure. |
trans_id | Returns the unique Transaction ID of the operation in case of success. |
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. |
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 | |
1002 | Mandatory field missing |