Skip to content

API conventions

These rules apply to every endpoint under https://<your-instance>/api/v1.

Authentication

Every request carries the key in the header Authorization: Bearer hek_…. Keys work only under /api/v1. A key belongs to exactly one company or Mandant; routing hints such as X-Mandant are ignored.

Formats

  • JSON in snake_case.
  • Money is a decimal number as text ("1250.50") and always comes with a currency field ("CHF").
  • Dates: YYYY-MM-DD.
  • Timestamps: ISO 8601 in UTC with offset, for example 2026-11-04T10:00:00+00:00. As input, a timestamp without an offset counts as UTC.
  • IDs are UUID strings.
  • Updates are PATCH only. There is no PUT. Fields you do not send stay unchanged.

Lists and paging

List endpoints respond like this:

{ "data": [ … ], "next_cursor": "eyJ1Ijog…" }
ParameterMeaning
limitEntries per page. Default 50, at most 200.
cursorThe next_cursor value of the previous response. When next_cursor is null, that was the last page.
updated_sinceOnly entries changed at or after this time.

Treat the cursor as opaque text: do not parse or build it. An invalid cursor gives 400 with invalid_cursor, an unreadable timestamp 400 with invalid_timestamp.

Fetching changes

To synchronise, remember the time of your last fetch and ask with updated_since=<time> for what is new or changed. For the overlap, subtract 5 minutes from the time of your last fetch (last fetch at 10:00, next query with updated_since = 09:55) and drop entries you already have by their id. That way you miss no change written while your last fetch ran.

Archived companies stay in the list (with archived_at set) so you can see the archival.

Deletion lists

Deleted entries disappear from the lists. So that you still learn about deletions, each resource has a deletion list (for example GET /api/v1/crm/contacts/deleted?since=…). The parameter since is required. The response holds id and deleted_at.

Deletion lists are kept for 90 days. Poll at least that often or you miss deletions.

Idempotency

POST requests accept the header Idempotency-Key with a unique value of your choice (for example a UUID). If you repeat the same request with the same value, you get the stored response and nothing is created twice. This holds for 4xx error responses too. After a 5xx error, a retry runs again. The same value with a different request gives 409 with idempotency_key_reused.

Retry only after the first attempt has answered. Two simultaneous requests with the same value can both run; the protection covers retries after a response only.

The value is kept for 24 hours and per key.

Errors

Every error has the same shape. The message text is in English.

{
"code": "validation_error",
"message": "The request is not valid.",
"details": [ { "field": "name", "problem": "Field required" } ]
}

details appears only for validation errors. Rely on code in your code, not on message.

StatuscodeMeaning
400invalid_cursorcursor is invalid. Use next_cursor of the previous page.
400invalid_timestampupdated_since or since is not an ISO 8601 timestamp.
401invalid_api_keyKey missing, wrong, revoked or expired.
403api_access_not_in_planThe plan does not include API access.
403api_access_disabledAPI access is switched off for this Mandant.
403module_not_enabledThe module is not active or hidden for the key’s role.
403no_write_permissionThe key may only read in this module.
404not_foundThe entry does not exist (or does not belong to this key).
405method_not_allowedThis method does not exist for the path.
409idempotency_key_reusedThe Idempotency-Key was used with a different request.
409mandant_archivedThe Mandant is archived. Writing is not possible.
422validation_errorThe request is invalid. details names field and problem.
429rate_limitedToo many requests. Mind the Retry-After header.
500internal_errorUnexpected server error.

Some endpoints know further 409 codes, listed in the CRM reference (company_archived, tag_name_taken).

Limits

  • 120 requests per minute per key. Above that the API answers 429 with the header Retry-After (seconds until you may try again).
  • At most 10 active keys per company.
  • Request log: Hive Engine stores time, method, path (without query), status and duration for 90 days. Headers, bodies and key material are not stored.

Versioning

Within v1 only additions are made: new endpoints, new optional fields, new values in responses. Existing behaviour does not change. Write your client so it ignores unknown fields.

If a version 2 is released, v1 stays available for at least 12 months after that.

What’s next