Hapee API
Connect your ERP, your store or your internal system to a Hapee subaccount. REST API, JSON, signed webhooks.
Get started in 15 minutes
From your first request to your first webhook, all against the sandbox.
02Integrate an ERP
Complete flows, field mapping and a go-live checklist.
03Webhooks
Signature verification in Node, Python, PHP and C#.
04MCP connector
Use Hapee from Claude, ChatGPT or Grok Bot, with your own user.
05Reference
Every endpoint, with its parameters and responses.
What you can do
The API covers the same objects your sales team works with inside Hapee:
| Resource | What it lets you do |
|---|---|
contacts | People: create, update, search, tag, notes and tasks |
companies | Companies, with validated RUT |
deals | Deals: create, move between stages, mark as won or lost |
products, prices | Catalog and price lists |
quotes | Quotes, with their line items and totals |
calendars, appointments | Availability, scheduling, rescheduling and canceling |
custom_objects | Your own objects: invoices, orders, payments |
workflows | Enroll a contact in an automation |
webhooks, events | Find out what happens, without polling |
The essentials, in five lines
- Authentication:
Authorization: Bearer hp_live_…(orhp_test_…in the sandbox). - The subaccount comes from the credential. It is never sent as a parameter.
- Formats: UTF-8 JSON, ISO 8601 dates in UTC, E.164 phone numbers, amounts as decimal strings with their
currency, RUT as12345678-K. - Lists: cursor pagination (
limitup to 100,cursor,next_cursor). - Writes: send
Idempotency-Keyand a retry won't duplicate anything.
Your first request
curl https://beta.hapee.ai/api/v1/me \
-H "Authorization: Bearer hp_test_YOUR_CREDENTIAL"
It tells you who you are, which subaccount you operate on, in which mode and with which limits. If this works, everything else works.
{
"key": { "id": 44, "name": "Mi ERP", "mode": "test", "read_only": false },
"subaccount": { "id": 91, "name": "Cliente — Sandbox",
"timezone": "America/Santiago", "default_currency": "CLP",
"sandbox": true, "language": "es" },
"limits": { "requests_per_minute": 100, "batch_max_items": 100,
"events_retention_days": 30, "idempotency_window_hours": 24 },
"api_version": "v1"
}
Finding out what happens
There are two paths and they serve the same events, with the same body:
- Webhooks — you give us an
httpsURL and we notify you. Signed with HMAC-SHA256. GET /events— if your system can't expose a public URL (typical for an ERP installed on-premises), you poll with a cursor. 30-day retention.
You can use both, or just one. There is nothing different to configure: you choose based on what your infrastructure allows, not on what you want to receive.
Errors
They all have the same shape, and the code is stable:
{
"error": {
"code": "validation_error",
"message": "El RUT no es válido.",
"details": [{ "field": "rut", "issue": "invalid_check_digit" }],
"request_id": "7e3a6a14dfe84d359fc3108b5974f880"
}
}
Always save the X-Request-Id from the response. It lets us find your exact call in our logs when you contact support.
Versioning
v1 is stable. Adding a field to a response is not a breaking change, so your integration must ignore fields it doesn't recognize. A breaking change ships as v2, and v1 stays alive for at least 12 months after the announcement.
How to get a credential
They are issued by the agency that manages your Hapee account. Ask for an hp_test_ credential first: it points to a test subaccount with fictitious data, so you can develop without touching anything real.
Going to production means changing the credential and the webhook URL. Nothing else: the sandbox and production speak the same API.
Questions, or something that isn't documented? Write to us at info@hapee.ai.