Skip to content

CRM reference

Reference for all CRM endpoints of API v1. All paths start with https://<your-instance>/api/v1. Every request carries Authorization: Bearer hek_…. Formats, paging, deletion lists and error codes are on Conventions.

Reading needs read permission on the CRM module, every write needs write permission (otherwise 403 with no_write_permission). Lists respond with {"data": [...], "next_cursor": ...}. The examples show one page with one entry.

Further CRM error codes: 409 with company_archived (change to an archived company) and 409 with tag_name_taken (tag name already in use).

Companies

List companies

GET /api/v1/crm/companies

Lists companies. Archived companies stay in the list when you omit archived.

Parameters / fields: archived (true archived only, false active only), tag_id, limit, cursor, updated_since.

Terminal window
curl "https://<your-instance>/api/v1/crm/companies?tag_id=e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04&limit=50" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"name": "Muster AG",
"email": "[email protected]",
"invoicing_email": "[email protected]",
"phone": "+41 44 000 00 00",
"website": "https://muster.example",
"industry": "Gastronomie",
"notes": null,
"email_language": "de",
"custom_fields": {
"Kundennummer": "K-1042"
},
"addresses": [
{
"id": "c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03",
"type": "billing",
"addition": null,
"street": "Bahnhofstrasse 1",
"street2": null,
"zip": "8001",
"city": "Zürich",
"country": "CH"
}
],
"tag_ids": [
"e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04"
],
"archived_at": null,
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}
],
"next_cursor": null
}

Create a company

POST /api/v1/crm/companies

Creates a company. name is required.

Parameters / fields: name, email, invoicing_email, phone, website, industry, notes, email_language (de or en), custom_fields.

Terminal window
curl -X POST "https://<your-instance>/api/v1/crm/companies" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6b1f2c3d-…" \
-d '{"name": "Muster AG", "email": "[email protected]", "industry": "Gastronomie", "email_language": "de"}'

Response 201 Created:

