# Maci API

> Give your own systems your units, components, service history, F-gas log, alarms and invoice bases, and get alarms and approved invoice bases the moment they happen.

The API gives an organisation's own systems access to the data the organisation has in Maci Service, the alarms from Maci Intelligence and, for a service company, its invoice bases. Webhooks post alarms and approved invoice bases to an address of the organisation's own.

Login, passkeys, grants, invitations, API keys and administration can only be handled in the web app.

The base address is `https://api.maci.energy/v1`. Every call takes an API key, and every answer is JSON.

## Guides

- [What you can build](https://api.maci.energy/docs/what-you-can-build.md): Maci Intelligence watches each refrigeration system and warns before it breaks down. The API and the webhooks take what it finds, and the data around each unit, into the systems your people already work in.
- [Quickstart](https://api.maci.energy/docs/quickstart.md): From no key to your first answer in a few minutes: make a key in the app, call the API, and read what comes back.
- [Authentication](https://api.maci.energy/docs/authentication.md): Every call carries an API key. The key decides where the call works, sandbox or production, and what it may do.
- [Lists, limits and versions](https://api.maci.energy/docs/conventions.md): The rules every endpoint follows: the format, paging, repeated calls, how many calls a key may make, and how the API changes.
- [Errors](https://api.maci.energy/docs/errors.md): The API answers with an ordinary HTTP status. An error also has a body with a fixed code your system can act on and a message for a person.
- [Webhooks](https://api.maci.energy/docs/webhooks.md): Maci can post events to an address of your own, so your system hears about an alarm or an approved invoice basis at once, signed with a secret only you and Maci know.
- [AI assistants (MCP)](https://api.maci.energy/docs/ai-assistants.md): Connect Maci to Claude, ChatGPT or another assistant that speaks the Model Context Protocol, and ask it about your refrigeration units in your own words. It reads through the API, so it sees what a key of yours would see, and it cannot change anything.

## Resources

- [Units](https://api.maci.energy/docs/units.md): A unit is one refrigeration system, display case, cold room or other piece of equipment with its own QR or NFC tag, and a site is where it stands.
- [Components](https://api.maci.energy/docs/components.md): The parts of a unit: compressors, fans, valves, controllers and the rest.
- [Photos](https://api.maci.energy/docs/photos.md): Photos of a unit's nameplates, labels and overviews.
- [Service](https://api.maci.energy/docs/service.md): A unit's service history: visits, repairs, fault reports and notes, from the app and from your own systems.
- [F-gas log](https://api.maci.energy/docs/f-gas-log.md): The F-gas log under regulation (EU) 2024/573 and the unit's status: CO2 equivalent, the leak check interval and when the next check is due.
- [Subscriptions](https://api.maci.energy/docs/subscriptions.md): The organisation's Maci Service subscriptions.
- [Invoicing](https://api.maci.energy/docs/invoicing.md): A Maci Partner's own invoices to its customers can be sent here from its invoicing system with `POST /partner-invoices`, with the PDF as base64, and marked paid later; the customer's systems read what they received with `GET /partner-invoices?direction=received`.
- [Alarms](https://api.maci.energy/docs/alarms.md): Alarms from Maci Intelligence for the units' owner and for the refrigeration firm the owner has chosen as the watch.
- [Refrigerants and usage](https://api.maci.energy/docs/refrigerants-and-usage.md): The refrigerant table with GWP, open to every key, and what the key and the organisation have used this month.
