# Replace the email configuration of a company API Reference

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.


## PUT /v1/companies/{company_id}/email-configuration

**Replace the email configuration of a company**

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.

### Authentication

Accepts any of:

- `ApiKeyAuth` (HTTP bearer, token format `beel_sk_*`)

### Parameters

- **company_id** (required) in path `string`: Unique identifier (UUID) of the company the operation acts on: its identifier, not its NIF. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A company you do not reach answers `403`, and so does a company that does not exist, so the existence of a company in another account is never disclosed.
- **Idempotency-Key** (optional) in header `string`: Idempotency key to prevent duplicates in sensitive operations. - Any unique client-generated string (e.g. an order id). A UUID also works but is not required - Allowed characters: letters, digits, `_` and `-` (max 255 chars) - Retrying with the same key replays the first response when it was a success (2xx) or a server error (5xx): same status and body, plus the header `Idempotency-Replay: true`. After a 5xx, check whether the operation took effect before retrying with a **new** key - A 4xx is not stored: the key is released, so the corrected request can reuse it - Stored responses expire 24 hours after processing The key is scoped per user and environment, and bound to the request body, so retrying after a network timeout replays the stored response instead of repeating the operation. | Status | Code | When | |---|---|---| | `400` | `INVALID_IDEMPOTENCY_KEY` | The key breaks the format rules above. | | `409` | `IDEMPOTENCY_KEY_PROCESSING` | The first request is still in flight. Wait for the `Retry-After` seconds (2) and retry with the same key. | | `409` | `IDEMPOTENCY_KEY_MISMATCH` | The key was already used with a **different** body. Use a new key. |

### Request Body

Required.

**Content `application/json`:**

- **sender** (required) `UpdateCompanyEmailSender`
- **defaults**: The defaults of the invoice emails. Omitted keeps them; `null` removes them.

**Example:**

```json
{
  "sender": {
    "source": "EMAIL_DOMAIN",
    "email_domain_id": "550e8400-e29b-41d4-a716-446655440000",
    "local_part": "cobros"
  },
  "defaults": {
    "subject": "Invoice {invoiceNumber}",
    "message": "Dear {customerName}, please find attached invoice {invoiceNumber}.",
    "cc": [
      "administracion@ejemplo.com"
    ]
  }
}
```

### Responses

#### 200: Email configuration of the company after the change

**Content `application/json`:**

- **success** (required) `boolean`: No description (example: true)
- **data** (required): The payload. An object for a single resource; an object holding the named collection (and its `pagination`) for a listing. Never a bare array at this level in v1.
- **meta** `ResponseMeta`
- **data** (required) `CompanyEmailConfiguration`

#### 400: Bad request. From a dashboard session, a `BeeL-Environment` header whose value is not a
known environment answers `ENVIRONMENT_HEADER_INVALID`, with the header named in
`error.details` (`{"BeeL-Environment": "invalid"}`); it is never read as production.

`BUSINESS_RULE_VIOLATION` is the generic answer to an operation the resource does not
admit in its current state when that state has no code of its own. It carries no
`details`; read the resource again before retrying.


**Content `application/json`:**

- **success** (required) `boolean`: No description (example: false)
- **error** (required) `ErrorDetail`
- **meta** `ResponseMeta`
- **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES")
- **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES")
- **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line")
- **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123")

**Example:**

```json
{
  "success": false,
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid request"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
```

#### 401: Missing or invalid authentication. Like every other error, `message`/`detail` is
localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English when the
header is missing or asks for none of those.


**Content `application/json`:**

- **success** (required) `boolean`: No description (example: false)
- **error** (required) `ErrorDetail`
- **meta** `ResponseMeta`
- **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES")
- **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES")
- **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line")
- **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123")

**Example:**

```json
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication is required to access this resource"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
```

#### 403: Your account does not own or manage this company, does not hold write access over it,
or the credential is a test one (`LIVE_CREDENTIAL_REQUIRED`). Not owning the company answers
`error.code` `ACTIVE_COMPANY_NOT_ACCESSIBLE`; a credential without the `companies:write`
scope answers `INSUFFICIENT_SCOPE`. Sending `defaults` without the email customization
plan answers `FEATURE_NOT_AVAILABLE`.


