Submit data

POST /api/v1/data_sets

Send custom KVPs to Datastore to be retrieved later.

Headers

HeaderDescription
AuthorizationRequires "Bearer " plus the API Token of the Data Set Template
content-typeRequires application/json

Parameters

ParameterDescriptionData Type
urlThe full URL of the endpoint (example: https://datastore.mindfulcx.com/api/v1/data_sets)string
customer_contact_numberThe customer contact number will be used as the search key when storing and retrieving the data.string
data_valuesA JSON object assigning values to all Data Keys configured for the Data Set Template.JSON

Example request

curl 
--request POST \
--url https://api-ds.getmindful.com/api/v1/data_sets \
--header 'Authorization: Bearer jj9LahYn9lmpQIAOBMCKiIxRpo01qZqyypJWtn/1BxY=' \
--header 'content-type: application/json' \
--data '{
	"customer_contact_number": "555-555-5555",
        "data_values": {
            "FirstName": "Example Value",
            "LastName": "Example Value",
            "AccNum": "Example Value",
            "Callid": "Example Value"
            }
        }'

Status codes

Status CodeDescription
200 OKThe request was processed successfully.
401 Unauthorized"error": "InvalidToken" indicates an issue with the Authorization header.

Example response

Status: 200 OK
{
    "organization": {
        "id": "f4k3cfb5-21af-4d29-f4k3-7d82acb266cQ"
    },
    "customer_contact_number": "5555555555",
    "ani": "5555555555",
    "ecbt": null,
    "data_set_template_id": "f4k37492-602e-48f0-b1b1-54d0822c33sP",
    "data_set_template_name": "Genesys Cloud Integration",
    "time_to_expire": "2022-08-08T21:07:22.642Z",
    "FirstName": "Example Value",
    "LastName": "Example Value",
    "AccNum": "Example Value",
    "Callid": "Example Value"
}

Model

PropertyDescriptionData Type
customer_contact_numberThe customer callback number to be used as the search key for the data you submit.

If the customer enters a different callback number, Mindful will automatically update the value of customer_contact_number.

string
aniThe detected customer ANI, which could differ from the customer_contact_number if the customer provides a different callback number.integer
ecbtThe Estimated Callback Time set by Mindful after a callback is registered for the customer_contact_number.integer (seconds)
data_set_template_idThe ID of the Data Set Templatestring
data_set_template_nameThe friendly name of the Data Set Templatestring
time_to_expireA timestamp indicating when the data will be automatically removed (ecbt + the Data Set Template's Time to Expire value)timestamp
Your data valuesAny KVPs you submitted in the data_values object.string