The section below describes the old version of the Content Upload API that has been deprecated as of July 2019. Requests made according to the specifications below will be redirected to the new endpoint. To upgrade to the new Content Upload API, see Updates to the Content Upload API.

URL resource: https://api.crimsonhexagon.com/api/content/upload
Method: POST

Field name & typeDescriptionExample
items (object)required
container object for required and optional fields
see the JSON example below
items.type (string)required
the defined name of the custom content source assigned to you
"my_survey_data"
items.title (string)required
the title of the document being uploaded
"my_document_title"
items.date (date)required
the creation date of the content
"2018-01-26T16:14:00"
items.author (string)required
the creator of the content
"George Washington"
items.url (string)required
the web location of this document
"http://www.crimsonhexagon.com/post1"
items.contents (string)required
the entire document contents
"Example content"
items.language (string)required
the source language
"en"
items.gender (string)optional
the gender of the author
"F"
items.age (int32)optional
the age of the author
"24"
items.geolocationoptional
container object for geolocation fields
see the JSON example below
items.geolocation.idoptional
any valid string from the geography metadata endpoints
"USA.MA.Boston"
items.geolocation.longitude (float)optional
latitude of the author
"42.3504621"
items.geolocation.latitude (float)optional
longitude of the author
"-71.0533528"
items.geolocation.zipcode (string)optional
US zip code of the author
"02110"
requestUsage (boolean)optional
request current API usage against your contracted usage
"requestUsage": "true"
curl -H "Content-Type: application/json" -X POST "https://api.crimsonhexagon.com/api/content/upload?auth=<tokenhere>" -d'
{
  "items": [
    {
      "type":"content_type_name"
      "date": "2010-01-26T16:14:00",
      "contents": "Example content",
      "guid": "This is my guid",
      "title": "Example Title",
      "author": "me",
      "language": "en",
      "gender": "F",
      "geolocation": {
        "id": "USA.NY"
      	}
      },
      "type":"content_type_name"
      "date": "2010-01-27T10:10:00",
      "contents": "Example content",
      "guid": "This is my guid",
      "title": "Example Title",
      "author": "me",
      "language": "en",
      "gender": "F",
      "geolocation": {
        "id": "USA.MA.Boston"
      	}
      }
   ],
  "requestUsage": "true"
}'
{
    "uploadCount": 2,
    "DocumentsUploadedInLastTwentyFourHours": 6,
    "ContractedDocumentsWithinTwentyFourHours": 100000000,
    "status": "success"
}