**Content `application/json`:**

- **success** (required) `boolean`: No description (example: false)
- **error** (required) `ErrorDetail`
- **meta** `ResponseMeta`
- **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES")
- **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES")
- **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line")
- **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123")

#### 404: The email domain does not exist, belongs to another account or was removed
(`error.code` `EMAIL_DOMAIN_NOT_FOUND`).


**Content `application/json`:**

- **success** (required) `boolean`: No description (example: false)
- **error** (required) `ErrorDetail`
- **meta** `ResponseMeta`
- **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES")
- **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES")
- **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line")
- **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123")

#### 409: The email domain is still being registered and cannot be chosen yet
(`error.code` `EMAIL_DOMAIN_NOT_READY`).


**Content `application/json`:**

- **success** (required) `boolean`: No description (example: false)
- **error** (required) `ErrorDetail`
- **meta** `ResponseMeta`
- **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES")
- **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES")
- **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line")
- **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123")

#### 422: A property is not valid, or the combination of `source`, `email_domain_id` and
`local_part` is not allowed (`error.code` `VALIDATION_ERROR`). Send values that follow
the format described for the operation.


**Content `application/json`:**

- **success** (required) `boolean`: No description (example: false)
- **error** (required) `ErrorDetail`
- **meta** `ResponseMeta`
- **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES")
- **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES")
- **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line")
- **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123")

#### 429: Rate limit exceeded. `RATE_LIMIT_EXCEEDED` when the request rate of your credential is
over its limit; `TOO_MANY_REQUESTS` when an email the operation sends is held back because
too many went out to that recipient in a short time. Either way, retry after the
`Retry-After` seconds.

`QUOTA_EXCEEDED` is the other `429`: the operation would go over a quota of your plan
for the current period (issued invoices, for instance). Retrying does not help until the
quota resets or the plan changes. `error.details` carries `feature_code`,
`current_usage`, `quota_limit` and `reset_date`, and `RateLimit-Reset` the seconds until
the reset when it is known.


**Headers:**

- `Retry-After` `integer`: Seconds until the rate limit resets
- `RateLimit-Limit` `integer`: Maximum requests allowed in the window
- `RateLimit-Remaining` `integer`: Remaining requests in the current window
- `RateLimit-Reset` `integer`: Seconds until the current window resets

**Content `application/json`:**

- **success** (required) `boolean`: No description (example: false)
- **error** (required) `ErrorDetail`
- **meta** `ResponseMeta`
- **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES")
- **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES")
- **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line")
- **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123")

**Example:**

```json
{
  "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"
  }
}
```

#### 500: Internal server error

**Content `application/json`:**

- **success** (required) `boolean`: No description (example: false)
- **error** (required) `ErrorDetail`
- **meta** `ResponseMeta`
- **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES")
- **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES")
- **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line")
- **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123")

**Example:**

```json
{
  "success": false,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}
```

#### default: Any status code the operation does not list above. Every operation declares it, so a
generated client always has a branch to fall into and never loses the cause of a failure
it did not anticipate.

This is where the transport-level answers land — `405`, `406`, `415` and `429` — together
with any status a future version of the API starts returning. All of them carry the same
error envelope as the codes listed explicitly, so `error.code` is what tells them apart:
switching on the status code alone is not enough. See «Transport-level errors» in the
API description for when each one is produced.

A `402` carrying `SUBSCRIPTION_REQUIRED` lands here when the account has no active
subscription. `error.details` says why and what to do: `current_status` (absent if it
never had one), `required_permission` and `action`.

A `503` carrying `SERVICE_UNAVAILABLE` lands here too, with a `Retry-After` header: a
dependency of BeeL itself (the database, the email provider) was momentarily
unavailable and nothing was done. Retry after those seconds.

A `502` carrying `EXTERNAL_SERVICE_ERROR` also lands here: an outbound integration the
operation depends on failed or did not answer in time. It is a transient condition — retry
with the same `Idempotency-Key` where the operation accepts one.

