# Alegra API Documentation

This is the complete API documentation for connecting to the Alegra API using MindCloud's Universal API.

MindCloud offers one normalized API to access 3,400+ apps from a single place. It centralizes authentication and normalizes app APIs so they are easier and more consistent to use.

## Quickstart

1. A **MindCloud account** — sign in or create an account at [MindCloud](https://app.mindcloud.co).
2. A **MindCloud API Key** — create one in [API Keys](https://app.mindcloud.co/user/api-keys). Keep it on your server.
3. At least one **Alegra connection** — create or choose one in [Connections](https://app.mindcloud.co/credentials). Note its `connectionId`.

```text
POST https://connect.mindcloud.co/v2/universal/apps/alegra/actions/{actionSlug}/run
```

## Alegra actions

- POST `create-bill` Create Bill
- POST `create-contact` Create Contact
- POST `create-invoice` Create Invoice
- POST `create-item` Create Item
- POST `create-payment` Create Payment
- POST `create-webhook-subscription` Create Webhook Subscription
- DELETE `delete-contact` Delete Contact
- DELETE `delete-invoice` Delete Invoice
- DELETE `delete-item` Delete Item
- DELETE `delete-payment` Delete Payment
- DELETE `delete-webhook-subscription` Delete Webhook Subscription
- GET `get-bill` Get Bill
- GET `get-company` Get Company
- GET `get-contact` Get Contact
- GET `get-invoice` Get Invoice
- GET `get-item` Get Item
- GET `get-payment` Get Payment
- GET `list-bills` List Bills
- GET `list-contacts` List Contacts
- GET `list-invoices` List Invoices
- GET `list-items` List Items
- GET `list-payments` List Payments
- GET `list-webhook-subscriptions` List Webhook Subscriptions
- PUT `restore-contact` Restore Contact
- POST `send-invoice-email` Send Invoice Email
- PUT `update-bill` Update Bill
- PUT `update-contact` Update Contact
- PUT `update-invoice` Update Invoice
- PUT `update-item` Update Item
- PUT `update-payment` Update Payment
