Alegra – Connection Guide
Cloud-based invoicing, accounting and POS software popular across Latin America (Mexico, Colombia, Peru, Spain, Dominican Republic, Argentina, Chile and others) for SMBs and entrepreneurs.
How to connect to Alegra
Alegra is a cloud-based invoicing, accounting and POS platform widely used by SMBs and entrepreneurs across Latin America (Mexico, Colombia, Peru, Spain, Dominican Republic, Argentina, Chile and others). It exposes a REST API that lets external applications synchronise contacts, invoices, bills, items, taxes and chart-of-accounts data.
To connect your Alegra account to Vault you need the email you use to sign in to Alegra and an API token issued from your Alegra dashboard. Both are shown on the same screen in Alegra, and you can complete this yourself in a couple of minutes: there is nothing to request from Alegra or from Apideck.
Before you start
Your Alegra subscription has to include API / integrations access. Which plan that is depends on your country edition: Alegra's international help centre names the Plus plan, while the Costa Rica help centre says only that your subscription must include API access without naming a tier. Some plans also cap how many active integrations you can run. If you are not sure which plan covers it for your country, Alegra support can confirm it for your account.
1. Open the API integrations screen
- Sign in to your Alegra account at app.alegra.com. The same sign-in serves every country edition; there is no country-specific address to pick.
- Click Configuración (Settings) in the top right corner.
- Open the API - Integraciones con otros sistemas section (some editions list this as Integraciones then Integración Manual (API)).
2. Copy your credentials
The screen shows two values:
| Field | What to copy |
|---|---|
| Usuario | The email address associated with your Alegra account (e.g. you@acme.com) |
| Token | The API token Alegra has issued for you |
If you have never used the API before, Alegra will display a token automatically. This token is long-lived: it does not expire on its own and stays valid indefinitely. If the token has been compromised or you simply want a fresh one, click Renovar token: the previous token is invalidated immediately, which breaks any other integration still using it (including this Vault connection) until you supply the new value.
Treat the token like a password. Anyone with the Usuario + Token pair can read and write data in your Alegra account.
3. Paste them into Vault
In Vault, when you enable the Alegra connection, you will be prompted for two values:
- Email then paste the Usuario value from Alegra.
- API Token then paste the Token value from Alegra.
Save the connection. Vault verifies the credentials by calling GET /company on Alegra; if both fields are correct the connection status switches to Connected within a few seconds. Alegra uses HTTP Basic authentication, so there is no authorization redirect or callback step to complete.
Notes
- Token lifetime. The API token is static and long-lived; it never expires on a schedule. It only changes when the account owner clicks Renovar token in Alegra, which invalidates the old token at once. When that happens the Vault connection stops working until you update it here with the new token.
- Testing. Alegra has no separate sandbox or test environment for the accounting API: API calls always run against a real account's live data. To try the connection without touching your production books, sign up for a separate free trial account at alegra.com and connect that instead. Alegra advertises the trial as time-limited, so check the current trial length and terms on Alegra's signup page rather than relying on a fixed figure.
- Multi-country accounts. The API base URL (
https://api.alegra.com/api/v1) is the same regardless of your tenant's country: the token already scopes you to the right tenant, so there is no region to choose in Vault.
Troubleshooting
- "Invalid credentials" or 401: confirm there are no leading/trailing spaces, that the email matches the one in Alegra exactly, and that the token has not been renewed in another session (renewing invalidates the previous token immediately).
- 403 on some resources: API access depends on your Alegra subscription, so a plan that does not include integrations is the first thing to check, and the plan that includes it differs by country edition (see Before you start above). Alegra support can confirm what your account's plan covers.
- 429 (too many requests): Alegra limits how many API calls an account can make per minute. Wait for the current one-minute window to pass before retrying; the current ceiling is on the connector's Overview tab.
- Anything else: contact Apideck Support.