> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fynn.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Replace the allowed recipient domains of a Sandbox

> Replaces the list of domains whose addresses get mail from this Sandbox besides the members of its organisation. Any domain is accepted, such as a domain used only for tests; public mailbox providers are refused. Requires the permission sandbox-mail-settings:write in a signed-in session; API tokens and service accounts are refused. Available in Sandbox environments only.

Needs the token of a person signed in to the app. API tokens of an environment, personal API tokens, OAuth access tokens and service accounts are refused.



## OpenAPI

````yaml assets/openapi-v2-organisation.json put /api/tenant/sandbox-mail-settings
openapi: 3.0.3
info:
  title: Fynn Organisation API
  version: 2026-11
  description: >-
    Your organisation groups the environments you work in: one or more Live
    environments, Sandboxes and Migration environments. Each environment has its
    own customers, contracts, invoices, settings, users and API tokens. This API
    lists organisations and environments, creates and deletes Sandbox and
    Migration environments, switches the environment a signed-in person works
    in, deletes data, transfers data between environments, starts a billing run
    on demand and manages what a Sandbox or Migration environment sends.


    Most of these routes change who works where or delete data, so they need a
    person signed in to the app; API tokens are refused there. The Sandbox
    recipient domains can be read and the suppressed messages listed with the
    API token of the environment as well.
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Test system
security:
  - SignedInUser: []
tags:
  - name: Organisationen
    description: Organisations and their environments.
  - name: Aktive Umgebung
    description: The environment a signed-in person works in.
  - name: Empfänger-Domains
    description: Domains a Sandbox may send mail to.
  - name: Zurückgehaltene Nachrichten
    description: What a Sandbox or Migration environment did not send.
  - name: Daten löschen
    description: Delete data sets of a Sandbox or Migration environment.
  - name: Umgebung löschen
    description: Delete a Sandbox or Migration environment.
  - name: Daten übertragen
    description: Transfer data between the environments of an organisation.
  - name: Abrechnung auf Abruf
    description: Bill a Sandbox or Migration environment on demand.
paths:
  /api/tenant/sandbox-mail-settings:
    put:
      tags:
        - Empfänger-Domains
      summary: Replace the allowed recipient domains of a Sandbox
      description: >-
        Replaces the list of domains whose addresses get mail from this Sandbox
        besides the members of its organisation. Any domain is accepted, such as
        a domain used only for tests; public mailbox providers are refused.
        Requires the permission sandbox-mail-settings:write in a signed-in
        session; API tokens and service accounts are refused. Available in
        Sandbox environments only.


        Needs the token of a person signed in to the app. API tokens of an
        environment, personal API tokens, OAuth access tokens and service
        accounts are refused.
      operationId: updateSandboxMailSettings
      parameters:
        - name: X-Fynn-Tenant-Id
          in: header
          required: false
          description: >-
            Identifier of the environment the request works in, for the token of
            a signed-in person. Without it the request works in the environment
            the person last switched into. An API token always works in its own
            environment.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSandboxMailSettingsRequest'
      responses:
        '200':
          description: The stored domains.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxMailSettingsView'
        '401':
          description: Missing or invalid authentication.
        '403':
          description: >-
            Missing permission sandbox-mail-settings:write, the request is no
            signed-in session, or no access to the environment named in the
            request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: >-
            The environment is no Sandbox
            (TENANT__SANDBOX_MAIL_SETTINGS_NOT_SANDBOX); the parameter
            environment names its kind.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '422':
          description: >-
            The list is invalid; each violation names allowedRecipientDomains or
            allowedRecipientDomains[i] and carries
            OUTBOUND__RECIPIENT_DOMAIN_INVALID,
            OUTBOUND__RECIPIENT_DOMAIN_PUBLIC_PROVIDER,
            OUTBOUND__RECIPIENT_DOMAINS_TOO_MANY or
            OUTBOUND__RECIPIENT_DOMAIN_DUPLICATE.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblem'
      security:
        - SignedInUser: []
components:
  schemas:
    UpdateSandboxMailSettingsRequest:
      description: >-
        The recipient domains a Sandbox may mail besides the members of its
        organisation.
      required:
        - allowedRecipientDomains
      properties:
        allowedRecipientDomains:
          description: >-
            The complete list of allowed domains, at most 20, each a plain
            domain such as firma.example (no @, no wildcard). Any domain is
            accepted, such as a domain used only for tests; public mailbox
            providers are not. Matched exactly: a subdomain needs its own entry.
            Stored in lower case, internationalised domains in their ASCII form.
            An empty list removes every domain.
          type: array
          items:
            type: string
          example:
            - firma.example
      type: object
    SandboxMailSettingsView:
      description: >-
        Who receives mail from this Sandbox besides the members of its
        organisation.
      properties:
        allowedRecipientDomains:
          description: >-
            Allowed recipient domains, in lower case, internationalised domains
            in their ASCII form.
          type: array
          items:
            type: string
          example:
            - firma.example
        recipientFilterActive:
          description: >-
            Whether mail of this Sandbox is limited to the members of the
            organisation and the allowed domains on this deployment. When false,
            every recipient gets the mail.
          type: boolean
      type: object
    Problem:
      type: object
      description: >-
        Error response. type is a fixed key your code can react to, detail a
        sentence you can show to your users. Some errors carry further fields,
        for example limit and count, reason, runId or missingDataSets.
      properties:
        status:
          type: integer
          description: HTTP status code.
        type:
          type: string
          description: Fixed key of the error.
          example: ORGANISATION__NOT_FOUND
        title:
          type: string
        detail:
          type: string
          description: What went wrong, as a sentence for your users.
        requestId:
          type: string
          description: Identifier of the request, for support enquiries.
      required:
        - status
        - type
      additionalProperties: true
    ValidationProblem:
      type: object
      description: >-
        A field of the request is invalid. Every violation names the field in
        propertyPath, the reason in message and a code: a readable key such as
        ORGANISATION__USERNAME_TAKEN, or a UUID for general format errors.
      properties:
        status:
          type: integer
          example: 422
        type:
          type: string
        title:
          type: string
        detail:
          type: string
        violations:
          type: array
          items:
            type: object
            properties:
              propertyPath:
                type: string
                example: username
              message:
                type: string
              code:
                type: string
                example: ORGANISATION__USERNAME_INVALID
            required:
              - propertyPath
              - message
              - code
        requestId:
          type: string
      required:
        - status
        - violations
  securitySchemes:
    SignedInUser:
      type: http
      scheme: bearer
      description: >-
        Token of a person signed in to the app. Send it as Authorization: Bearer
        <token>.

````