Home  ›  Developers  ›  API Reference

REST API reference

The full design specification for the API that ships with the product in October 2026. Resource catalog, authentication, idempotency, pagination, errors, rate limits — everything you need to start integrating against the sandbox in August 2026.

Contents

  1. Base URL & environments
  2. Authentication
  3. Versioning
  4. Request format
  5. Response format & envelope
  6. Money & currency
  7. Dates & timezones
  8. Resource IDs
  9. Idempotency
  10. Pagination
  11. Filtering & sorting
  12. Errors
  13. Rate limits
  14. Resource catalog
  15. API changelog policy

1. Base URL & environments

EnvironmentBase URLPurpose
Sandboxhttps://sandbox-api.hibr.aiFree, pre-populated with sample UAE SMB data. No production data ever flows here.
Productionhttps://api.hibr.aiLive customer data. Requires authenticated requests with valid API keys.

All endpoints require HTTPS. HTTP requests are rejected at the load balancer with no redirect. TLS 1.3 is the minimum supported version; TLS 1.2 is supported for legacy bank-feed callbacks only.

2. Authentication

HIBR supports two authentication models. Pick based on who is making the call:

API keys — for server-to-server integrations

Generate a key in Settings → Developers → API Keys. Pass it as a Bearer token:

Authorization: Bearer hibr_live_xxxxxxxxxxxxxxxxxxxx

Key types:

Keys are scoped at creation. Available scopes:

Keys are revocable per-key without affecting other keys. Revoked keys take effect within 60 seconds.

OAuth 2.0 — for third-party applications

Authorization Code flow with PKCE. Use this when you're building an application that HIBR customers will install. Endpoints:

GEThttps://app.hibr.ai/oauth/authorizeUser consent page
POSThttps://api.hibr.ai/oauth/tokenCode → token exchange
POSThttps://api.hibr.ai/oauth/revokeRevoke a token
POSThttps://api.hibr.ai/oauth/introspectValidate / inspect a token

Register your application in Settings → Developers → OAuth Apps to get a client ID and client secret. Apply for partner status to publish your app to the HIBR App Directory.

Sandbox keys are free. You don't need a paid HIBR subscription to use the sandbox. Sign up for a free sandbox account at sandbox-app.hibr.ai, generate a hibr_test_* key, start building.

3. Versioning

API version is pinned per-request via the Hibr-Version header. The version is a date string. The launch version is 2026-10-01.

Hibr-Version: 2026-10-01

If no version is specified, requests use the account's default version (set at account creation; can be changed in Settings → Developers → API Version).

Versioning rules:

Deprecation notices are sent via the hibr.api.deprecation webhook event and via email to all developer account contacts at least 12 months before sunset.

4. Request format

All POST, PATCH, and DELETE requests use JSON. Set Content-Type: application/json.

# Standard request shape
POST /v1/invoices HTTP/1.1
Host: api.hibr.ai
Authorization: Bearer hibr_live_xxx
Content-Type: application/json
Idempotency-Key: 9f8e7d6c-5b4a-3210-fedc-ba9876543210
Hibr-Version: 2026-10-01

{
  "customer_id": "cust_01HFQA...",
  "lines": [ ... ]
}

GET requests do not have a request body. Filter and sort using query parameters (see §11).

5. Response format & envelope

Successful responses return the resource directly (no wrapping envelope). HTTP 2xx for success, 4xx for client error, 5xx for server error.

# Single resource — 200 OK
{
  "id": "inv_01HFQB...",
  "object": "invoice",
  "invoice_no": "INV-2026-001234",
  ...
}

# List response — 200 OK
{
  "object": "list",
  "data": [ ... ],
  "pagination": {
    "next_cursor": "eyJ0IjoxNzAw...",
    "has_more": true
  }
}

Every resource includes an object field naming the type. This makes generic deserialization easy in typed languages.

6. Money & currency

Amounts are integers in minor currency units. For AED, that means fils (1 AED = 100 fils). So 525000 means AED 5,250.00.

Don't send amounts as floats. Sending 5250.00 as a JSON number triggers a 400 Bad Request. Floating-point representation drifts; integer minor units don't. Every UAE accounting product that uses floats has had a year-end reconciliation issue because of it. We're not going to repeat that.

Multi-currency: every monetary field has a paired _currency field. Internal storage is always AED-equivalent at the transaction-date FX rate; the original currency is preserved alongside.

7. Dates & timezones

The customer's local timezone is stored at the account level (Asia/Dubai by default for UAE customers). The API converts datetimes to UTC on input and returns UTC on output; client-side display formatting is your responsibility.

8. Resource IDs