{
"id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"name": "Muster AG",
"email": "[email protected]",
"invoicing_email": "[email protected]",
"phone": "+41 44 000 00 00",
"website": "https://muster.example",
"industry": "Gastronomie",
"notes": null,
"email_language": "de",
"custom_fields": {
"Kundennummer": "K-1042"
},
"addresses": [
{
"id": "c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03",
"type": "billing",
"addition": null,
"street": "Bahnhofstrasse 1",
"street2": null,
"zip": "8001",
"city": "Zürich",
"country": "CH"
}
],
"tag_ids": [
"e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04"
],
"archived_at": null,
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

Get a company

GET /api/v1/crm/companies/{company_id}

Returns a company with its addresses and tag IDs.

Terminal window
curl "https://<your-instance>/api/v1/crm/companies/3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"name": "Muster AG",
"email": "[email protected]",
"invoicing_email": "[email protected]",
"phone": "+41 44 000 00 00",
"website": "https://muster.example",
"industry": "Gastronomie",
"notes": null,
"email_language": "de",
"custom_fields": {
"Kundennummer": "K-1042"
},
"addresses": [
{
"id": "c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03",
"type": "billing",
"addition": null,
"street": "Bahnhofstrasse 1",
"street2": null,
"zip": "8001",
"city": "Zürich",
"country": "CH"
}
],
"tag_ids": [
"e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04"
],
"archived_at": null,
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

Update a company

PATCH /api/v1/crm/companies/{company_id}

Changes the fields you send. On an archived company the API answers 409 with company_archived.

Parameters / fields: The same fields as on create, all optional.

Terminal window
curl -X PATCH "https://<your-instance>/api/v1/crm/companies/3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-d '{"phone": "+41 44 111 11 11"}'

Response 200 OK:

{
"id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"name": "Muster AG",
"email": "[email protected]",
"invoicing_email": "[email protected]",
"phone": "+41 44 111 11 11",
"website": "https://muster.example",
"industry": "Gastronomie",
"notes": null,
"email_language": "de",
"custom_fields": {
"Kundennummer": "K-1042"
},
"addresses": [
{
"id": "c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03",
"type": "billing",
"addition": null,
"street": "Bahnhofstrasse 1",
"street2": null,
"zip": "8001",
"city": "Zürich",
"country": "CH"
}
],
"tag_ids": [
"e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04"
],
"archived_at": null,
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

Archive a company

DELETE /api/v1/crm/companies/{company_id}

Archives the company (it is not deleted). It stays in the list with archived_at set.

Terminal window
curl -X DELETE "https://<your-instance>/api/v1/crm/companies/3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01" \
-H "Authorization: Bearer hek_…"

Response: 204 No Content, no body.

Add an address to a company

POST /api/v1/crm/companies/{company_id}/addresses

Adds an address. 409 with company_archived if the company is archived.

Parameters / fields: type (billing, shipping, other; default billing), street, street2, addition, zip, city, country.

Terminal window
curl -X POST "https://<your-instance>/api/v1/crm/companies/3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01/addresses" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6b1f2c3d-…" \
-d '{"type": "billing", "street": "Bahnhofstrasse 1", "zip": "8001", "city": "Zürich", "country": "CH"}'

Response 201 Created:

{
"id": "c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03",
"type": "billing",
"addition": null,
"street": "Bahnhofstrasse 1",
"street2": null,
"zip": "8001",
"city": "Zürich",
"country": "CH"
}

Update a company address

PATCH /api/v1/crm/companies/{company_id}/addresses/{address_id}

Changes the fields you send.

Parameters / fields: As on create, all optional.

Terminal window
curl -X PATCH "https://<your-instance>/api/v1/crm/companies/3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01/addresses/c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-d '{"city": "Winterthur", "zip": "8400"}'

Response 200 OK:

{
"id": "c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03",
"type": "billing",
"addition": null,
"street": "Bahnhofstrasse 1",
"street2": null,
"zip": "8400",
"city": "Winterthur",
"country": "CH"
}

Delete a company address

DELETE /api/v1/crm/companies/{company_id}/addresses/{address_id}

Deletes the address.

Terminal window
curl -X DELETE "https://<your-instance>/api/v1/crm/companies/3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01/addresses/c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03" \
-H "Authorization: Bearer hek_…"

Response: 204 No Content, no body.

Assign a tag to a company

POST /api/v1/crm/companies/{company_id}/tags

Assigns a tag to the company.

Parameters / fields: tag_id.

Terminal window
curl -X POST "https://<your-instance>/api/v1/crm/companies/3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01/tags" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6b1f2c3d-…" \
-d '{"tag_id": "e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04"}'

Response: 204 No Content, no body.

Remove a tag from a company

DELETE /api/v1/crm/companies/{company_id}/tags/{tag_id}

Removes the assignment. The tag itself remains.

Terminal window
curl -X DELETE "https://<your-instance>/api/v1/crm/companies/3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01/tags/e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04" \
-H "Authorization: Bearer hek_…"

Response: 204 No Content, no body.

Contacts

List contacts

GET /api/v1/crm/contacts

Lists contacts.

Parameters / fields: company_id, tag_id, segment_id, email, limit, cursor, updated_since.

Terminal window
curl "https://<your-instance>/api/v1/crm/contacts?company_id=3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302",
"company_id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"first_name": "Anna",
"last_name": "Beispiel",
"email": "[email protected]",
"phone": null,
"position": "Einkauf",
"notes": null,
"custom_fields": {},
"addresses": [],
"tag_ids": [],
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}
],
"next_cursor": null
}

Create a contact

POST /api/v1/crm/contacts

Creates a contact, optionally under a company.

Parameters / fields: first_name, last_name, email, phone, position, notes, company_id, custom_fields.

Terminal window
curl -X POST "https://<your-instance>/api/v1/crm/contacts" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6b1f2c3d-…" \
-d '{"company_id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01", "first_name": "Anna", "last_name": "Beispiel", "email": "[email protected]", "position": "Einkauf"}'

Response 201 Created:

{
"id": "7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302",
"company_id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"first_name": "Anna",
"last_name": "Beispiel",
"email": "[email protected]",
"phone": null,
"position": "Einkauf",
"notes": null,
"custom_fields": {},
"addresses": [],
"tag_ids": [],
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

List deleted contacts

GET /api/v1/crm/contacts/deleted

Deletion list: contacts deleted since since. Kept for 90 days.

Parameters / fields: since (required).

Terminal window
curl "https://<your-instance>/api/v1/crm/contacts/deleted?since=2026-11-01T00:00:00%2B00:00" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302",
"deleted_at": "2026-11-04T10:00:00+00:00"
}
]
}

Get a contact

GET /api/v1/crm/contacts/{contact_id}

Returns a contact with its addresses and tag IDs.

