API Overview

HARi CRM exposes a full REST API for integration and automation.
Base URL
Section titled “Base URL”https://<your-workspace>.haricrm.com/apiAuthentication
Section titled “Authentication”All API requests require a Bearer token:
# Logincurl -X POST https://acme.haricrm.com/api/auth/login \ -H "Content-Type: application/json" \ -d '{"email": "you@company.com", "password": "your-password"}'
# Response{ "access_token": "eyJ...", "refresh_token": "abc...", "expires_in": 3600}
# Use the tokencurl https://acme.haricrm.com/api/records/contact \ -H "Authorization: Bearer eyJ..."API Keys
Section titled “API Keys”For server-to-server integration, create an API key in Settings → Profile, under API Keys:
curl https://acme.haricrm.com/api/records/contact \ -H "Authorization: Bearer hari_a1b2c3..."API keys use the hari_ prefix and have the same permissions as the user who created them. When a call made with a key is refused, an administrator can read why. See When a call is refused.
OpenAPI Specification
Section titled “OpenAPI Specification”The full API spec is available at:
GET /api/openapi.jsonThis returns the OpenAPI 3.0 JSON, auto-generated from your tenant’s schema metadata. The list of endpoints adapts to the entities you have installed. Use it with Swagger UI, Postman, or any OpenAPI-compatible tool.
This endpoint requires authentication: send the same Authorization: Bearer header as any other API call. The spec is generated from your own workspace’s schema, so the token determines which entities you see.
Schema Discovery
Section titled “Schema Discovery”For AI agents and CLI tools:
GET /api/schema/endpointsReturns a condensed map of all endpoints with method, path, summary, and body schema. It requires the same Authorization: Bearer header.
Data API (TreeQL)
Section titled “Data API (TreeQL)”CRUD operations on any entity:
# List recordsGET /api/records/{entity}?page=1&page_size=25
# Get one recordGET /api/records/{entity}/{id}
# CreatePOST /api/records/{entity}Body: { "field": "value", ... }
# UpdatePUT /api/records/{entity}/{id}Body: { "field": "new_value" }
# DeleteDELETE /api/records/{entity}/{id}Filtering
Section titled “Filtering”# Single filterGET /api/records/contact?filter=source,eq,website
# Multiple filtersGET /api/records/contact?filter=source,eq,website&filter1=_score,gt,20
# Operators: eq, neq, gt, gte, lt, lte, cs (contains), sw (starts with)Sorting
Section titled “Sorting”GET /api/records/contact?sort=created_at,descIncluding related data
Section titled “Including related data”GET /api/records/contact?include=first_name,last_name,email_address,company_idWebhooks
Section titled “Webhooks”Subscribe to events for real-time notifications:
# SubscribePOST /api/webhooks/subscribe{ "target_url": "https://hooks.zapier.com/...", "entity": "contact", "event": "after_save"}
# Events: after_create, after_update, after_delete, after_save (any save)Rate Limits
Section titled “Rate Limits”- Authenticated requests: 1,000/minute per user
- Login attempts: 20/minute per IP
- Unauthenticated requests: 60/minute per IP
When a call is refused
Section titled “When a call is refused”An administrator sees the last refused calls of every API key in My profile → API Keys. HARi keeps them for the current month and the previous month. Anyone else does not see the list. Each line names the key, the action, why a field was refused, and the program that sent the call.

Open Settings → Profile and find API Keys. The heading is Refused API calls (all keys of this workspace). It lists every key in the workspace, including a key someone else created. A deleted key still shows under the name it had. The list is the newest calls, up to 100. When nothing was refused in that window, the page says No refused calls since the first day of the previous month. Older lines are removed.
A line is a call that signed in with an API key and was then refused. That is a refused create, update, or delete, or any API-key call that failed on HARi’s side. A successful call is not listed. A refused read, such as a lookup that was not found, is not listed. A key HARi does not recognize never signs in, so it is not listed either. Calls you make while signed in in the browser, without an API key, are not listed. The same permissions as the person who created the key still apply. See Permissions and security.
The HTTP standard describes a refused call as a client error. RFC 9110 says the 400 status “indicates that the server cannot or will not process the request due to something that is perceived to be a client error” (RFC 9110, HTTP Semantics, section 15.5.1). One line is the exception: Error on HARi’s side, not caused by the data sent means the failure was HARi’s. Authenticated calls are also capped at 1,000 a minute. A create, update, or delete past that cap reads Too many calls in a short time. See Rate Limits.
What does each sentence mean?
Section titled “What does each sentence mean?”The line starts with the date and time, in your own time zone, then the key’s name, then the sentence.
The first words are the action. Create a Contact means the key tried to create that kind of record. The name is the record type in your workspace, not always Contact. Update a Contact is a change to an existing record. Delete a Contact is a delete. Other API call means it was not a create, update, or delete of a record.
Then the reason. HARi names up to three fields. Further reasons are counted, not spelled out, as and 2 more.
- The field First Name is required and was empty. The call left out a field the record requires.
- The field Source received the value newsletter, which is not in its list. That value is not one of the choices. If the value itself is not repeated, the line is The field Source received a value that is not in its list.
- nickname is not a field of Contact. The call sent a name that is not a field on that record.
- The field Email has a value in the wrong format.
- The field Notes has a value that is too long.
- The field Code has a value that is too short.
- Another record already has this value in Email.
- The field Company points to a record that does not exist.
- The workspace limit was reached. This one is not about a single field. The workspace is at a cap.
- The field Email was refused. HARi refused that field, and none of the sentences above fit.
When there is no field-by-field reason, one of these stands in its place:
- This key is not allowed to do this. The person who created the key is not allowed to do that action.
- Not found.
- Changed by someone else at the same time.
- Too many calls in a short time.
- Error on HARi’s side, not caused by the data sent.
- Refused. None of the sentences above fit.
The line can end with Sent by curl. That is the program named on the call, the word before the first slash, so curl/8.7.1 reads Sent by curl. If the caller sent no name, that ending is left off.
Creating a key is covered under API Keys, and signing in under Authentication. The same API is what Zapier and webhooks use, and what an API is is the short explanation.