One exception to the envelope: a failure of the network edge that never reaches the
application (`502`, `503`, `504`, `524`) is generated by Cloudflare and its body is not
BeeL's — it may not even be JSON. Treat those as "no answer", and retry.


**Content `application/json`:**

- **success** (required) `boolean`: No description (example: false)
- **error** (required) `ErrorDetail`
- **meta** `ResponseMeta`
- **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES")
- **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES")
- **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line")
- **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123")

**Example:**

```json
{
  "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"
  }
}
```

---

# Related Schema Definitions

## UpdateCompanyEmailConfigurationRequest

- **sender** (required) `UpdateCompanyEmailSender`
- **defaults**: The defaults of the invoice emails. Omitted keeps them; `null` removes them.

## UpdateCompanyEmailSender

- **source** `CompanyEmailSenderSource`: What the company chose as the sender of its invoice emails. - ACCOUNT_DEFAULT: no choice; it inherits the default email domain of the account. - EMAIL_DOMAIN: one of the email domains of the account, in `email_domain_id`. - BEEL: the address of BeeL.
- **email_domain_id** `string` (uuid): An email domain of the account. Accepted only with `source` `EMAIL_DOMAIN`.
- **local_part** `string`: Part of the address before the `@`. Not accepted with `source` `BEEL`. (example: "cobros")

## SuccessResponse

The envelope every successful JSON response of the BeeL. API is wrapped in. There are no
bare resources in v1 and none are planned: the payload always hangs off `data`.

- A **single resource** is an object in `data`.
- A **collection** hangs off a named key inside `data`, together with its `pagination`,
  also inside `data` — `data: {invoices: [...], pagination: {...}}`.
- A collection carries `pagination` unless its operation declares itself a **closed
  catalogue**: a fixed, bounded list with nothing to page through. The declaration is
  explicit in the operation; a missing `pagination` is never something to infer.
- `GET /v1/accounts` pages by cursor (`data: {accounts: [...], next_cursor}`). It is a
  documented variant of pagination, not another envelope.

Putting the array straight into `data` with `pagination` as its sibling is the shape a v2
would adopt; v1 is not being flipped to it.

- **success** (required) `boolean`: No description (example: true)
- **data** (required): The payload. An object for a single resource; an object holding the named collection (and its `pagination`) for a listing. Never a bare array at this level in v1.
- **meta** `ResponseMeta`

## ResponseMeta

- **timestamp** `string` (date-time): No description (example: "2025-01-15T10:30:00Z")
- **request_id** `string`: No description (example: "4bf92f3577b34da6a3ce929d0e0e4736")

## CompanyEmailConfiguration

- **sender** (required) `CompanyEmailSender`: The sender chosen for the invoice emails of a company, and the one in effect.
- **defaults** (required) `CompanyEmailDefaults`: The content applied to an invoice email that does not specify its own. The additional recipients are always added.

## ErrorResponse

Error response shared by all BeeL. APIs.

The payload carries **two contracts at once** (additive, non-breaking):

- **Legacy** (`success`, `error.{code,message,details}`, `meta`) — kept
  intact for existing consumers.
- **RFC 9457** (`type`, `title`, `detail`, `instance`) — new fields
  for integrators following Problem Details for HTTP APIs. The
  `type` URI is the stable, shareable link to the error's
  documentation page (e.g. `https://docs.beel.es/errors/{code}`).

Future migration: the legacy fields will be deprecated via
`Deprecation`/`Sunset` headers after a sufficient adoption window,
and the response Content-Type will move to
`application/problem+json`.

- **success** (required) `boolean`: No description (example: false)
- **error** (required) `ErrorDetail`
- **meta** `ResponseMeta`
- **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES")
- **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES")
- **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line")
- **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123")

## ErrorDetail

- **code** (required) `string`: No description (example: "VALIDATION_ERROR")
- **message** (required) `string`: No description (example: "The provided data is not valid")
- **details** `object`: No description (example: {"field":"specific error message"})

## CompanyEmailSenderSource

What the company chose as the sender of its invoice emails.

