Skip to main content
POST
/
api
/
knowledge-bases
/
{id}
/
documents
Error
A valid request URL is required to generate request examples
{
  "_id": "<string>",
  "knowledgeBaseId": "<string>",
  "accountId": "<string>",
  "title": "<string>",
  "sourceType": "<string>",
  "content": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "sourceUrl": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token using an API key (format nl_live_* or nl_test_*)

Path Parameters

id
string
required

Knowledge base ID

Body

application/json
title
string
required

Document title

content
string
required

Document content

sourceType
string
default:text

Type of source content

sourceUrl
string

Optional URL where the content was sourced from

Response

Created document

_id
string
required

Unique identifier

knowledgeBaseId
string
required

Parent knowledge base ID

accountId
string
required

Owning account ID

title
string
required

Document title

sourceType
string
required

Type of source content

content
string
required

Document content

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
sourceUrl
string

URL where the content was sourced from