Developers

Integrations

Beginner setup guide

Let AI help you draft invoices and quotations in SensIn

This page shows the simple path first: choose your AI tool, connect it to your workspace, ask for a draft, then review everything before you export or send.

You stay in control: AI helps with drafting, but you review and approve the final document details before export or sending.

Is this for you?

AI-curious business owner

You use AI chat tools but do not want to learn API terms just to draft an invoice.

Operator who wants faster admin

You want a repeatable flow to prepare drafts quickly while still checking details yourself.

Technical integrator

You can start here for flow context, then jump to advanced setup and full tool reference.

Choose your AI tool path

Pick the setup style that matches how you work today.

Advanced technical setup

Claude

Best if you already use Claude and want a guided setup with minimal custom configuration.

Effort
Low
Start
Create an integration token in Settings, then use the Claude MCP setup guide.

Use /integrations/mcp when you need exact config file examples for Claude Desktop.

Kilo

Best if you use Kilo for coding or operations and want SensIn tools available in the same workflow.

Effort
Low to medium
Start
Create a token, add the SensIn MCP server in Kilo settings, then test with a simple draft prompt.

Follow the same MCP endpoint flow; advanced connection details are in /integrations/mcp.

Cursor / Cline

Best for editor-based workflows where you want document drafting tools inside your coding environment.

Effort
Medium
Start
Create a token, add an MCP server entry in Cursor or Cline, then call workspace context first.

Use /integrations/mcp for exact JSON examples and transport-level setup notes.

Antigravity

Best for autonomous AI agent workflows requiring minimal supervision but deep access to SensIn capabilities.

Effort
Medium
Start
Create a token, edit the mcp_config.json for your Antigravity setup, then instruct the agent.

Use /integrations/mcp for exact Antigravity JSON config examples.

Custom or advanced client

Best if you need direct MCP/API integration with your own workflow orchestration.

Effort
Medium to high
Start
Use the advanced docs path first, then connect to the MCP endpoint or route-level APIs.

Start from /integrations/mcp to avoid missing required auth, scopes, and tool-call order.

Get started in 3 simple steps

1

Create your integration token

Go to Settings → Integrations, create a token, and copy it right away (it is shown once).

2

Connect your AI client

Choose Claude, Kilo, Cursor/Cline, Antigravity, or custom setup and paste your token in the client configuration.

3

Ask for a draft, then review

Use a clear prompt, review totals and dates in SensIn, then export/send only after final checks.

Beginner-friendly prompt examples

Start with short, specific instructions. Include customer name, services, amount, and due dates.

Invoice draft

Create a draft invoice for Northfield Events in MYR: logo redesign RM 1,500 and social media pack RM 900, due in 14 days.

Quotation draft

Draft a quotation for Brightline Studio for website copywriting, project total RM 3,200, valid for 30 days, include 50% upfront note.

Convert accepted quotation

Convert accepted quotation QUO-0042 into an invoice draft and keep all line items and totals for my final review.

Common mistakes and troubleshooting

Token is rejected (401 unauthorized)

Regenerate the token from Settings → Integrations, copy it fully, and make sure it starts with sint_.

Draft creation returns validation errors

Call workspace context first to get your company.id. Then provide customer details inline — you do not need a pre-saved customer. Include all required dates and a valid paymentTerms value.

Quotation cannot be converted

Only accepted quotations can convert. Move the quotation to accepted status first, then retry conversion.

Plan limit message appears

API integration usage is for paid workspaces. Upgrade plan in Billing to continue the workflow.

Assistant output looks correct but you are unsure

Pause and review in SensIn. Confirm totals, due dates, customer details, and notes before final export/sending.

Developer quickstart (direct REST API)

Use these steps if you are calling the API directly from a script, custom agent, or HTTP client rather than through an MCP tool interface.

Before you start — two prerequisites

  1. Company profile must exist. Since you need to log in to generate a token anyway, use that session to complete your company profile in Settings → Company first. The company.id is server-assigned and read from the database — it cannot be generated client-side.
  2. Paid plan required (Pro or Max). Agent draft creation is gated to paid workspaces. Calls from a free plan will return 403 plan_limit.
1

Get your integration token

Generate a token from Settings → Integrations. Tokens start with sint_ and are shown once — copy and store them securely.

Pass the token in every request using the Authorization header:

Authorization: Bearer sint_your_token_here
2

Fetch your workspace context

