Or, how to import custom data into Viable
The https://app.askviable.com/api/{API_KEY}/ingress
endpoint allows you to POST custom data into Viable. It accepts a JSON body with these attributes:
text
(required) The text you'd like us to ingest, e.g "The Viable API documentation could be improved by..."text_created_at
(required) The timestamp for the date and time the text was created, e.g. "2021-04-20T16:20:00+00:00"email
(required) The email (or other unique identifier) of the author of the text, e.g. "[email protected]" or “some-unique-id”source
(optional) The source of the text, e.g. "feedback-form"source_id
(optional) The id of this text in the source systemthread_id
(optional) The id of this thread in the source system (if, for example, you have multiple lines of chat that you want to associate with a single conversation)prompt
(optional) The question or request that prompted this text, e.g. "Do you have any feedback for us?"metadata
(optional) an object containing metadata for the feedback. The keys in this object act as the labels for the metadata and they can be anything you’d like, e.g. {"App Version": "2.3.0", "Product": "iOS App"}
{
"text": "Some text to ingest",
"text_created_at": "2022-04-20T16:20:00+00:00",
"email": "[email protected]",
"source": "my-source",
"source_id": "1234567890",
"thread_id": "9876543210"
"metadata": {
"Label One": "Value",
"Label Two": "Next Value"
}
}
An alternate method for sending metadata:
"metadata": [
{"type": "Tag", "value": "name of tag 1"},
{"type": "Tag", "value": "name of tag 2"},
{"type": "Tag", "value": "name of tag 2"},
{"type": "City", "value": "Singapore"},
// ... other metadata here
]