NewRecurring invoices: `series_id` is optional
BeeL
Get startedMulti-NIFVeriFactuRulesStripeAPI referenceChangelog
Emails

List the variables of the email templates

Scopeconfiguration:read

Returns the placeholders that the subject and message of the email templates accept, such as defaults.subject in GET /v1/companies/{company_id}/email-configuration. Write a placeholder, braces included, wherever the value should appear: it is replaced when the email is sent.

  • Scope: the catalogue is the same for every credential and does not depend on any account or company, so the operation takes no identifier.
  • Unknown placeholders: a placeholder that is not listed is sent as written.

Closed catalogue. This collection is fixed and bounded: it carries no pagination, it takes no page/limit, and every response holds the whole set.


GET
/v1/email-template-variables
AuthorizationBearer <token>

Keys are prefixed beel_sk_, and each one carries the scopes it was created with: a key short of the scope an operation needs is answered 403. The scope an operation requires is shown next to its title, and the full catalogue lives in the Scopes reference.

Keys are created from the BeeL dashboard. They are secret credentials: do not share them or commit them to source control.

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.beel.es/api/v1/email-template-variables"
{
  "success": true,
  "data": {
    "variables": [
      {
        "key": "invoiceNumber",
        "placeholder": "{invoiceNumber}",
        "description": "Invoice number"
      },
      {
        "key": "customerName",
        "placeholder": "{customerName}",
        "description": "Customer name"
      }
    ]
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication is required to access this resource"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "FORBIDDEN",
    "message": "You do not have permission to access this resource"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please try again in 60 seconds."
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
{
  "success": false,
  "error": {
    "code": "UNSUPPORTED_MEDIA_TYPE",
    "message": "Unsupported media type: text/plain. Supported: application/json"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

Replace the email configuration of a company PUT

Replaces the sender chosen for the invoice emails of the company, and optionally their defaults. It does not affect other emails. The sender is a replacement, not a merge: a property that is omitted or `null` goes back to its default, which is to inherit the default email domain of the account and to use `facturas` as the `local_part`. The response is the configuration as it is after the change, including the address in effect. - **`sender.source`:** when omitted it is `EMAIL_DOMAIN` if `email_domain_id` is sent and `ACCOUNT_DEFAULT` otherwise. `email_domain_id` is accepted only with `EMAIL_DOMAIN`, and `local_part` is not accepted with `BEEL`: any other combination answers `422` `VALIDATION_ERROR`. - **`defaults`:** omitted, the stored defaults stay as they are. `null` removes them. An object replaces all of them, so a property left out of it is removed. Sending an object requires the email customization plan: without it the call answers `403` `FEATURE_NOT_AVAILABLE`, and the sender is not changed. The templates accept the variables listed by `GET /v1/email-template-variables`. - **`email_domain_id`:** an email domain of the account that has already been registered. A domain that does not exist, belongs to another account or was removed answers `404` `EMAIL_DOMAIN_NOT_FOUND`; one that is still being registered answers `409` `EMAIL_DOMAIN_NOT_READY`. Choosing a domain that is not verified is allowed: until it is verified, invoice emails go out from the default email domain of the account if that one is verified, and from BeeL. otherwise. - **`local_part`:** up to 64 characters: lowercase letters, digits and the symbols `!#$%&'*+/=?^_\`{|}~-`, with single dots between groups. Any other value answers `422` `VALIDATION_ERROR`. - **Removed email domains:** when the email domain a company chose is removed, the company goes back to `ACCOUNT_DEFAULT` and keeps its `local_part`. - **Credentials:** it changes the address real invoices are sent from, so it requires a live API key and the `companies:write` scope. A test API key answers `403` `LIVE_CREDENTIAL_REQUIRED`. Send an `Idempotency-Key` so a retry does not repeat the operation. - **Environment:** the configuration belongs to the company and is the same in test and live.

List the email history (deprecated) GET

Returns the emails the system recorded on behalf of the authenticated account: invoice deliveries, verification, onboarding. It only reads the history; it does not send or resend anything. - **Deprecated:** use `GET /v1/accounts/{account_id}/emails`, which behaves identically. - **Every attempt is recorded**, not only the ones that went out: an email stopped by policy is listed with `status` `REJECTED`, and one accepted but not dispatched yet as `QUEUED`, rather than being omitted. - **Order:** by `sent_at` descending, configurable with `sort_by` / `sort_order`. - **Filters:** `type`, `status`, `recipient` and `related_entity_id`. - **`sent_at`:** the moment the message was handed over, so it is absent while an email is still `QUEUED`. **Retires on 9 December 2026.** See the [migration guide](https://docs.beel.es/changelog/resources-under-the-nif) for what moved where and what changes when you switch.