Call GET /api/agent/context to read your company profile, settings, and up to 5 recent customers. The company.id from this response is required when creating documents.

Existing customers: The response includes your last 5 recently-updated customers in customerSummary.recentCustomers. To get your full list of customers, use the GET /api/customers endpoint.

New / one-off customers: Create or update a customer by calling the PUT /api/customers endpoint with the customer details. The server will return the generated UUID.

Request

curl https://sensin.sensiantechnology.com/api/agent/context \
  -H "Authorization: Bearer sint_your_token_here"

Response (200 OK)

{
  "ok": true,
  "contractVersion": "2026-04-26",
  "data": {
    "workspace": { "id": "...", "name": "Your Workspace", "plan": "pro" },
    "companyProfile": {
      "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",  // ← use this as company.id
      "name": "Acme Consulting Sdn Bhd",
      "address": "10 Jalan Contoh, PJ",
      "city": "Petaling Jaya",
      "state": "Selangor",
      "postalCode": "47810",
      "country": "Malaysia",
      "email": "hello@acmeconsulting.example",
      "phone": "+60100000000"
    },
    "customerSummary": {
      "totalCustomers": 12,
      "recentCustomers": [
        {
          "id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",  // ← reuse this if billing existing customer
          "name": "Contoh Client",
          "companyName": "Contoh Sdn Bhd",
          "email": "accounts@contoh.example",
          "phone": "+60188880000",
          "updatedAt": "2026-04-30T10:00:00.000Z"
        }
      ]
    },
    "billingEntitlementSummary": { "plan": "pro", "canCreateAgentDrafts": true }
  }
}
3

Create an invoice draft

Use the company.id from Step 2. For the customer, use an id from recentCustomers, or use the GET /api/customers or PUT /api/customers endpoints to find or create one.

How to generate a UUID v4 for Line Items

Node.js / Deno: crypto.randomUUID()

Python: import uuid; str(uuid.uuid4())

Shell (macOS/Linux): uuidgen | tr '[:upper:]' '[:lower:]'

Required for: items[].id. Must be a valid UUID v4 format.

paymentTerms must be one of: due-on-receipt · net-15 · net-30 · net-60 · custom

Request

curl -X POST https://sensin.sensiantechnology.com/api/invoices \
  -H "Authorization: Bearer sint_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "draft",
    "company": {
      "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",  // from context
      "name": "Acme Consulting Sdn Bhd",
      "address": "10 Jalan Contoh, PJ",
      "city": "Petaling Jaya", "state": "Selangor",
      "postalCode": "47810", "country": "Malaysia",
      "phone": "+60100000000", "email": "hello@acmeconsulting.example"
    },
    "customer": {
      "id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",   // from /api/customers
      "name": "Northfield Events",
      "companyName": "",
      "address": "5 Jalan Pelanggan, Bangsar South",
      "city": "Kuala Lumpur", "state": "WP",
      "postalCode": "59200", "country": "Malaysia",
      "email": "accounts@northfieldevents.example",
      "phone": "+60199990000",
      "createdAt": "2026-01-01T00:00:00+00:00",
      "updatedAt": "2026-01-01T00:00:00+00:00"
    },
    "items": [
      {
        "id": "<any-valid-uuid-v4>",
        "description": "Logo Redesign",
        "details": "",
        "quantity": 1,
        "unitPrice": 1500,
        "total": 1500
      }
    ],
    "currency": "MYR",
    "invoiceDate": "2026-05-03",
    "dueDate": "2026-05-17",
    "paymentTerms": "net-15",
    "taxEnabled": false, "taxRate": 0,
    "discountEnabled": false, "discountType": "percentage", "discountValue": 0,
    "shippingEnabled": false, "shippingAmount": 0
  }'

Response (201 Created)

{
  "id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
  "number": "INV-0001",
  "status": "draft"
}

Error categories

HTTPcategoryMeaning
401unauthorizedMissing or invalid Bearer token.
400validation_errorPayload failed schema validation. Check all required fields.
403plan_limitAgent workflow is Pro-only. Upgrade your plan.
409conflictDuplicate or conflicting resource (e.g. converted quotation).
500unknown_errorUnexpected server error. Try again or contact support.

For the full endpoint reference and MCP tool contracts, use the advanced docs.

Advanced path

Need full technical depth?

Use the advanced page for MCP configuration, REST endpoint mapping, tool contracts, transport details, and deeper technical troubleshooting.

Open advanced docs