- ACCOUNT_DEFAULT: no choice; it inherits the default email domain of the account.
- EMAIL_DOMAIN: one of the email domains of the account, in `email_domain_id`.
- BEEL: the address of BeeL.

Type: `string` — one of: ACCOUNT_DEFAULT, EMAIL_DOMAIN, BEEL

## CompanyEmailSender

The sender chosen for the invoice emails of a company, and the one in effect.

- **source** (required) `CompanyEmailSenderSource`: What the company chose as the sender of its invoice emails. - ACCOUNT_DEFAULT: no choice; it inherits the default email domain of the account. - EMAIL_DOMAIN: one of the email domains of the account, in `email_domain_id`. - BEEL: the address of BeeL.
- **email_domain_id** (required) `string` (uuid): The email domain of the account the company chose; `null` unless `source` is `EMAIL_DOMAIN`.
- **local_part** (required) `string`: Part of the address before the `@`. `null` means `facturas`, and it is always `null` when `source` is `BEEL`. (example: "cobros")
- **effective** (required) `EffectiveEmailSender`: The address the invoice emails of a company go out from, and why.

## CompanyEmailDefaults

The content applied to an invoice email that does not specify its own. The additional recipients are always added.

- **subject** (required) `string`: Subject template, with the variables of `GET /v1/email-template-variables`. (example: "Invoice {invoiceNumber}")
- **message** (required) `string`: Message template, with the variables of `GET /v1/email-template-variables`. (example: "Dear {customerName}, please find attached invoice {invoiceNumber}.")
- **cc** (required) `array[Email]`: CC recipients, applied when the email request does not specify `cc`.
- **additional_recipients** (required) `array[Email]`: Recipients added to those of every invoice email.

## EffectiveEmailSender

The address the invoice emails of a company go out from, and why.

- **from_address** (required) `string` (email): Address shown as the sender of the invoice emails. (example: "facturas@facturas.ejemplo.com")
- **reason** (required) `EmailSenderReason`: Why invoice emails go out from the address they go out from. - CUSTOM_DOMAIN: from a verified email domain of the account. Nothing to do. - ADDON_INACTIVE: the company or the account has an email domain but the account does not hold the custom email domain add-on, so emails go out from BeeL. Contract the add-on with BeeL. to use the domain. - DOMAIN_NOT_VERIFIED: the email domains that apply are not verified, so emails go out from BeeL. Verify the domain with `POST /v1/accounts/{account_id}/email-domains/{email_domain_id}/verify` once its DNS records are published. - NO_DOMAIN: neither the company nor the account has an email domain, so emails go out from BeeL. Register one with `POST /v1/accounts/{account_id}/email-domains`. - BEEL_SELECTED: the company chose the address of BeeL. (`source` `BEEL`). Nothing to do.
- **email_domain_id** `string` (uuid): The email domain of the account the address belongs to. Absent when the address is BeeL.'s. (example: "550e8400-e29b-41d4-a716-446655440000")

## Email

Email address (minimum valid email is 5 chars, e.g. a@b.co)

Type: `string` (email)

## EmailSenderReason

Why invoice emails go out from the address they go out from.

- CUSTOM_DOMAIN: from a verified email domain of the account. Nothing to do.
- ADDON_INACTIVE: the company or the account has an email domain but the account does not
  hold the custom email domain add-on, so emails go out from BeeL. Contract the add-on with
  BeeL. to use the domain.
- DOMAIN_NOT_VERIFIED: the email domains that apply are not verified, so emails go out from
  BeeL. Verify the domain with `POST /v1/accounts/{account_id}/email-domains/{email_domain_id}/verify`
  once its DNS records are published.
- NO_DOMAIN: neither the company nor the account has an email domain, so emails go out from
  BeeL. Register one with `POST /v1/accounts/{account_id}/email-domains`.
- BEEL_SELECTED: the company chose the address of BeeL. (`source` `BEEL`). Nothing to do.

Type: `string` — one of: CUSTOM_DOMAIN, ADDON_INACTIVE, DOMAIN_NOT_VERIFIED, NO_DOMAIN, BEEL_SELECTED


---

Full OpenAPI spec: https://docs.beel.es/api/openapi