Skip to main content
POST
/
contents
/
v1
/
documents
Enrich document
curl --request POST \
  --url https://api.bigdata.com/contents/v1/documents \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "file_name": "research_report.pdf",
  "published_ts": "2025-06-15T10:30:00Z",
  "tags": [
    "Research Team"
  ],
  "share_with_org": true
}
'
import requests

url = "https://api.bigdata.com/contents/v1/documents"

payload = {
"file_name": "research_report.pdf",
"published_ts": "2025-06-15T10:30:00Z",
"tags": ["Research Team"],
"share_with_org": True
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file_name: 'research_report.pdf',
published_ts: '2025-06-15T10:30:00Z',
tags: ['Research Team'],
share_with_org: true
})
};

fetch('https://api.bigdata.com/contents/v1/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bigdata.com/contents/v1/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file_name' => 'research_report.pdf',
'published_ts' => '2025-06-15T10:30:00Z',
'tags' => [
'Research Team'
],
'share_with_org' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.bigdata.com/contents/v1/documents"

payload := strings.NewReader("{\n \"file_name\": \"research_report.pdf\",\n \"published_ts\": \"2025-06-15T10:30:00Z\",\n \"tags\": [\n \"Research Team\"\n ],\n \"share_with_org\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.bigdata.com/contents/v1/documents")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"research_report.pdf\",\n \"published_ts\": \"2025-06-15T10:30:00Z\",\n \"tags\": [\n \"Research Team\"\n ],\n \"share_with_org\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.bigdata.com/contents/v1/documents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_name\": \"research_report.pdf\",\n \"published_ts\": \"2025-06-15T10:30:00Z\",\n \"tags\": [\n \"Research Team\"\n ],\n \"share_with_org\": true\n}"

response = http.request(request)
puts response.read_body
{
  "url": "https://s3.amazonaws.com/com.ravenpack.private-content-drop.smart-topics-prod-nvirginia/uploads/F22BC027BCE166BC89DD2A81358DA2F1?AWSAccessKeyId=...",
  "id": "F22BC027BCE166BC89DD2A81358DA2F1"
}

Authorizations

X-API-KEY
string
header
required

Your API key. Include it in every request as the X-API-KEY header. Create and manage keys in the Developer Platform.

Body

application/json
file_name
string
required

Name of the file being uploaded (e.g. research_report.pdf).

Example:

"research_report.pdf"

published_ts
string<date-time>

Optional publication date/time for the document (ISO 8601). This date will be used as the reference timestamp for search and retrieval.

Example:

"2025-06-15T10:30:00Z"

tags
string[]

Optional list of tag names to apply to the document. Tags can be used to search and filter documents in the Search and Research-Agent services.

Example:
["Research Team"]
share_with_org
boolean

If true, all members of your organization can access the file once it is processed. If false, only you can access the processed content.

Example:

true

Response

Pre-signed URL and document id. PUT the file to the URL to complete the upload; use the id with Get document to poll for status.

url
string<uri>
required

Single-use pre-signed URL. Send a PUT request to this URL with the document file as the body.

id
string
required

Document content ID (32-character uppercase hexadecimal). Use this with Get document to check processing status and perform operations on the document.