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

> ## Agent Instructions
> Mono is an AI platform for small and medium-sized firms in Switzerland, Germany, Austria and Italy. Answer in the reader's language. Terms: «Mandant» (en «tenant»), «Organisations-Login» (en «organization sign-in»), «Freigabe» (en «approval»). Reading needs no approval; every write waits for one. Never suggest pasting a key or token into a chat.

# E-Mail-Versand: die Absender, ihr Zustand und welche Mail über welchen Absender geht

> E-Mail-Versand: die Absender, ihr Zustand und welche Mail über welchen Absender geht.

Im Chat mit «Mono Admin»: `betrieb_status`.



## OpenAPI

````yaml /api-reference/openapi.json get /mandanten/{id}/mail
openapi: 3.1.0
info:
  title: Console-API des Node
  version: v1
  summary: Die API, mit der die Mono Console einen Node liest und ändert.
  description: >-
    Jeder Node hat diese API unter `/api/v1`. Die Mono Console, die Desktop-App
    und «Mono Admin» im Chat nutzen dieselben Regeln und dasselbe Audit.


    **Anmeldung:** Jede Anfrage trägt einen Bearer-Token, den der Node selbst
    ausstellt (OpenID Connect mit PKCE, Client `mono-console`). Ein Token gilt
    für die Person: Sie sehen und ändern nur, was diese Person darf.


    **Antworten:** JSON. Eine Ablehnung ist `{ error, message }` mit einem Satz
    auf Deutsch. Jede Änderung steht im Audit, nie ein Inhalt.


    Diese Referenz ist aus dem Code erzeugt (`pnpm docs:gen`). Eine Antwort oder
    ein Körper ohne Schema heisst: Der Code beweist die Form nicht an einer
    Stelle, die der Generator lesen kann.
servers:
  - url: https://ki.muster.example/api/v1
    description: 'Ein Node (Beispiel: Muster AG)'
  - url: http://127.0.0.1:8787/api/v1
    description: Ein Node auf diesem Gerät (`pnpm dev:gateway`)
security:
  - bearer: []
tags:
  - name: Übersicht
    x-displayName: Übersicht
    description: >-
      Wer angemeldet ist, die MCP-Server, die Einrichtung und die gemessenen
      Kennzahlen.
  - name: Inbox
    x-displayName: Inbox
    description: >-
      Freigaben, «Immer erlauben» und die Aufgaben auf den Geräten des
      Mandanten.
  - name: Studio
    x-displayName: Studio
    description: Standard-Apps, eigene Apps, Skill-Packs und die CI.
  - name: Konnektoren
    x-displayName: Konnektoren
    description: >-
      Microsoft 365 und Google Workspace, Systeme über ihre Adresse und die Mono
      Connectors.
  - name: Zugriff
    x-displayName: Zugriff
    description: >-
      Anmeldung, Gruppen und Rollen, Einladungen und die Kunden eines
      IT-Partners.
  - name: Gateway
    x-displayName: Gateway
    description: KI-Clients, Tools, Modelle, Datenwege, Kosten, Kanäle und das Audit.
  - name: Betrieb
    x-displayName: Betrieb
    description: Updates, die eigene Adresse, das Netzwerk und die Mandantennotizen.
  - name: Profil
    x-displayName: Profil
    description: 'Das eigene Konto der Person: Zustimmungen, Sprache, Foto und Passkeys.'
paths:
  /mandanten/{id}/mail:
    get:
      tags:
        - Betrieb
      summary: >-
        E-Mail-Versand: die Absender, ihr Zustand und welche Mail über welchen
        Absender geht
      description: >-
        E-Mail-Versand: die Absender, ihr Zustand und welche Mail über welchen
        Absender geht.


        Im Chat mit «Mono Admin»: `betrieb_status`.
      operationId: getMandantenByIdMail
      parameters:
        - name: id
          in: path
          required: true
          description: Der Mandant (seine ID auf diesem Node).
          schema:
            type: string
          example: muster-ag
      responses:
        '200':
          description: Erfolgreich.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MailVersandResponse'
        '401':
          $ref: '#/components/responses/Fehler401'
        '403':
          $ref: '#/components/responses/Fehler403'
        '404':
          $ref: '#/components/responses/Fehler404'
