Quick start
1. An administrator creates a key under Settings > API in the app. The key is shown once.
2. Send it with every request in the Authorization header: Authorization: Bearer kf_live_...
3. Requests and responses are JSON (Content-Type: application/json). Times are ISO 8601 in UTC, phone numbers E.164.
The OpenAPI 3.1 file describes every endpoint for code generators and tools such as Postman or Bruno.
Authentication
API keys start with kf_live_ and carry 256 random bits. Kontaktfix stores only a fingerprint (SHA-256), so a lost key cannot be shown again: revoke it and create a new one. The fixed prefix lets secret scanners such as GitHub's recognize a key that was committed by mistake.
Send the key only in the header, never in the address, and only from servers: a key in browser or app code is public. Keep it in a secret store, give every system its own key and let keys expire (30, 90 or 365 days). Every change made with a key appears in the activity log as API: <name of the key>.
A missing, wrong, revoked or expired key gets 401 with invalid_api_key or api_key_expired.
Access
Read keys read contacts, lists and the delivery status. Read and write keys also create, change and delete.
A key can be limited to lists. It then works like a list editor in the app: it sees only these lists and their contacts, creates contacts only in them, and cannot delete contacts or create, change or delete lists (403 all_lists_required). Anything outside its lists answers 404, as if it did not exist.
Employees from Microsoft 365 directory lists and contacts from file lists are read-only (readOnly: true, changes give 409). Every key sees only its own organization.
Errors
Errors have a stable code in error, and for validation errors the fields in issues: { "error": "validation_failed", "issues": [{ "path": "email1", "message": "invalid_email" }] }
400 invalid input or unknown field, 401 key, 402 subscription ended, 403 scope or list access, 404 not found or not visible, 409 read-only contact or list name taken, 429 rate limit, 503 maintenance (with Retry-After).
Limits and paging
Each key may send 600 requests per minute. Above that the answer is 429 with Retry-After in seconds.
Lists of contacts come page by page: page from 1 and pageSize up to 200. The answer has items, total, page and pageSize. Contacts are sorted by name.
Changes reach the mailboxes through the normal delivery, usually within a few minutes. GET /sync/status shows its progress.
Endpoints
All paths are relative to the base URL. https://app.kontaktfix.ch/api/v1
Contacts
get/contacts
List contacts
Contacts sorted by name, page by page. Keys limited to lists only see contacts in those lists.
Scope: read
Parameters
| qquery | string | Search in name, company, job title, email, notes and phone numbers. |
|---|---|---|
| listIdquery | uuid | Only contacts in this list. Without it, employees from Microsoft 365 are left out. |
| pagequery | integer | Page, from 1. |
| pageSizequery | integer | Items per page, 1 to 200. |
Example
curl "https://app.kontaktfix.ch/api/v1/contacts?q=muster&pageSize=50" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY"Response
200 OK, application/json
{
"items": [
{
"id": "4b1f6a3e-2c1d-4a8e-9f5b-0c7d2e9a1b34",
"displayName": "Anna Meier",
"title": null,
"givenName": "Anna",
"middleName": null,
"surname": "Meier",
"nickName": null,
"companyName": "Muster Haustechnik AG",
"department": "Service",
"jobTitle": "Disponentin",
"profession": null,
"officeLocation": "Zürich",
"manager": null,
"assistantName": null,
"imAddress": null,
"website": "https://muster-haustechnik.ch",
"notes": "Pikett: 24 h",
"email1": "[email protected]",
"email2": null,
"email3": null,
"businessPhone1": "+41441234567",
"businessPhone2": null,
"mobilePhone": "+41791234567",
"homePhone1": null,
"homePhone2": null,
"businessAddress": {
"street": "Bahnhofstrasse 1",
"postalCode": "8001",
"city": "Zürich",
"state": "ZH",
"country": "Schweiz"
},
"homeAddress": null,
"otherAddress": null,
"listIds": [
"9e2c4d1a-7b3f-4e8a-a1c5-3d6f8b0e2a71"
],
"source": "manual",
"readOnly": false,
"hasPhoto": false,
"createdAt": "2026-10-20T08:15:00.000Z",
"updatedAt": "2026-10-24T13:42:10.000Z"
}
],
"total": 1,
"page": 1,
"pageSize": 50
}get/contacts/{id}
Get a contact
One contact with all fields.
Scope: read
Parameters
| idpath, required | uuid |
|---|
Example
curl "https://app.kontaktfix.ch/api/v1/contacts/<id>" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY"Response
200 OK, application/json
{
"id": "4b1f6a3e-2c1d-4a8e-9f5b-0c7d2e9a1b34",
"displayName": "Anna Meier",
"title": null,
"givenName": "Anna",
"middleName": null,
"surname": "Meier",
"nickName": null,
"companyName": "Muster Haustechnik AG",
"department": "Service",
"jobTitle": "Disponentin",
"profession": null,
"officeLocation": "Zürich",
"manager": null,
"assistantName": null,
"imAddress": null,
"website": "https://muster-haustechnik.ch",
"notes": "Pikett: 24 h",
"email1": "[email protected]",
"email2": null,
"email3": null,
"businessPhone1": "+41441234567",
"businessPhone2": null,
"mobilePhone": "+41791234567",
"homePhone1": null,
"homePhone2": null,
"businessAddress": {
"street": "Bahnhofstrasse 1",
"postalCode": "8001",
"city": "Zürich",
"state": "ZH",
"country": "Schweiz"
},
"homeAddress": null,
"otherAddress": null,
"listIds": [
"9e2c4d1a-7b3f-4e8a-a1c5-3d6f8b0e2a71"
],
"source": "manual",
"readOnly": false,
"hasPhoto": false,
"createdAt": "2026-10-20T08:15:00.000Z",
"updatedAt": "2026-10-24T13:42:10.000Z"
}post/contacts
Create a contact
Creates the contact and puts it into the given lists. Delivery to the mailboxes starts right away.
Scope: write
Request body (27)
| Field | Type | Description |
|---|---|---|
| title | string | |
| givenName | string | |
| middleName | string | |
| surname | string | givenName, surname or companyName is required. |
| nickName | string | |
| companyName | string | |
| department | string | |
| jobTitle | string | |
| profession | string | |
| officeLocation | string | Site or office. |
| manager | string | |
| assistantName | string | |
| imAddress | string | Teams or SIP address. |
| email1 | string | |
| email2 | string | |
| email3 | string | |
| businessPhone1 | string | Any common format, Swiss numbers without country code too. Returned in E.164 (+41...). |
| businessPhone2 | string | Any common format, Swiss numbers without country code too. Returned in E.164 (+41...). |
| mobilePhone | string | Any common format, Swiss numbers without country code too. Returned in E.164 (+41...). |
| homePhone1 | string | Any common format, Swiss numbers without country code too. Returned in E.164 (+41...). |
| homePhone2 | string | Any common format, Swiss numbers without country code too. Returned in E.164 (+41...). |
| businessAddress | object | null | Object with street, postalCode, city, state, country. |
| homeAddress | object | null | Object with street, postalCode, city, state, country. |
| otherAddress | object | null | Object with street, postalCode, city, state, country. |
| website | string | https:// is added when missing. |
| notes | string | |
| listIds | uuid[] | Lists the contact goes into. Required for keys limited to lists. |
Example
curl -X POST "https://app.kontaktfix.ch/api/v1/contacts" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"givenName":"Anna","surname":"Meier","companyName":"Muster Haustechnik AG","mobilePhone":"079 123 45 67","email1":"[email protected]","listIds":["9e2c4d1a-7b3f-4e8a-a1c5-3d6f8b0e2a71"]}'Response
200 OK, application/json
{
"id": "4b1f6a3e-2c1d-4a8e-9f5b-0c7d2e9a1b34",
"displayName": "Anna Meier",
"title": null,
"givenName": "Anna",
"middleName": null,
"surname": "Meier",
"nickName": null,
"companyName": "Muster Haustechnik AG",
"department": "Service",
"jobTitle": "Disponentin",
"profession": null,
"officeLocation": "Zürich",
"manager": null,
"assistantName": null,
"imAddress": null,
"website": "https://muster-haustechnik.ch",
"notes": "Pikett: 24 h",
"email1": "[email protected]",
"email2": null,
"email3": null,
"businessPhone1": "+41441234567",
"businessPhone2": null,
"mobilePhone": "+41791234567",
"homePhone1": null,
"homePhone2": null,
"businessAddress": {
"street": "Bahnhofstrasse 1",
"postalCode": "8001",
"city": "Zürich",
"state": "ZH",
"country": "Schweiz"
},
"homeAddress": null,
"otherAddress": null,
"listIds": [
"9e2c4d1a-7b3f-4e8a-a1c5-3d6f8b0e2a71"
],
"source": "manual",
"readOnly": false,
"hasPhoto": false,
"createdAt": "2026-10-20T08:15:00.000Z",
"updatedAt": "2026-10-24T13:42:10.000Z"
}patch/contacts/{id}
Update a contact
Changes only the fields you send. Send null or an empty string to clear a field. List membership is changed with the list endpoints.
Scope: write
Parameters
| idpath, required | uuid |
|---|
Request body (26)
| Field | Type | Description |
|---|---|---|
| title | string | |
| givenName | string | |
| middleName | string | |
| surname | string | givenName, surname or companyName is required. |
| nickName | string | |
| companyName | string | |
| department | string | |
| jobTitle | string | |
| profession | string | |
| officeLocation | string | Site or office. |
| manager | string | |
| assistantName | string | |
| imAddress | string | Teams or SIP address. |
| email1 | string | |
| email2 | string | |
| email3 | string | |
| businessPhone1 | string | Any common format, Swiss numbers without country code too. Returned in E.164 (+41...). |
| businessPhone2 | string | Any common format, Swiss numbers without country code too. Returned in E.164 (+41...). |
| mobilePhone | string | Any common format, Swiss numbers without country code too. Returned in E.164 (+41...). |
| homePhone1 | string | Any common format, Swiss numbers without country code too. Returned in E.164 (+41...). |
| homePhone2 | string | Any common format, Swiss numbers without country code too. Returned in E.164 (+41...). |
| businessAddress | object | null | Object with street, postalCode, city, state, country. |
| homeAddress | object | null | Object with street, postalCode, city, state, country. |
| otherAddress | object | null | Object with street, postalCode, city, state, country. |
| website | string | https:// is added when missing. |
| notes | string |
Example
curl -X PATCH "https://app.kontaktfix.ch/api/v1/contacts/<id>" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jobTitle":"Leiterin Disposition","businessPhone2":null}'Response
200 OK, application/json
{
"id": "4b1f6a3e-2c1d-4a8e-9f5b-0c7d2e9a1b34",
"displayName": "Anna Meier",
"title": null,
"givenName": "Anna",
"middleName": null,
"surname": "Meier",
"nickName": null,
"companyName": "Muster Haustechnik AG",
"department": "Service",
"jobTitle": "Disponentin",
"profession": null,
"officeLocation": "Zürich",
"manager": null,
"assistantName": null,
"imAddress": null,
"website": "https://muster-haustechnik.ch",
"notes": "Pikett: 24 h",
"email1": "[email protected]",
"email2": null,
"email3": null,
"businessPhone1": "+41441234567",
"businessPhone2": null,
"mobilePhone": "+41791234567",
"homePhone1": null,
"homePhone2": null,
"businessAddress": {
"street": "Bahnhofstrasse 1",
"postalCode": "8001",
"city": "Zürich",
"state": "ZH",
"country": "Schweiz"
},
"homeAddress": null,
"otherAddress": null,
"listIds": [
"9e2c4d1a-7b3f-4e8a-a1c5-3d6f8b0e2a71"
],
"source": "manual",
"readOnly": false,
"hasPhoto": false,
"createdAt": "2026-10-20T08:15:00.000Z",
"updatedAt": "2026-10-24T13:42:10.000Z"
}delete/contacts/{id}
Delete a contact
Deletes the contact and removes it from all mailboxes.
Scope: write, key not limited to lists
Parameters
| idpath, required | uuid |
|---|
Example
curl -X DELETE "https://app.kontaktfix.ch/api/v1/contacts/<id>" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY"Response
204 No Content
Lists
get/lists
List lists
All lists the key may see, sorted by name.
Scope: read
Example
curl "https://app.kontaktfix.ch/api/v1/lists" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY"Response
200 OK, application/json
[
{
"id": "9e2c4d1a-7b3f-4e8a-a1c5-3d6f8b0e2a71",
"name": "Lieferanten",
"description": "Alle Lieferanten mit Pikettnummern",
"color": "iris",
"kind": "manual",
"contactCount": 128,
"readOnly": false,
"createdAt": "2026-09-02T09:00:00.000Z",
"updatedAt": "2026-10-24T13:42:10.000Z"
}
]get/lists/{id}
Get a list
One list.
Scope: read
Parameters
| idpath, required | uuid |
|---|
Example
curl "https://app.kontaktfix.ch/api/v1/lists/<id>" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY"Response
200 OK, application/json
{
"id": "9e2c4d1a-7b3f-4e8a-a1c5-3d6f8b0e2a71",
"name": "Lieferanten",
"description": "Alle Lieferanten mit Pikettnummern",
"color": "iris",
"kind": "manual",
"contactCount": 128,
"readOnly": false,
"createdAt": "2026-09-02T09:00:00.000Z",
"updatedAt": "2026-10-24T13:42:10.000Z"
}post/lists
Create a list
Creates a manual list. Who receives it is set in the app (Lists > Assignments).
Scope: write, key not limited to lists
Request body (3)
| Field | Type | Description |
|---|---|---|
| namerequired | string | |
| description | string | null | |
| color | "gray" | "iris" | "blue" | "teal" | "green" | "amber" | "orange" | "red" | "pink" | "violet" |
Example
curl -X POST "https://app.kontaktfix.ch/api/v1/lists" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Lieferanten","description":"Alle Lieferanten mit Pikettnummern","color":"iris"}'Response
200 OK, application/json
{
"id": "9e2c4d1a-7b3f-4e8a-a1c5-3d6f8b0e2a71",
"name": "Lieferanten",
"description": "Alle Lieferanten mit Pikettnummern",
"color": "iris",
"kind": "manual",
"contactCount": 128,
"readOnly": false,
"createdAt": "2026-09-02T09:00:00.000Z",
"updatedAt": "2026-10-24T13:42:10.000Z"
}patch/lists/{id}
Update a list
Changes name, description or color. The name is the Outlook category, so a rename updates the delivered contacts.
Scope: write, key not limited to lists
Parameters
| idpath, required | uuid |
|---|
Request body (3)
| Field | Type | Description |
|---|---|---|
| name | string | |
| description | string | null | |
| color | "gray" | "iris" | "blue" | "teal" | "green" | "amber" | "orange" | "red" | "pink" | "violet" |
Example
curl -X PATCH "https://app.kontaktfix.ch/api/v1/lists/<id>" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Lieferanten Schweiz"}'Response
200 OK, application/json
{
"id": "9e2c4d1a-7b3f-4e8a-a1c5-3d6f8b0e2a71",
"name": "Lieferanten",
"description": "Alle Lieferanten mit Pikettnummern",
"color": "iris",
"kind": "manual",
"contactCount": 128,
"readOnly": false,
"createdAt": "2026-09-02T09:00:00.000Z",
"updatedAt": "2026-10-24T13:42:10.000Z"
}delete/lists/{id}
Delete a list
Deletes the list. Its contacts stay, but leave the mailboxes that received them only through this list.
Scope: write, key not limited to lists
Parameters
| idpath, required | uuid |
|---|
Example
curl -X DELETE "https://app.kontaktfix.ch/api/v1/lists/<id>" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY"Response
204 No Content
put/lists/{id}/contacts/{contactId}
Add a contact to a list
Idempotent: adding a contact that is already in the list changes nothing.
Scope: write
Parameters
| idpath, required | uuid | |
|---|---|---|
| contactIdpath, required | uuid |
Example
curl -X PUT "https://app.kontaktfix.ch/api/v1/lists/<id>/contacts/<contactId>" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY"Response
204 No Content
delete/lists/{id}/contacts/{contactId}
Remove a contact from a list
The contact itself stays. Idempotent.
Scope: write
Parameters
| idpath, required | uuid | |
|---|---|---|
| contactIdpath, required | uuid |
Example
curl -X DELETE "https://app.kontaktfix.ch/api/v1/lists/<id>/contacts/<contactId>" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY"Response
204 No Content
Delivery status
get/sync/status
Delivery status
Connection to Microsoft 365, people by status and the last delivery run.
Scope: read
Example
curl "https://app.kontaktfix.ch/api/v1/sync/status" \
-H "Authorization: Bearer $KONTAKTFIX_API_KEY"Response
200 OK, application/json
{
"connection": "granted",
"running": false,
"lastSuccessAt": "2026-10-25T06:00:12.000Z",
"recipients": {
"pending": 0,
"syncing": 0,
"ok": 48,
"error": 1,
"unreachable": 2,
"removing": 0
},
"lastRun": {
"id": "c3a7e5f2-1b9d-4c6e-8a2f-7d0b4e1c9a53",
"trigger": "change",
"status": "done",
"startedAt": "2026-10-25T06:00:00.000Z",
"finishedAt": "2026-10-25T06:00:12.000Z",
"created": 3,
"updated": 51,
"deleted": 0,
"errors": 0
}
}Webhooks
Webhooks tell your system when something changes, so it does not have to ask. An administrator adds an HTTPS address and chooses the events under Settings > API. Kontaktfix sends a POST with a small JSON body, usually within a minute: { "type": "contact.updated", "timestamp": "2026-10-25T08:15:00.000Z", "data": { "id": "..." } }
The body carries only ids. Fetch the current state with the API, so no contact data is sent along and an event that arrives late does no harm.
Events
| contact.created | A contact was created (app, import or API). data.id |
|---|---|
| contact.updated | A contact or its photo was changed. data.id |
| contact.deleted | A contact was deleted. data.id |
| list.created | A list was created. data.id |
| list.updated | Name, description or color of a list changed. data.id |
| list.deleted | A list was deleted. data.id |
| list.contacts_changed | Contacts were added to or removed from a list. data.id, data.change, data.count |
| sync.completed | A delivery run finished. data.runId, data.status, counts |
| delivery.failed | Delivery to a mailbox failed. data.userId, data.reason, data.runId |
| recipient.unreachable | A person cannot be reached, e.g. no mailbox. Sent once when it starts. data.userId, data.reason |
| webhook.test | Sent by Send test event. |
Checking the signature
Webhooks are signed like Standard Webhooks, so their libraries work too. Each request has the headers webhook-id, webhook-timestamp (Unix seconds) and webhook-signature (v1,<signature>).
The signature is HMAC-SHA256 over id.timestamp.body with the base64-decoded part of your secret after whsec_. Use the raw body before parsing it, compare in constant time, and reject timestamps more than 5 minutes old. webhook-id stays the same on retries: use it to ignore duplicates.
import { createHmac, timingSafeEqual } from "node:crypto";
/** headers: the request headers, rawBody: the body as received, before JSON.parse. */
export function verifyKontaktfixWebhook(secret, headers, rawBody) {
const id = headers["webhook-id"];
const timestamp = headers["webhook-timestamp"];
if (!id || !timestamp || Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const key = Buffer.from(secret.slice("whsec_".length), "base64");
const expected = createHmac("sha256", key).update(`${id}.${timestamp}.${rawBody}`).digest("base64");
return (headers["webhook-signature"] ?? "").split(" ").some((part) => {
const [version, signature = ""] = part.split(",");
return version === "v1" && signature.length === expected.length &&
timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
});
}Retries
Answer with a 2xx status within 10 seconds; do the work afterwards. Anything else, a redirect or no answer counts as failed and is retried after 1 and 5 minutes, 30 minutes, 2, 5 and 10 hours and again 10 hours later, then given up (about 28 hours). The app shows the last status per address.