Terminal window
curl "https://<your-instance>/api/v1/crm/contacts/7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"id": "7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302",
"company_id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"first_name": "Anna",
"last_name": "Beispiel",
"email": "[email protected]",
"phone": null,
"position": "Einkauf",
"notes": null,
"custom_fields": {},
"addresses": [],
"tag_ids": [],
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

Update a contact

PATCH /api/v1/crm/contacts/{contact_id}

Changes the fields you send.

Parameters / fields: The same fields as on create, all optional.

Terminal window
curl -X PATCH "https://<your-instance>/api/v1/crm/contacts/7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-d '{"position": "Geschäftsleitung"}'

Response 200 OK:

{
"id": "7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302",
"company_id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"first_name": "Anna",
"last_name": "Beispiel",
"email": "[email protected]",
"phone": null,
"position": "Geschäftsleitung",
"notes": null,
"custom_fields": {},
"addresses": [],
"tag_ids": [],
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

Delete a contact

DELETE /api/v1/crm/contacts/{contact_id}

Deletes the contact. It then appears in the deletion list.

Terminal window
curl -X DELETE "https://<your-instance>/api/v1/crm/contacts/7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302" \
-H "Authorization: Bearer hek_…"

Response: 204 No Content, no body.

Add an address to a contact

POST /api/v1/crm/contacts/{contact_id}/addresses

Adds an address.

Parameters / fields: As for company addresses.

Terminal window
curl -X POST "https://<your-instance>/api/v1/crm/contacts/7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302/addresses" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6b1f2c3d-…" \
-d '{"type": "shipping", "street": "Hauptstrasse 5", "zip": "3000", "city": "Bern", "country": "CH"}'

Response 201 Created:

{
"id": "c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03",
"type": "shipping",
"addition": null,
"street": "Hauptstrasse 5",
"street2": null,
"zip": "3000",
"city": "Bern",
"country": "CH"
}

Update a contact address

PATCH /api/v1/crm/contacts/{contact_id}/addresses/{address_id}

Changes the fields you send.

Parameters / fields: As on create, all optional.

Terminal window
curl -X PATCH "https://<your-instance>/api/v1/crm/contacts/7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302/addresses/c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-d '{"zip": "3001"}'

Response 200 OK:

{
"id": "c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03",
"type": "billing",
"addition": null,
"street": "Bahnhofstrasse 1",
"street2": null,
"zip": "3001",
"city": "Zürich",
"country": "CH"
}

Delete a contact address

DELETE /api/v1/crm/contacts/{contact_id}/addresses/{address_id}

Deletes the address.

Terminal window
curl -X DELETE "https://<your-instance>/api/v1/crm/contacts/7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302/addresses/c5e8a0b2-91d4-4a37-8f20-6e7b3d1a9c03" \
-H "Authorization: Bearer hek_…"

Response: 204 No Content, no body.

Assign a tag to a contact

POST /api/v1/crm/contacts/{contact_id}/tags

Assigns a tag to the contact.

Parameters / fields: tag_id.

Terminal window
curl -X POST "https://<your-instance>/api/v1/crm/contacts/7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302/tags" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6b1f2c3d-…" \
-d '{"tag_id": "e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04"}'

Response: 204 No Content, no body.

Remove a tag from a contact

DELETE /api/v1/crm/contacts/{contact_id}/tags/{tag_id}

Removes the assignment.

Terminal window
curl -X DELETE "https://<your-instance>/api/v1/crm/contacts/7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302/tags/e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04" \
-H "Authorization: Bearer hek_…"

Response: 204 No Content, no body.

Opportunities and activities

List opportunities

GET /api/v1/crm/opportunities

Lists opportunities.

Parameters / fields: company_id, contact_id, stage (lead, qualified, proposal_sent, negotiation, won, lost), limit, cursor, updated_since.

An unknown company_id or contact_id gives 404 with not_found.

Terminal window
curl "https://<your-instance>/api/v1/crm/opportunities?stage=proposal_sent" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05",
"company_id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"contact_id": "7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302",
"title": "Jahresvertrag 2027",
"stage": "proposal_sent",
"value": "12500.00",
"currency": "CHF",
"probability": 60,
"expected_close_date": "2027-01-31",
"description": null,
"custom_fields": {},
"last_activity_at": "2026-11-04T10:00:00+00:00",
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}
],
"next_cursor": null
}

Create an opportunity

