Add contacts to datastore API

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.

Run In Postman

Request 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 elements in the request body:

ParameterTypeMandatoryDescription
datastore-idStringConditionally MandatorySpecifies the id of the datastore.
feed-idStringYesSpecifies the feed it.
records:ObjectConditionally MandatoryThe 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:

ParameterDescription
resultReturns 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.
statuscodeReturns the response code in case of failure. For a successful transaction, a response code 0 is returned.
descriptionReturns the description of the response in case of failure.
trans_idReturns 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 CodeCode within API ResponseDescription
2001010The request was not processed.
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
1002Mandatory field missing
Language