Connector API

Create or Update Documents

put

Creates a new document if the document_id doesn't exist, or updates an existing document if it does.

Header parameters
authorizationanyRequired

Authorization header

Example: Bearer your_token_here
Body
connection_idintegerRequired

The unique identifier for your custom API integration connection. You can find this ID in your integration settings at https://web.dashworks.ai/integrations

document_idstringRequired

For creating a new document, this field is optional - if provided, it will be used as the document's identifier. For updating an existing document, this field is required and must match a document_id previously returned by a PUT request. Note: Document ids are limited to 64 characters.

titleany ofOptional
stringOptional
or
nullOptional
contentany ofOptional

Restriction: The content field cannot exceed 10m tokens. Any content past 10m token would be truncated. Please refer to https://platform.openai.com/tokenizer for approximate token counting.

stringOptional
or
nullOptional
authorany ofOptionalExample: {"email":"[email protected]","name":"John Doe"}
or
nullOptional
urlany ofOptional
stringOptional
or
nullOptional
created_timeinteger · int64Optional

The created timestamp (in seconds since the Unix epoch) of the source content

Example: 1730243482
modified_timeinteger · int64Optional

The last modified timestamp (in seconds since the Unix epoch) of the source content

Example: 1730243482
Responses
200

Document successfully created or updated

application/json
put
/v1/documents

Get or List Documents

get

If document_id is provided as a query parameter, returns a single document object. Otherwise, returns a paginated list of documents.

Query parameters
connection_idintegerRequired

The unique identifier for your custom API integration connection.

Example: 123
document_idstringOptional

Unique document identifier. If provided, a single document is returned.

Example: doc_123
limitintegerOptional

Number of documents to return when listing

Default: 20Example: 20
offsetintegerOptional

Offset for pagination when listing

Default: 0Example: 0
Header parameters
authorizationstringRequired

Authorization header

Example: Bearer your_token_here
Responses
200

Returns a single document or a paginated list of documents.

application/json
Responseone of
or
get
/v1/documents

Last updated

Was this helpful?