Back to Documentation

API Reference

Technical API documentation for developers who want to integrate tasket with their applications and automate workflows programmatically.

Authentication

To use the tasket API, you'll need to authenticate your requests using an API key. Here's how to get started:

Getting Your API Key

  1. Go to SettingsAPI Keys (or Security section)
  2. Click "Generate API Key" or "Create New Key"
  3. Give your key a descriptive name (e.g., "Production App" or "Zapier Integration")
  4. Copy the API key immediately - you won't be able to see it again
  5. Store it securely in your application's environment variables

Using Your API Key

Include your API key in the Authorization header of every request:

Authorization: Bearer YOUR_API_KEY

Security Best Practices: Never expose your API keys in client-side code, public repositories, or share them in screenshots. Use environment variables or secure key management systems. Rotate keys regularly and revoke keys you no longer need.

Base URL

All API requests should be made to the tasket API base URL:

https://api.tasket.co/v1

Note: Replace the base URL with your actual API endpoint. The version (v1) may change as the API evolves, so check the documentation for the latest version.

Endpoints

POST/documents

Upload a new document for processing. The document will be automatically processed and data will be extracted.

curl -X POST https://api.tasket.co/v1/documents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf"

Returns the document ID and processing status. You can poll for completion or use webhooks to be notified when processing is done.

GET/documents

List all documents with optional filtering by status, type, date range, and pagination.

curl https://api.tasket.co/v1/documents?status=done&limit=10 \
  -H "Authorization: Bearer YOUR_API_KEY"

Returns a paginated list of documents with metadata. Use query parameters to filter results.

GET/documents/:id

Get detailed information about a specific document including all extracted data, processing status, and metadata.

Returns complete document details including extracted fields, classification, confidence scores, and links to source files.

POST/search

Perform semantic search across all your documents using natural language queries.

curl -X POST https://api.tasket.co/v1/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "invoices over $1000"}'

Returns relevant documents ranked by relevance. Works just like the search feature in the web interface.

POST/company-ai/chat

Ask questions to Company AI programmatically and get answers with source citations.

Send a message and optional conversation history. Returns AI-generated answer with source document citations, just like the web interface.

Webhooks

Configure webhooks to receive real-time notifications when events occur in tasket. This allows your applications to react automatically to document processing, task creation, and other events.

Setting Up Webhooks

  1. Go to Settings → Webhooks (or API section)
  2. Click "Add Webhook" or "Create Webhook"
  3. Enter your webhook URL (the endpoint that will receive notifications)
  4. Select which events you want to subscribe to
  5. Save the webhook - tasket will send POST requests to your URL when events occur

For detailed webhook setup instructions and available events, see theIntegrations guide.

SDKs & Libraries

Official SDKs and libraries make it easier to integrate tasket with your applications:

JavaScript/TypeScript

npm install @tasket/sdk

SDKs provide helper functions and type definitions to simplify API integration

Python

npm install @tasket/sdk

SDKs provide helper functions and type definitions to simplify API integration

Ruby

npm install @tasket/sdk

SDKs provide helper functions and type definitions to simplify API integration

PHP

npm install @tasket/sdk

SDKs provide helper functions and type definitions to simplify API integration

Go

npm install @tasket/sdk

SDKs provide helper functions and type definitions to simplify API integration

Java

npm install @tasket/sdk

SDKs provide helper functions and type definitions to simplify API integration

Note: SDKs are optional but recommended. They handle authentication, request formatting, and response parsing automatically. You can also use the REST API directly with any HTTP client.