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
PUT /v1/documents HTTP/1.1
Host: api.dashworks.ai
authorization: Bearer your_token_here
Content-Type: application/json
Accept: */*
Content-Length: 263

{
  "connection_id": 123,
  "document_id": "doc_456",
  "title": "Updated Document Title",
  "content": "Updated document content.",
  "author": {
    "email": "[email protected]",
    "name": "John Doe"
  },
  "url": "https://example.com/doc_456",
  "created_time": 1730243482,
  "modified_time": 1730243482
}
{
  "document_id": "doc_456"
}

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
GET /v1/documents HTTP/1.1
Host: api.dashworks.ai
authorization: Bearer your_token_here
Accept: */*
{
  "id": "doc_123",
  "content": "This is a sample document content.",
  "author": {
    "email": "[email protected]",
    "name": "John Doe"
  },
  "url": "https://example.com/doc_123",
  "created_time": 1730243482,
  "modified_time": 1730243482,
  "title": "Sample Document"
}

Delete Documents

delete
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

The unique identifier for the document that was returned by the Dashworks API when it was added via the POST /v1/documents endpoint.

Responses
200
Successful Response
application/json
delete
DELETE /v1/documents HTTP/1.1
Host: api.dashworks.ai
authorization: Bearer your_token_here
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "connection_id": 1,
  "document_id": "text"
}
{
  "message": "Document deleted successfully"
}

Last updated

Was this helpful?