Connector API
Creates a new document if the document_id doesn't exist, or updates an existing document if it does.
Authorization header
Bearer your_token_here
The unique identifier for your custom API integration connection. You can find this ID in your integration settings at https://web.dashworks.ai/integrations
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.
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.
{"email":"[email protected]","name":"John Doe"}
The created timestamp (in seconds since the Unix epoch) of the source content
1730243482
The last modified timestamp (in seconds since the Unix epoch) of the source content
1730243482
Document successfully created or updated
Bad Request - Invalid document id or missing required fields
Not found
Validation Error
Internal Server Error
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"
}
If document_id
is provided as a query parameter, returns a single document object. Otherwise, returns a paginated list of documents.
The unique identifier for your custom API integration connection.
123
Unique document identifier. If provided, a single document is returned.
doc_123
Number of documents to return when listing
20
Example: 20
Offset for pagination when listing
0
Example: 0
Authorization header
Bearer your_token_here
Returns a single document or a paginated list of documents.
Not found
Validation Error
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"
}
Last updated
Was this helpful?