components:
  schemas:
    MailVersandResponse:
      type: object
      properties:
        mailVersand:
          type: object
          properties:
            mandant:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
              additionalProperties: false
            canEdit:
              type: boolean
            lock:
              type:
                - string
                - 'null'
            way:
              type: string
            monoWay:
              type: boolean
            senders:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  kind:
                    type: string
                    enum:
                      - smtp
                      - m365
                      - google
                      - http
                  name:
                    type: string
                  from:
                    type: array
                    items:
                      type: string
                  state:
                    type: string
                    enum:
                      - entwurf
                      - test-fehlt
                      - live
                      - dns-pruefen
                      - gestoert
                  reason:
                    type:
                      - string
                      - 'null'
                  action:
                    type: string
                    enum:
                      - test
                      - key
                      - dns
                      - none
                      - consent
                      - scope
                      - signin
                  classes:
                    type: array
                    items:
                      type: string
                      enum:
                        - person
                        - admin
                        - external
                  smtp:
                    anyOf:
                      - type: object
                        properties:
                          host:
                            type: string
                            minLength: 1
                            maxLength: 253
                          port:
                            anyOf:
                              - type: number
                                const: 587
                              - type: number
                                const: 465
                          user:
                            type: string
                            maxLength: 200
                          connector:
                            type: string
                            minLength: 1
                            maxLength: 64
                          ca:
                            type: boolean
                        required:
                          - host
                          - port
                          - ca
                        additionalProperties: false
                      - type: 'null'
                  keySet:
                    type: boolean
                  device:
                    type:
                      - string
                      - 'null'
                  keyLabel:
                    type: string
                  internalOnly:
                    type: boolean
                  perMinute:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                  lastTest:
                    anyOf:
                      - type: object
                        properties:
                          ok:
                            type: boolean
                          at:
                            type: string
                            minLength: 1
                          ms:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          status:
                            anyOf:
                              - type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              - type: 'null'
                          ref:
                            type:
                              - string
                              - 'null'
                          text:
                            type: string
                          detail:
                            type: string
                            maxLength: 300
                        required:
                          - ok
                          - at
                          - ms
                          - status
                          - ref
                          - text
                        additionalProperties: false
                      - type: 'null'
                  passed:
                    type: boolean
                  domains:
                    type: array
                    items:
                      type: object
                      properties:
                        domain:
                          type: string
                        at:
                          type: string
                          minLength: 1
                        rows:
                          type: array
                          items:
                            type: object
                            properties:
                              record:
                                type: string
                                enum:
                                  - spf
                                  - dkim
                                  - dmarc
                              state:
                                type: string
                                enum:
                                  - ok
                                  - hinweis
                                  - fehlt
                                  - fehler
                              text:
                                type: string
                              found:
                                type:
                                  - string
                                  - 'null'
                              add:
                                anyOf:
                                  - type: object
                                    properties:
                                      name:
                                        type: string
                                      type:
                                        type: string
                                        enum:
                                          - TXT
                                          - CNAME
                                      value:
                                        type: string
                                    required:
                                      - name
                                      - type
                                      - value
                                    additionalProperties: false
                                  - type: 'null'
                            required:
                              - record
                              - state
                              - text
                              - found
                              - add
                            additionalProperties: false
                        aligned:
                          type: boolean
                        hoster:
                          anyOf:
                            - type: object
                              properties:
                                name:
                                  type: string
                                menu:
                                  type: string
                                docs:
                                  type: string
                              required:
                                - name
                                - menu
                                - docs
                              additionalProperties: false
                            - type: 'null'
                        received:
                          type: object
                          properties:
                            state:
                              type: string
                              enum:
                                - waiting
                                - received
                            spf:
                              type: string
                              enum:
                                - pass
                                - fail
                                - none
                            dkim:
                              type: string
                              enum:
                                - pass
                                - fail
                                - none
                            dkimSelector:
                              type: string
                              maxLength: 63
                            dmarc:
                              type: string
                              enum:
                                - pass
                                - fail
                                - none
                            tls:
                              type: boolean
                            at:
                              type: string
                              minLength: 1
                          required:
                            - state
                          additionalProperties: false
                      required:
                        - domain
                        - at
                        - rows
                        - aligned
                        - hoster
                      additionalProperties: false
                  m365:
                    anyOf:
                      - type: object
                        properties:
                          mailbox:
                            type: string
                          scope:
                            type: string
                            enum:
                              - ungeprueft
                              - fehlt
                              - offen
                              - bewiesen
                          consented:
                            type: boolean
                          lines:
                            type: array
                            items:
                              type: string
                          removal:
                            type:
                              - string
                              - 'null'
                          at:
                            anyOf:
                              - type: string
                                minLength: 1
                              - type: 'null'
                        required:
                          - mailbox
                          - scope
                          - consented
                          - lines
                          - removal
                          - at
                        additionalProperties: false
                      - type: 'null'
                  google:
                    anyOf:
                      - type: object
                        properties:
                          account:
                            type:
                              - string
                              - 'null'
                        required:
                          - account
                        additionalProperties: false
                      - type: 'null'
                  http:
                    anyOf:
                      - type: object
                        properties:
                          url:
                            type: string
                          auth:
                            type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - bearer
                                  - header
                                  - basic
                              header:
                                type: string
                                pattern: ^[A-Za-z][A-Za-z0-9-]{0,62}$
                              user:
                                type: string
                                maxLength: 200
                            required:
                              - kind
                            additionalProperties: false
                          mapping:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties:
                              type: string
                          region:
                            type: string
                            enum:
                              - ch
                              - eu
                              - other
                          events:
                            anyOf:
                              - type: object
                                properties:
                                  url:
                                    type: string
                                  mode:
                                    type: string
                                    enum:
                                      - hmac
                                      - token
                                  header:
                                    type: string
                                  secretSet:
                                    type: boolean
                                required:
                                  - url
                                  - mode
                                  - header
                                  - secretSet
                                additionalProperties: false
                              - type: 'null'
                        required:
                          - url
                          - auth
                          - mapping
                          - region
                          - events
                        additionalProperties: false
                      - type: 'null'
                  carries:
                    type: string
                    enum:
                      - oeffentlich
                      - intern
                      - vertraulich
                  migrated:
                    type: boolean
                  kanaele:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                      required:
                        - id
                        - name
                      additionalProperties: false
                required:
                  - id
                  - kind
                  - name
                  - from
                  - state
                  - reason
                  - action
                  - classes
                  - smtp
                  - keySet
                  - keyLabel
                  - internalOnly
                  - perMinute
                  - lastTest
                  - domains
                  - migrated
                  - kanaele
                additionalProperties: false
            identities:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  senderId:
                    type: string
                  from:
                    type: string
                    format: email
                    pattern: >-
                      ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                  name:
                    type: string
                    maxLength: 120
                  replyTo:
                    type: string
                    format: email
                    pattern: >-
                      ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                  classes:
                    minItems: 1
                    type: array
                    items:
                      type: string
                      enum:
                        - person
                        - admin
                        - external
                  archive:
                    type: string
                    format: email
                    pattern: >-
                      ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                  sendAs:
                    maxItems: 40
                    type: array
                    items:
                      type: string
                  maxClass:
                    type: string
                    enum:
                      - oeffentlich
                      - intern
                      - vertraulich
                  uses:
                    maxItems: 2
                    type: array
                    items:
                      type: string
                      enum:
                        - apps
                        - people
                required:
                  - id
                  - senderId
                  - from
                  - classes
                additionalProperties: false
            routes:
              type: object
              properties:
                rows:
                  maxItems: 60
                  type: array
                  items:
                    type: object
                    properties:
                      cls:
                        type: string
                        enum:
                          - person
                          - admin
                          - external
                      identity:
                        type: string
                        minLength: 1
                      kinds:
                        maxItems: 40
                        type: array
                        items:
                          type: string
                      fuer:
                        maxItems: 20
                        type: array
                        items:
                          type: string
                    required:
                      - cls
                      - identity
                    additionalProperties: false
                fallback:
                  type: object
                  properties:
                    person:
                      type: string
                      enum:
                        - mono
                        - never
                    admin:
                      type: string
                      enum:
                        - mono
                        - never
                  required:
                    - person
                    - admin
                  additionalProperties: false
              required:
                - rows
                - fallback
              additionalProperties: false
            summary:
              type: array
              items:
                type: object
                properties:
                  cls:
                    type: string
                    enum:
                      - security
                      - person
                      - admin
                      - external
                  identity:
                    type:
                      - string
                      - 'null'
                  way:
                    type: string
                required:
                  - cls
                  - identity
                  - way
                additionalProperties: false
            counts:
              type: object
              properties:
                sent:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                waiting:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                handed:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                failed:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - sent
                - waiting
                - handed
                - failed
              additionalProperties: false
            testTo:
              type:
                - string
                - 'null'
            domains:
              type: array
              items:
                type: string
            devices:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                required:
                  - id
                  - name
                additionalProperties: false
          required:
            - mandant
            - canEdit
            - lock
            - way
            - monoWay
            - senders
            - identities
            - routes
            - summary
            - counts
            - testTo
            - domains
          additionalProperties: false
      required:
        - mailVersand
      additionalProperties: false
    Fehler:
      type: object
      description: >-
        Eine Ablehnung: ein fester Code und ein Satz auf Deutsch, der sagt, was
        zu tun ist.
      properties:
        error:
          type: string
          description: Der Code (`not_found`, `forbidden`, `invalid_input` …).
          examples:
            - forbidden
        message:
          type: string
          description: Der Grund in Worten.
          examples:
            - Nur für Admins dieses Mandanten
        reason:
          type: string
          description: Ein fester Code für den Grund, wo es einen gibt.
          examples:
            - admins_only
      required:
        - error
        - message
  responses:
    Fehler401:
      description: 'Anmeldung nötig: Der Bearer-Token fehlt oder gilt nicht mehr.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
    Fehler403:
      description: Die Person darf das nicht (zum Beispiel nur Admins des Mandanten).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
    Fehler404:
      description: Das Objekt ist auf diesem Node nicht bekannt.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Ein Access-Token des Node. Die Console holt ihn über die Anmeldung des
        Node (`/oauth/authorize`, PKCE, Client `mono-console`); in der
        Entwicklung nimmt ein Node mit Dev-Anmeldung auch einen Dev-Token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.