Dashworks
WebsiteBook a DemoSign UpLogin
  • Migration Guide
  • Get Started
    • Introduction
    • Quick Start
  • Knowledge
    • Connect Apps
    • Other Sources
  • Use Cases
    • Engineering
    • Customer Support
    • Sales
    • Marketing
    • Product Management
    • Human Resources
    • Talent
    • Legal & Compliance
  • Bots
    • Custom Bots
    • Setup Bots
    • Managed Bots
  • Surfaces
    • Slackbot
    • Chrome Extension
  • Optimize
    • Improve Answers
    • Prompting
    • Instructions
    • Feedback
    • AI Model
  • Admin
    • Launch Guide
    • Announce Dashworks
    • SSO
    • SCIM
    • Analytics
    • Verified Domains
    • Schedule Training
    • Homepage
    • Chrome Extension Setup
  • API
    • Overview
    • Authentication
    • Rate Limits
    • API Reference
      • Answer API
      • Connector API
    • Zapier Integration
    • Examples
    • Pricing
  • FAQs
    • Search Permissions
    • Search Modes
    • User Roles
    • Org vs Individual
    • Real-Time vs Full Sync
    • Workflows
    • Roadmap
    • Referrals
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. API Reference

Connector API

PreviousAnswer APINextZapier Integration

Last updated 2 months ago

Was this helpful?

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
404
Not found
422
Validation Error
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"
}

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":"author@example.com","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
400
Bad Request - Invalid document id or missing required fields
404
Not found
422
Validation Error
application/json
500
Internal Server Error
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": "author@example.com",
    "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
404
Not found
422
Validation Error
application/json
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": "author@example.com",
    "name": "John Doe"
  },
  "url": "https://example.com/doc_123",
  "created_time": 1730243482,
  "modified_time": 1730243482,
  "title": "Sample Document"
}
  • PUTCreate or Update Documents
  • GETGet or List Documents
  • DELETEDelete Documents