POST /api/v1/crm/opportunities

Creates an opportunity. Without currency, the default currency from /crm/settings applies.

Parameters / fields: company_id and title (required), contact_id, stage (default lead), value (string, for example "12500.00"), currency, probability (integer), expected_close_date, description, custom_fields.

Terminal window
curl -X POST "https://<your-instance>/api/v1/crm/opportunities" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6b1f2c3d-…" \
-d '{"company_id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01", "contact_id": "7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302", "title": "Jahresvertrag 2027", "stage": "lead", "value": "12500.00", "expected_close_date": "2027-01-31"}'

Response 201 Created:

{
"id": "91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05",
"company_id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"contact_id": "7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302",
"title": "Jahresvertrag 2027",
"stage": "lead",
"value": "12500.00",
"currency": "CHF",
"probability": null,
"expected_close_date": "2027-01-31",
"description": null,
"custom_fields": {},
"last_activity_at": "2026-11-04T10:00:00+00:00",
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

List deleted opportunities

GET /api/v1/crm/opportunities/deleted

Deletion list: opportunities deleted since since. Kept for 90 days.

Parameters / fields: since (required).

Terminal window
curl "https://<your-instance>/api/v1/crm/opportunities/deleted?since=2026-11-01T00:00:00%2B00:00" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05",
"deleted_at": "2026-11-04T10:00:00+00:00"
}
]
}

Get an opportunity

GET /api/v1/crm/opportunities/{opportunity_id}

Returns an opportunity.

Terminal window
curl "https://<your-instance>/api/v1/crm/opportunities/91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"id": "91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05",
"company_id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"contact_id": "7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302",
"title": "Jahresvertrag 2027",
"stage": "proposal_sent",
"value": "12500.00",
"currency": "CHF",
"probability": 60,
"expected_close_date": "2027-01-31",
"description": null,
"custom_fields": {},
"last_activity_at": "2026-11-04T10:00:00+00:00",
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

Update an opportunity (including stage moves)

PATCH /api/v1/crm/opportunities/{opportunity_id}

Changes the fields you send. With stage you move the opportunity in the pipeline.

Parameters / fields: The same fields as on create, all optional.

Terminal window
curl -X PATCH "https://<your-instance>/api/v1/crm/opportunities/91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-d '{"stage": "won"}'

Response 200 OK:

{
"id": "91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05",
"company_id": "3f2b8c1e-5a7d-4e90-8b11-0c6d2a9f4e01",
"contact_id": "7a1d9e44-2c3b-4f58-9a66-b1e0d5c8f302",
"title": "Jahresvertrag 2027",
"stage": "won",
"value": "12500.00",
"currency": "CHF",
"probability": 60,
"expected_close_date": "2027-01-31",
"description": null,
"custom_fields": {},
"last_activity_at": "2026-11-04T10:00:00+00:00",
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

List the activities of an opportunity

GET /api/v1/crm/opportunities/{opportunity_id}/activities

Lists the activities (call, email, meeting, note).

Parameters / fields: limit, cursor, updated_since.

Terminal window
curl "https://<your-instance>/api/v1/crm/opportunities/91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05/activities" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "d4f6a8c0-2e4b-4d6f-8a1c-5e7b9d1f3a08",
"opportunity_id": "91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05",
"type": "call",
"content": "Offerte besprochen",
"created_by": "Anna Admin",
"created_at": "2026-11-04T10:00:00+00:00"
}
],
"next_cursor": null
}

Add an activity to an opportunity

POST /api/v1/crm/opportunities/{opportunity_id}/activities

Adds an activity.

Parameters / fields: type (call, email, meeting, note; required), content.

Terminal window
curl -X POST "https://<your-instance>/api/v1/crm/opportunities/91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05/activities" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6b1f2c3d-…" \
-d '{"type": "call", "content": "Offerte besprochen"}'

Response 201 Created:

{
"id": "d4f6a8c0-2e4b-4d6f-8a1c-5e7b9d1f3a08",
"opportunity_id": "91c3e5a7-b9d1-4f3a-8c5e-7a9b1d3f5e05",
"type": "call",
"content": "Offerte besprochen",
"created_by": "Anna Admin",
"created_at": "2026-11-04T10:00:00+00:00"
}

Tags and segments

List tags

GET /api/v1/crm/tags

Lists tags. source is crm or shopify.

Parameters / fields: limit, cursor, updated_since.