All resource IDs are prefixed with a 3–5 character type identifier, followed by an underscore, followed by a 26-character ULID. Example: inv_01HFQB9XTRP3K2Q5HW7Z3V8YJN.

ID prefixes:

cust_Customer
supp_Supplier
inv_Invoice (sales)
bill_Bill (purchase invoice)
cn_Credit note
pay_Payment
je_Journal entry
item_Item (product or service)
acct_Account (chart of accounts)
emp_Employee
vat_VAT return
ct_Corporate tax return
wps_WPS payroll run
wh_Webhook endpoint

9. Idempotency

Every state-changing request supports an optional Idempotency-Key header. Send a unique key per logical operation. HIBR stores the response under that key for 24 hours. Replaying the same request with the same key returns the cached response — no duplicate invoice, no duplicate payment.

Idempotency-Key: 9f8e7d6c-5b4a-3210-fedc-ba9876543210

Use a UUID v4 per logical operation, not per HTTP retry. The library SDKs handle this automatically.

10. Pagination

List endpoints use cursor-based pagination. Pass ?limit=N&cursor=XYZ. Default limit is 50; maximum is 200.

GET /v1/invoices?limit=50&cursor=eyJ0IjoxNzAw...

The next cursor is in the response: pagination.next_cursor. When has_more is false, you've reached the end.

11. Filtering & sorting

List endpoints accept filter and sort parameters:

GET /v1/invoices?status=paid&invoice_date.gte=2026-01-01&sort=invoice_date:desc

Filter operators (suffixed with a dot):

12. Errors

Error responses use a stable structure:

# 400 Bad Request
{
  "error": {
    "code": "invalid_request_error",
    "message": "The 'amount' field must be a positive integer in fils.",
    "field": "lines[0].unit_price",
    "docs_url": "https://hibr.ai/developers/api/#money",
    "request_id": "req_01HFQB..."
  }
}
HTTP statusError code (sample)Meaning
400invalid_request_errorRequest body or query parameter is malformed.
401authentication_errorAPI key missing, malformed, or revoked.
403permission_errorAPI key valid but lacks the required scope.
404not_foundResource doesn't exist or you don't have access.
409conflict_errorState conflict (e.g., trying to delete a posted invoice).
422validation_errorBusiness rule violation (e.g., negative VAT amount).
429rate_limit_errorRate limit exceeded. Retry after the Retry-After seconds.
500api_errorInternal error. Include the request_id if you contact support.
503service_unavailableTemporary unavailability. Retry with exponential backoff.

13. Rate limits

Per-tier limits, applied per API key:

TierRequests / minuteConcurrentBursts allowed
Lite6052× for 10 seconds
Pro300203× for 10 seconds
Enterprise1,50050Negotiable
Sandbox303None

Rate-limit headers on every response:

X-RateLimit-Limit: 300
X-RateLimit-Remaining: 247
X-RateLimit-Reset: 1729000080

When you hit a 429, the Retry-After header tells you how many seconds to wait. The SDK clients implement automatic exponential backoff respecting this header.

14. Resource catalog (launch)

The 16 resources available at launch. Each supports the standard verbs unless noted.

Accounting core

/v1/customers
Customers (debtors)
/v1/suppliers
Suppliers (creditors)
/v1/items
Items (products + services)
/v1/accounts
Chart of accounts
/v1/invoices
Sales invoices
/v1/bills
Purchase bills
/v1/credit-notes
Credit notes (sales + purchase)
/v1/payments
Customer + supplier payments
/v1/journals
Manual journal entries

Tax

/v1/vat/returns
VAT 201 returns + submission
/v1/ct/returns
Corporate Tax 201 returns
/v1/e-invoices
PEPPOL PINT-AE submissions

Payroll

/v1/employees
Employee records
/v1/payroll/runs
Payroll cycles + WPS SIF generation
/v1/payroll/gratuity
End-of-service indemnity calc

Webhooks

/v1/webhook-endpoints
Manage webhook subscriptions

Each resource follows a predictable verb pattern:

VerbPathAction
GET/v1/{resource}List with filters
GET/v1/{resource}/{id}Retrieve one
POST/v1/{resource}Create
PATCH/v1/{resource}/{id}Partial update
DELETE/v1/{resource}/{id}Delete (where allowed by business rules)
POST/v1/{resource}/{id}/{action}State transitions (e.g., post, void, send)

15. API changelog policy

Every API change is documented at https://api.hibr.ai/changelog with the date, version, type of change (additive / behavior / breaking), and which endpoints are affected.

Want sandbox access?

Sandbox opens in August 2026. Reserve a beta seat to get notified when the first sandbox keys are issued.

Reserve founder slot →