[Cotlet](https://cotlet.dev/index.md) · [All integrations](https://cotlet.dev/integrations.md) · [MCP servers](https://cotlet.dev/integrations/mcp.md) · [APIs](https://cotlet.dev/integrations/api.md) · [API & MCP status](https://cotlet.dev/api-status.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Security](https://cotlet.dev/security.md) · [Custom API](https://cotlet.dev/custom-api.md) · [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md) · [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [Contact](https://cotlet.dev/contact.md) · [Pricing](https://cotlet.dev/pricing.md) · [Sign up](https://cotlet.dev/signup)

# Create your own Alegra API

> Alegra has an API, but only on plans that include integration with other apps. With Cotlet you build your own: do a job once with your AI agent, save it as an endpoint and call it from n8n or code.

Source: https://cotlet.dev/integrations/api/alegra

Alegra has an API, but its terms say it is only on plans that include integration with other apps (checked 20 Nov 2026). With Cotlet you can build your own. Do a job once with your AI agent in your Alegra account, save it as an endpoint, and call it from n8n, Make, Zapier or your own code. Each endpoint runs in your own signed-in Alegra session and returns only what your login can see.

[Try it free now](https://cotlet.dev/app/signup?app=alegra)

Free 7-day trial, 2,000 credits, no card

Cotlet is an independent service. It is not affiliated with, endorsed by or sponsored by Alegra. Alegra is a trademark of its owner. If Alegra's own integrations cover what you need, use them first.

curl Node.js Python

curl

```
curl -X POST "https://cotlet.dev/api/v1/custom/overdue-invoices" \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"days_overdue": 30}'
```

Node.js

```
const url = "https://cotlet.dev/api/v1/custom/overdue-invoices";
const res = await fetch(url, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COTLET_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ days_overdue: 30 }),
});
const { data } = await res.json();
```

Python

```
import os
import requests

key = os.environ["COTLET_API_KEY"]
res = requests.post(
"https://cotlet.dev/api/v1/custom/overdue-invoices",
headers={"Authorization": f"Bearer {key}"},
json={"days_overdue": 30},
)
data = res.json()["data"]
```

Response 200 OK · JSON

```
{
"data": [
{
"number": "FV-1042",
"client": "Ferretería Ruiz",
"amount": 2480,
"days_overdue": 61
},
{
"number": "FV-1051",
"client": "Café Montaña",
"amount": 860,
"days_overdue": 47
}
]
}
```

01 Build

## How do you build an Alegra endpoint with Cotlet?

1. 01  
app.alegra.com  
Signed in  
### Sign in to Alegra in your Cloud Browser.  
You type your password yourself. Cotlet keeps the signed-in session, encrypted, never the password.
2. 02  
List sales invoices more than 30 days overdue with the client, number and amount.  
### Do the job once with your agent.  
For example: "List sales invoices more than 30 days overdue with the client, number and amount."
3. 03  
Save endpoint  
Name  
overdue-invoices  
Input  
days\_overdue  
Returns  
number, client, amount, days\_overdue  
### Save it as an endpoint.  
Give it a name, choose its inputs, such as a number of days or a client, and the fields it returns.
4. 04  
$ POST /api/v1/custom/overdue-invoices  
200 OK  
### Call it with your Cotlet API key.  
Each endpoint gets its own address, `POST https://cotlet.dev/api/v1/custom/<name>`. You send JSON in and get JSON back, from the same signed-in Alegra session.

02 Endpoints

## Example endpoints you could build for Alegra

Cotlet ships no fixed list of Alegra endpoints. You decide which endpoints you build and what each one returns.

- POST `/api/v1/custom/overdue-invoices`  
### Overdue invoices  
Number, client, amount and days overdue of each open sales invoice
- POST `/api/v1/custom/sales-by-client`  
### Sales by client  
Sales per client for a period
- POST `/api/v1/custom/unpaid-purchases`  
### Unpaid purchase invoices  
Supplier invoices with no payment recorded
- POST `/api/v1/custom/low-stock-items`  
### Items below minimum  
Items whose stock is under their minimum
- POST `/api/v1/custom/add-contact` writes  
### Add a contact  
A new client or supplier with tax ID and email
- POST `/api/v1/custom/<name>`

A call to an endpoint you built could look like this:

Request

```
curl -X POST "https://cotlet.dev/api/v1/custom/overdue-invoices" \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"days_overdue": 30}'
```

The answer is JSON, with your fields under `data`:

Response · 200 OK

```
{
"data": [
{
"number": "FV-1042",
"client": "Ferretería Ruiz",
"amount": 2480,
"days_overdue": 61
},
{
"number": "FV-1051",
"client": "Café Montaña",
"amount": 860,
"days_overdue": 47
}
]
}
```

When you save an endpoint, Cotlet gives you its curl example and an OpenAPI description to paste into n8n, Make or your code.

03 Uses

## What can you use your Alegra endpoints for?

- Monday Cotlet endpoint Email  
### A weekly cash report.  
Overdue invoices and unpaid purchases, sent to your email every Monday.
- Online store endpoint Alegra contact  
### Orders from your online store.  
Each new customer from your store saved in Alegra as a contact.
- Schedule endpoint Google Sheets  
### A stock sheet.  
Items below minimum pulled into Google Sheets for your next order.
- Chat agent endpoint balances  
### Your own AI assistant.  
A chat agent that checks a client's balance before it answers.

04 Access

## What can an endpoint see and change?

An endpoint works in your own Alegra session, so it can read and change only what your Alegra login can. An owner login sees the whole business. A team login sees what its permissions allow. You choose what each endpoint does when you build it.

An endpoint that changes something, such as adding a contact, first runs as a dry run: Cotlet shows you each request it would send, and nothing is sent. You allow the writes once in the Cotlet console and set a daily cap. A call over the cap fails whole, never half done.

DRY RUN · nothing sent

$ POST /api/v1/custom/add-contact

would POST app.alegra.com/... add the supplier Panadería Luz

`add-contact`writes

Allow writes

Daily cap 20 writes

05 Official API

## Does Alegra have an official API?

Alegra has an API that signs in with your email and a token, on plans that include integration with other apps, and an official MCP server whose documented tools are read only (checked 20 Nov 2026). The full picture with sources: [Does Alegra have an API or MCP server?](https://cotlet.dev/api-status/alegra.md)

Want ChatGPT or Claude to work in Alegra instead of code? See the [Alegra MCP server](https://cotlet.dev/integrations/alegra-api-mcp-server.md).

2/3

Official API

By plan

[Full API & MCP report](https://cotlet.dev/api-status/alegra.md)

06 Pricing

## What does it cost?

per successful call

 10 credits

when a call fails

 0

in the smallest pack

≈ 500 calls

free trial, no card

 7 days

A call to your endpoint costs 10 credits when it succeeds and nothing when it fails, with no browser minutes on top. Credits come in one-time packs from $29 for 5,000 credits, so a pack covers about 500 successful calls. The free trial gives you 2,000 credits for 7 days, no card.

## Alegra API with Cotlet: questions

### Is this an official Alegra API?

No. Cotlet is independent and not affiliated with Alegra. The endpoints you build run in your own signed-in Alegra account.

### Do I need to code?

Not to build an endpoint: you do the job once with your agent and save it. To call it, you need a tool that sends HTTP requests, such as n8n, Make, Zapier or a script.

### What happens when Alegra changes its screens?

An endpoint works while Alegra works the way it did when you built it. If Alegra changes and a call fails, you get an email. After 3 failures in a row the endpoint turns off until you rebuild it with your agent or in the console. A failed call costs nothing.

### How long can a call take?

Up to 90 seconds, and the answer can be up to 1 MB of JSON.

POST /api/v1/custom/<name>

## Build your first Alegra endpoint

Sign in once, do the job with your agent and save it as an endpoint.

[Try it free now](https://cotlet.dev/app/signup?app=alegra)

No card. Takes about 5 minutes.

---

Give your AI agents your signed-in browser.

**Product:** [Integrations](https://cotlet.dev/integrations.md) · [MCP servers](https://cotlet.dev/integrations/mcp.md) · [APIs](https://cotlet.dev/integrations/api.md) · [API & MCP status](https://cotlet.dev/api-status.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Pricing](https://cotlet.dev/pricing.md) · [Security](https://cotlet.dev/security.md) · [Custom API](https://cotlet.dev/custom-api.md)

**Resources:** [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [GitHub](https://github.com/cotletdev/cotlet)

**Solutions:** [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md)

**Company:** [About](https://cotlet.dev/about.md) · [AI info: company facts](https://cotlet.dev/ai-info.md) · [Contact](https://cotlet.dev/contact.md)

**Legal:** [Terms of service](https://cotlet.dev/terms) · [Privacy policy](https://cotlet.dev/privacy) · [Refund policy](https://cotlet.dev/refunds) · [Acceptable use](https://cotlet.dev/acceptable-use) · [Cookie policy](https://cotlet.dev/cookies) · [DPA](https://cotlet.dev/dpa) · [Subprocessors](https://cotlet.dev/subprocessors)

**Elsewhere:** [Status page](https://status.cotlet.dev) · [Cotlet on GitHub](https://github.com/cotletdev) · [Cotlet on X](https://x.com/cotletdev) · [Cotlet on LinkedIn](https://www.linkedin.com/company/cotletdev) · [Cotlet on Product Hunt](https://www.producthunt.com/products/cotlet) · [Cotlet on Crunchbase](https://www.crunchbase.com/organization/cotlet) · [Cotlet on SaaSHub](https://www.saashub.com/cotlet)

Cotlet.dev is built by Bart Krawczyk and Jake Slugocki, the founders of Take Group sp. z o.o., ul. Wincentego Janasa 4, 40-855 Katowice, Poland. KRS 0000871398, NIP 6342984273, VAT EU: PL6342984273. [About us](https://cotlet.dev/about.md)

Cotlet is an independent service. It is not affiliated with, endorsed by or sponsored by any of the products listed on this site. Product names are trademarks of their respective owners.