Terminal window
curl "https://<your-instance>/api/v1/crm/tags" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04",
"name": "VIP",
"color": "#f59e0b",
"source": "crm",
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}
],
"next_cursor": null
}

Create a tag

POST /api/v1/crm/tags

Creates a tag. If the name exists already, the API answers 409 with tag_name_taken.

Parameters / fields: name (required), color.

Terminal window
curl -X POST "https://<your-instance>/api/v1/crm/tags" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6b1f2c3d-…" \
-d '{"name": "VIP", "color": "#f59e0b"}'

Response 201 Created:

{
"id": "e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04",
"name": "VIP",
"color": "#f59e0b",
"source": "crm",
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

List deleted tags

GET /api/v1/crm/tags/deleted

Deletion list: tags deleted since since. Kept for 90 days.

Parameters / fields: since (required).

Terminal window
curl "https://<your-instance>/api/v1/crm/tags/deleted?since=2026-11-01T00:00:00%2B00:00" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04",
"deleted_at": "2026-11-04T10:00:00+00:00"
}
]
}

Rename or recolor a tag

PATCH /api/v1/crm/tags/{tag_id}

Changes name or colour. Tags that came from Shopify can be renamed too; a later Shopify sync may recreate the old name. A name already taken gives 409 with tag_name_taken.

Parameters / fields: name, color.

Terminal window
curl -X PATCH "https://<your-instance>/api/v1/crm/tags/e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04" \
-H "Authorization: Bearer hek_…" \
-H "Content-Type: application/json" \
-d '{"name": "Stammkunde"}'

Response 200 OK:

{
"id": "e2b4f6a8-0c1d-4e3f-a5b7-9d8c7e6f5a04",
"name": "Stammkunde",
"color": "#f59e0b",
"source": "crm",
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

List segments

GET /api/v1/crm/segments

Lists segments (read only). type is shopify or crm_native.

Parameters / fields: limit, cursor, updated_since.

Terminal window
curl "https://<your-instance>/api/v1/crm/segments" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d06",
"name": "Newsletter",
"type": "crm_native",
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}
],
"next_cursor": null
}

List deleted segments

GET /api/v1/crm/segments/deleted

Deletion list: segments deleted since since. Kept for 90 days.

Parameters / fields: since (required).

Terminal window
curl "https://<your-instance>/api/v1/crm/segments/deleted?since=2026-11-01T00:00:00%2B00:00" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d06",
"deleted_at": "2026-11-04T10:00:00+00:00"
}
]
}

Get a segment

GET /api/v1/crm/segments/{segment_id}

Returns a segment.

Terminal window
curl "https://<your-instance>/api/v1/crm/segments/5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d06" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"id": "5d7f9b1c-3e5a-4c7e-9a1b-3c5e7a9b1d06",
"name": "Newsletter",
"type": "crm_native",
"created_at": "2026-11-04T10:00:00+00:00",
"updated_at": "2026-11-04T10:00:00+00:00"
}

Reference data and settings

List custom field definitions

GET /api/v1/crm/custom-fields

Lists the field definitions for companies, contacts and opportunities. The values are in custom_fields of the resource.

Parameters / fields: None.

Terminal window
curl "https://<your-instance>/api/v1/crm/custom-fields" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "a1b2c3d4-0000-4000-8000-000000000009",
"entity_type": "company",
"name": "Kundennummer",
"field_type": "text",
"options": null
}
]
}

List industry values

GET /api/v1/crm/industry-values

Lists the industries available for industry.

Parameters / fields: None.

Terminal window
curl "https://<your-instance>/api/v1/crm/industry-values" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
{
"id": "a1b2c3d4-0000-4000-8000-000000000010",
"name": "Gastronomie"
}
]
}

List opportunity stages

GET /api/v1/crm/opportunity-stages

Lists the stages of the sales pipeline.

Parameters / fields: None.

Terminal window
curl "https://<your-instance>/api/v1/crm/opportunity-stages" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"data": [
"lead",
"qualified",
"proposal_sent",
"negotiation",
"won",
"lost"
]
}

Read CRM settings

GET /api/v1/crm/settings

Returns the default currency of the CRM.

Parameters / fields: None.

Terminal window
curl "https://<your-instance>/api/v1/crm/settings" \
-H "Authorization: Bearer hek_…"

Response 200 OK:

{
"default_currency": "CHF"
}

What’s next