Content Corpus

Add a document to the content table corpus. Either a URL or text must be provided. This allows entry of documents/content that get added to content table, content-graph and available for usage in recommendation, as well as content-explorer.

  • id if you upload the document more than once, ensure it has common id so only one document is created

  • Custom Attributes Any attributes you upload that are not reserved, will be added to content document.


# Upsert a document into content table and classify it
curl -s -XPOST "https://api.lytics.io/api/content/corpus" \
  -H "Authorization: $LIOKEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id":"doc_id_123",
    "text":"big-long-body-of text for classification",
    "custom_attribute_name":"custom attribute"
}' | jq '.'


# upsert a url into db
#  url is used as document id
curl -s -XPOST "https://api.lytics.io/api/content/corpus" \
  -H "Authorization: $LIOKEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url":"http://www.validdomain/validurl.html",
    "custom_attribute_name":"custom attribute"
}' | jq '.'
Query Params
string

Your Lytics account ID.

string

the URL for identifying and retrieving content

string

the body of the content to be added

string

custom topics to append to the document, in addition to topics that will be added with enrichment

Response

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json