Skip to main content

API v2 Overview Beta

Heffl API v2 is the current REST API for programmatic access to your workspace. System and custom object records are exposed at resource paths such as /contacts, /companies, /deals, /quotations, and /tasks with a consistent response envelope and structured errors.
API v2 is in beta. Endpoints, schemas, and behavior may change as we expand coverage. Prefer it for new integrations, but expect breaking changes until GA. Legacy API v1 remains fully supported for existing integrations.

Base URL

All endpoints are served over HTTPS.

What’s new in v2

Contacts

Companies

Deals

List active deals in a pipeline:
Create a deal by linking a client, pipeline, and stage:

Quotations

Create a quotation for a client with line items:
clientId is a contact or company ID (clt_ prefix) — use the id from GET /contacts or GET /companies. Optional contactId (clt_) sets the contact person when the client is a company. templateId is required (tpl_ prefix). List quotation templates with GET /document-templates?type=quotations — see Document templates. Pass dealId (dl_ prefix) to link the quote to a deal, and tags with tag_ IDs. Custom fields use cf_* keys — see Custom fields.

Document templates

Templates used for documents in Heffl — quotations, invoices, proforma invoices, purchase orders, and similar (not project or email templates). List by type to get the templateId for API creates.

Tasks

Link a task to a deal, lead, or project using entity and entityId:

Quick start

List contacts with your API key:
Response:
Update a contact (partial update — only send fields you want to change):
Response:
Delete a contact:
Response:
Deletion fails with 400 if the contact has linked deals, invoices, or quotations.

Authentication

Same as v1 — include your API key in the x-api-key header on every request. See Authentication.

Response shape

List endpoints return a paginated envelope:
Create, update, and delete return the resource (or delete result) directly — not wrapped in data:
Custom fields are returned as top-level cf_* keys on each resource (for example cf_industry), not in a customFields object. See Custom fields.

Next steps

  • Agent workflows — multi-step sequences (create deal, close deal, tasks)
  • ID prefixesclt_, dpl_, dps_, dl_, and other ID formats
  • Authentication — API keys and permissions
  • Errors — error codes and validation details
  • Pagination — cursor-based paging with pageSize
  • Listing & filters — search, sort, and structured filters
  • Custom fieldscf_* field conventions; discover keys via GET /custom-fields
  • Document templates — templates for quotations, invoices, proforma invoices, and other documents
  • Browse endpoint reference in the sidebar