openapi: 3.1.0
info:
  title: Mailbox API
  description: |-
    Mailbox is a professional email service allowing you to create and manage email accounts using your own domain.
    It supports standard email protocols such as IMAP and SMTP, allowing access from most email clients (webmail, desktop or mobile applications).

    Mailbox also supports calendar and contact synchronization using CalDAV and CardDAV.

    ## Concepts

    Refer to our [dedicated concepts page](https://www.scaleway.com/en/docs/mailbox/concepts/) to find definitions of the different terms referring to Scaleway Mailbox.

    ## Quickstart

    ### Incoming and outgoing protocols

    - **Incoming server `IMAP`** — Read, update, and delete your emails
      - **Port:** 993
      - **Encryption:** SSL/TLS
      - **Hostname:** imap.{yourdomain}

    - **Incoming server `POP3`** — Download and manage your emails locally
      - **Port:** 995
      - **Encryption:** SSL/TLS
      - **Hostname:** pop3.{yourdomain}

    - **Outgoing server `SMTP`** — Send your emails
      - **Port:** 465
      - **Encryption:** SSL/TLS
      - **Hostname:** smtp.{yourdomain}

    ## Technical limitations

    ### Mailbox quotas

    - Mailbox storage: up to 20 GB per mailbox (for emails, attachments, and mailbox folders).
    - Number of Mailboxes: 20 Mailbox email accounts per project (during Beta phase). If you need to create more mailboxes, contact the [Scaleway Support team](https://console.scaleway.com/support/tickets/create?for=product&productName=mailbox&category=product).

    ### Message limits

    - `message` (the maximum number of messages that can be submitted per SMTP session): 10
    - `size` (the maximum size of a message): 104857600 bytes (100 MiB)
    - `received-headers` (the maximum number of received headers that a message can contain): 50

    ### Supported ESMTP extensions

    Mailbox SMTP relay supports the following [ESMTP extensions](https://www.iana.org/assignments/mail-parameters/mail-parameters.txt):

    - 8BITMIME
    - BINARYMIME
    - CHUNKING
    - ENHANCEDSTATUSCODES
    - NO-SOLICITING
    - PIPELINING
    - REQUIRETLS
    - SIZE 104857600
    - SMTPUTF8
    - STARTTLS

    ##  Going further

    For more information about Mailbox, you can check out the following pages:

    * [Mailbox Documentation](https://www.scaleway.com/en/docs/mailbox/)
    * [Scaleway Slack Community](https://scaleway-community.slack.com/) join the #mailbox-beta channel
    * [Contact our support team](https://console.scaleway.com/support/tickets/create?for=product&productName=mailbox&category=product).
  version: v1alpha1
servers:
- url: https://api.scaleway.com
tags:
- name: Domains
  description: |
    This section shows how to list, create and delete mailbox domains.
- name: Mailboxes
  description: |
    This section shows how to list, create and delete mailboxes.
components:
  schemas:
    scaleway.mailbox.v1alpha1.Alias:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the alias. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        email:
          type: string
          description: Email address of the alias as local_part@domain.
        mailbox_id:
          type: string
          description: ID of the mailbox to which the alias belongs. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        description:
          type: string
          description: Description of the alias.
        status:
          type: string
          description: Current status of the alias.
          enum:
          - unknown_status
          - provisioning
          - deleting
          - ready
          x-enum-descriptions:
            values:
              unknown_status: If unspecified, the status is unknown by default.
              provisioning: The alias is being provisioned.
              deleting: The alias is being deleted.
              ready: The alias is ready to use.
          default: unknown_status
        created_at:
          type: string
          description: Date and time of alias creation. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Date and time when the alias was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
      x-properties-order:
      - id
      - email
      - mailbox_id
      - description
      - status
      - created_at
      - updated_at
    scaleway.mailbox.v1alpha1.BatchCreateMailboxesRequest.MailboxParameters:
      type: object
      properties:
        local_part:
          type: string
        password:
          type: string
      x-properties-order:
      - local_part
      - password
    scaleway.mailbox.v1alpha1.BatchCreateMailboxesResponse:
      type: object
      properties:
        mailboxes:
          type: array
          description: Mailboxes created.
          items:
            $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox'
      x-properties-order:
      - mailboxes
    scaleway.mailbox.v1alpha1.Domain:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the domain. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        project_id:
          type: string
          description: ID of the Project to which the domain belongs. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        name:
          type: string
          description: Fully qualified domain name.
        status:
          type: string
          description: Status of the domain.
          enum:
          - unknown_status
          - creating
          - waiting_validation
          - validating
          - validation_failed
          - provisioning
          - ready
          - deleting
          x-enum-descriptions:
            values:
              unknown_status: If unspecified, the status is unknown by default.
              creating: The domain was just registered, but the validation records
                are not yet available.
              waiting_validation: The domain is registered but not yet validated.
              validating: The domain is in the process of validating.
              provisioning: The domain is validated and in the process of being provisioned.
              ready: The domain is ready to be used and accept mailbox creations.
              deleting: The domain is in the process of being deleted.
          default: unknown_status
        mailbox_total_count:
          type: integer
          description: Number of mailboxes of the domain.
          format: uint64
        created_at:
          type: string
          description: Date and time of domain creation. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Date and time of the domain's last update. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        webmail_url:
          type: string
          description: URL of the domain's webmail.
        imap_url:
          type: string
          description: URL of the domain's IMAP service.
        pop3_url:
          type: string
          description: URL of the domain's POP3 service.
        smtp_url:
          type: string
          description: URL of the domain's SMTP service.
      x-properties-order:
      - id
      - project_id
      - name
      - status
      - mailbox_total_count
      - created_at
      - updated_at
      - webmail_url
      - imap_url
      - pop3_url
      - smtp_url
    scaleway.mailbox.v1alpha1.Domain.Status:
      type: string
      enum:
      - unknown_status
      - creating
      - waiting_validation
      - validating
      - validation_failed
      - provisioning
      - ready
      - deleting
      x-enum-descriptions:
        values:
          unknown_status: If unspecified, the status is unknown by default.
          creating: The domain was just registered, but the validation records are
            not yet available.
          waiting_validation: The domain is registered but not yet validated.
          validating: The domain is in the process of validating.
          provisioning: The domain is validated and in the process of being provisioned.
          ready: The domain is ready to be used and accept mailbox creations.
          deleting: The domain is in the process of being deleted.
      default: unknown_status
    scaleway.mailbox.v1alpha1.GetDomainRecordsResponse:
      type: object
      properties:
        autoconfig:
          type: object
          description: Record designed to automatically configure an email client
            with the appropriate mail server settings using a standardized XML file
            format.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        autodiscover:
          type: object
          description: Record designed to automate the discovery of server settings
            to configure email clients like Outlook.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        caldav:
          type: object
          description: Record that allows clients to interact with calendar data stored
            on a server.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        carddav:
          type: object
          description: Record that allows clients to interact with contact data stored
            on a server.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        dkim:
          type: object
          description: Record that allows the DKIM email authentication method to
            be employed to verify the authenticity of an email message.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        dmarc:
          type: object
          description: Record that provides a mechanism for email receivers to determine
            if incoming messages are legitimate and were sent from authorized sources.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        domain_validation:
          type: object
          description: Record that provides a unique token to validate a domain ownership.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        imap:
          type: object
          description: Record that allows accessing the mailbox with the IMAP protocol.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        mx:
          type: object
          description: Record that directs emails to a mail server.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        pop3:
          type: object
          description: Record that allows accessing the mailbox with the POP3 protocol.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        spf:
          type: object
          description: Record that lists all the servers authorized to send emails
            from a particular domain.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
        submission:
          type: object
          description: Record that allows the use of the SMTP submission mechanism.
          properties:
            id:
              type: string
              description: Unique identifier of the DNS record. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            domain_id:
              type: string
              description: ID of the domain to which the record belongs. (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
            status:
              type: string
              description: Status of the record.
              enum:
              - unknown_status
              - validating
              - valid
              - invalid
              - not_found
              x-enum-descriptions:
                values:
                  unknown_status: If unspecified, the status is unknown by default.
                  validating: The record is in the process of being validated.
                  valid: The record is found in the domain's DNS zone and is valid.
                  invalid: The record is found in the domain's DNS zone, but it is
                    not valid.
                  not_found: The record cannot be found in the domain's DNS zone.
              default: unknown_status
            level:
              type: string
              description: Level of requirement of the record.
              enum:
              - unknown_level
              - required
              - recommended
              - optional
              x-enum-descriptions:
                values:
                  unknown_level: If unspecified, the record level is unknown by default.
                  required: A record is required to validate the domain.
                  recommended: A record is recommended.
                  optional: A record is optional.
              default: unknown_level
            dns_type:
              type: string
              description: DNS type of the record.
              enum:
              - unknown_dns_type
              - cname_dns_type
              - mx_dns_type
              - srv_dns_type
              - txt_dns_type
              x-enum-descriptions:
                values:
                  unknown_dns_type: If unspecified, the record's DNS type is unknown
                    by default.
                  cname_dns_type: CNAME DNS record type.
                  mx_dns_type: MX DNS record type.
                  srv_dns_type: SRV DNS record type.
                  txt_dns_type: TXT DNS record type.
              default: unknown_dns_type
            dns_name:
              type: string
              description: DNS name of the record.
            dns_value:
              type: string
              description: DNS value of the record.
            error:
              type: string
              description: Error associated in case the record is not valid.
              nullable: true
            created_at:
              type: string
              description: Date and time of record creation. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date and time of record last updated. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - domain_id
          - status
          - level
          - dns_type
          - dns_name
          - dns_value
          - error
          - created_at
          - updated_at
      x-properties-order:
      - autoconfig
      - autodiscover
      - caldav
      - carddav
      - dkim
      - dmarc
      - domain_validation
      - imap
      - mx
      - pop3
      - spf
      - submission
    scaleway.mailbox.v1alpha1.ListDomainsRequest.OrderBy:
      type: string
      enum:
      - created_at_desc
      - created_at_asc
      - updated_at_desc
      - updated_at_asc
      - name_desc
      - name_asc
      - mailbox_total_count_desc
      - mailbox_total_count_asc
      x-enum-descriptions:
        values:
          created_at_desc: Order by creation date (descending chronological order).
          created_at_asc: Order by creation date (ascending chronological order).
          updated_at_desc: Order by last update date (descending chronological order).
          updated_at_asc: Order by last update date (ascending chronological order).
          name_desc: Order by name (descending alphabetical order).
          name_asc: Order by name (ascending alphabetical order).
          mailbox_total_count_desc: Order by mailbox total count (descending numerical
            order).
          mailbox_total_count_asc: Order by name (ascending numerical order).
      default: created_at_desc
    scaleway.mailbox.v1alpha1.ListDomainsResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Number of domains that match the request (without pagination).
          format: uint64
        domains:
          type: array
          description: Single page of domains matching the requested criteria.
          items:
            $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Domain'
      x-properties-order:
      - total_count
      - domains
    scaleway.mailbox.v1alpha1.ListMailboxesResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Number of mailboxes that match the request (without pagination).
          format: uint64
        mailboxes:
          type: array
          description: Mailboxes matching the requested criteria.
          items:
            $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox'
      x-properties-order:
      - total_count
      - mailboxes
    scaleway.mailbox.v1alpha1.Mailbox:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the mailbox. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        domain_id:
          type: string
          description: ID of the domain to which the mailbox belongs. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        email:
          type: string
          description: Email address of the mailbox as local_part@domain.
        status:
          type: string
          description: Status of the mailbox.
          enum:
          - unknown_status
          - creating
          - waiting_payment
          - waiting_domain
          - ready
          - deletion_scheduled
          - locked
          - renewing
          - deleting
          - restoring
          - payment_failed
          x-enum-descriptions:
            values:
              unknown_status: If unspecified, the status is unknown by default.
              creating: The mailbox is being created.
              waiting_payment: The mailbox is waiting for payment.
              waiting_domain: The mailbox is waiting for the domain to be properly
                configured.
              ready: The mailbox is ready to use.
              deletion_scheduled: The mailbox is planned to be deleted.
              locked: The mailbox is locked (e.g billing issue)
              renewing: The mailbox is renewing the payment for a new period.
              payment_failed: The payment of the mailbox failed.
          default: unknown_status
        subscription_period:
          type: string
          description: Subscription renewal period, it can be monthly, yearly or canceled
            if the subscription has been canceled.
          enum:
          - unknown_subscription_period
          - canceled
          - monthly
          - yearly
          x-enum-descriptions:
            values:
              unknown_subscription_period: If unspecified, the subscription period
                is unknown by default.
              canceled: The subscription has been canceled.
              monthly: The subscription is monthly.
              yearly: The subscription is yearly.
          default: unknown_subscription_period
        subscription_period_started_at:
          type: string
          description: Date and time of subscription period start. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        next_subscription_period:
          type: string
          description: Next subscription renewal period, it can be monthly or yearly
            or canceled if the subscription has been canceled.
          enum:
          - unknown_subscription_period
          - canceled
          - monthly
          - yearly
          x-enum-descriptions:
            values:
              unknown_subscription_period: If unspecified, the subscription period
                is unknown by default.
              canceled: The subscription has been canceled.
              monthly: The subscription is monthly.
              yearly: The subscription is yearly.
          default: unknown_subscription_period
        next_subscription_period_starts_at:
          type: string
          description: Date and time when the next subscription period starts. (RFC
            3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        created_at:
          type: string
          description: Date and time of mailbox creation. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Date and time when the mailbox was last updated. (RFC 3339
            format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        deletion_scheduled_at:
          type: string
          description: Date and time of the unrecoverable mailbox deletion. (RFC 3339
            format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
      x-properties-order:
      - id
      - domain_id
      - email
      - status
      - subscription_period
      - subscription_period_started_at
      - next_subscription_period
      - next_subscription_period_starts_at
      - created_at
      - updated_at
      - deletion_scheduled_at
    scaleway.mailbox.v1alpha1.Mailbox.Status:
      type: string
      enum:
      - unknown_status
      - creating
      - waiting_payment
      - waiting_domain
      - ready
      - deletion_scheduled
      - locked
      - renewing
      - deleting
      - restoring
      - payment_failed
      x-enum-descriptions:
        values:
          unknown_status: If unspecified, the status is unknown by default.
          creating: The mailbox is being created.
          waiting_payment: The mailbox is waiting for payment.
          waiting_domain: The mailbox is waiting for the domain to be properly configured.
          ready: The mailbox is ready to use.
          deletion_scheduled: The mailbox is planned to be deleted.
          locked: The mailbox is locked (e.g billing issue)
          renewing: The mailbox is renewing the payment for a new period.
          payment_failed: The payment of the mailbox failed.
      default: unknown_status
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /mailbox/v1alpha1/batch-create-mailboxes:
    post:
      tags:
      - Mailboxes
      operationId: BatchCreateMailboxes
      summary: Create one or more mailboxes.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.BatchCreateMailboxesResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mailboxes:
                  type: array
                  description: Parameters for the mailboxes to create.
                  items:
                    $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.BatchCreateMailboxesRequest.MailboxParameters'
                domain_id:
                  type: string
                  description: ID of the domain in which to create the mailboxes.
                    (UUID format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                subscription_period:
                  type: string
                  description: Subscription renewal period, it can be monthly or yearly.
                  enum:
                  - unknown_subscription_period
                  - canceled
                  - monthly
                  - yearly
                  x-enum-descriptions:
                    values:
                      unknown_subscription_period: If unspecified, the subscription
                        period is unknown by default.
                      canceled: The subscription has been canceled.
                      monthly: The subscription is monthly.
                      yearly: The subscription is yearly.
                  default: unknown_subscription_period
              x-properties-order:
              - mailboxes
              - domain_id
              - subscription_period
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"domain_id":"6170692e-7363-616c-6577-61792e636f6d"}' \
            "https://api.scaleway.com/mailbox/v1alpha1/batch-create-mailboxes"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/mailbox/v1alpha1/batch-create-mailboxes" \
            X-Auth-Token:$SCW_SECRET_KEY \
            domain_id="6170692e-7363-616c-6577-61792e636f6d"
  /mailbox/v1alpha1/domains:
    get:
      tags:
      - Domains
      operationId: ListDomains
      summary: List domains in an organization.
      description: The return list can be filtered with request parameters.
      parameters:
      - in: query
        name: order_by
        schema:
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.ListDomainsRequest.OrderBy'
      - in: query
        name: page
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      - in: query
        name: project_id
        description: (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: statuses
        schema:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Domain.Status'
      - in: query
        name: search
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.ListDomainsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/mailbox/v1alpha1/domains"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/mailbox/v1alpha1/domains" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Domains
      operationId: CreateDomain
      summary: Register a domain in a project.
      description: You must specify a `project_id` and a `domain_name` to register
        a domain in a specific Project.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Domain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: ID of the project to which the domain belongs. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                name:
                  type: string
                  description: Fully qualified domain name.
              x-properties-order:
              - project_id
              - name
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"name":"string","project_id":"6170692e-7363-616c-6577-61792e636f6d"}' \
            "https://api.scaleway.com/mailbox/v1alpha1/domains"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/mailbox/v1alpha1/domains" \
            X-Auth-Token:$SCW_SECRET_KEY \
            name="string" \
            project_id="6170692e-7363-616c-6577-61792e636f6d"
  /mailbox/v1alpha1/domains/{domain_id}:
    get:
      tags:
      - Domains
      operationId: GetDomain
      summary: Get a domain by its ID.
      parameters:
      - in: path
        name: domain_id
        description: ID of the domain to get. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Domain'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/mailbox/v1alpha1/domains/{domain_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/mailbox/v1alpha1/domains/{domain_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Domains
      operationId: DeleteDomain
      summary: Delete a domain by its ID.
      parameters:
      - in: path
        name: domain_id
        description: ID of the domain to delete. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Domain'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/mailbox/v1alpha1/domains/{domain_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/mailbox/v1alpha1/domains/{domain_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /mailbox/v1alpha1/domains/{domain_id}/records:
    get:
      tags:
      - Domains
      operationId: GetDomainRecords
      summary: Get domain records by its ID.
      parameters:
      - in: path
        name: domain_id
        description: (Optional) ID of the domain in which to get the records. (UUID
          format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.GetDomainRecordsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/mailbox/v1alpha1/domains/{domain_id}/records"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/mailbox/v1alpha1/domains/{domain_id}/records" \
            X-Auth-Token:$SCW_SECRET_KEY
  /mailbox/v1alpha1/domains/{domain_id}/validate-records:
    post:
      tags:
      - Domains
      operationId: ValidateDomainRecords
      summary: Validate domain records by its ID.
      parameters:
      - in: path
        name: domain_id
        description: ID of the domain with which to validate the records. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "204":
          description: ""
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/mailbox/v1alpha1/domains/{domain_id}/validate-records"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/mailbox/v1alpha1/domains/{domain_id}/validate-records" \
            X-Auth-Token:$SCW_SECRET_KEY
  /mailbox/v1alpha1/mailboxes:
    get:
      tags:
      - Mailboxes
      operationId: ListMailboxes
      summary: List mailboxes in an organization.
      description: The return list can be filtered with request parameters.
      parameters:
      - in: query
        name: order_by
        description: Order matching mailbox by different criteria.
        schema:
          type: string
          enum:
          - created_at_desc
          - created_at_asc
          - updated_at_desc
          - updated_at_asc
          - email_desc
          - email_asc
          default: created_at_desc
      - in: query
        name: page
        description: Requested page number. Value must be greater or equal to 1.
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Requested page size. Value must be between 1 and 1000.
        schema:
          type: integer
          format: uint32
      - in: query
        name: domain_id
        description: (Optional) ID of the domain in which to list the mailboxes. (UUID
          format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: statuses
        description: (Optional) Filter mailboxes by their statuses.
        schema:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox.Status'
      - in: query
        name: search
        description: (Optional) Search term to filter mailboxes on name and local_part.
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.ListMailboxesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/mailbox/v1alpha1/mailboxes"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/mailbox/v1alpha1/mailboxes" \
            X-Auth-Token:$SCW_SECRET_KEY
  /mailbox/v1alpha1/mailboxes/{mailbox_id}:
    get:
      tags:
      - Mailboxes
      operationId: GetMailbox
      summary: Get a mailbox by its ID.
      parameters:
      - in: path
        name: mailbox_id
        description: ID of the mailbox to get. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/mailbox/v1alpha1/mailboxes/{mailbox_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/mailbox/v1alpha1/mailboxes/{mailbox_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Mailboxes
      operationId: UpdateMailbox
      summary: Update a mailbox subscription period or password with its ID.
      parameters:
      - in: path
        name: mailbox_id
        description: ID of the mailbox to update. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                subscription_period:
                  type: string
                  description: (Optional) New subscription period for the mailbox.
                  enum:
                  - unknown_subscription_period
                  - canceled
                  - monthly
                  - yearly
                  x-enum-descriptions:
                    values:
                      unknown_subscription_period: If unspecified, the subscription
                        period is unknown by default.
                      canceled: The subscription has been canceled.
                      monthly: The subscription is monthly.
                      yearly: The subscription is yearly.
                  default: unknown_subscription_period
                new_password:
                  type: string
                  description: (Optional) New password of the mailbox.
                  nullable: true
              x-properties-order:
              - subscription_period
              - new_password
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/mailbox/v1alpha1/mailboxes/{mailbox_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/mailbox/v1alpha1/mailboxes/{mailbox_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Mailboxes
      operationId: DeleteMailbox
      summary: Delete a mailbox by its ID.
      parameters:
      - in: path
        name: mailbox_id
        description: ID of the mailbox to delete. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/mailbox/v1alpha1/mailboxes/{mailbox_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/mailbox/v1alpha1/mailboxes/{mailbox_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /mailbox/v1alpha1/mailboxes/{mailbox_id}/aliases:
    post:
      tags:
      - Mailboxes
      operationId: CreateAlias
      summary: Create an alias for a mailbox.
      parameters:
      - in: path
        name: mailbox_id
        description: ID of the mailbox to associate with the alias. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Alias'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                local_part:
                  type: string
                  description: Local part of the email address (e.g. local_part@domain.com).
                description:
                  type: string
                  description: (Optional) Description of the alias.
                  nullable: true
              x-properties-order:
              - local_part
              - description
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"local_part":"string"}' \
            "https://api.scaleway.com/mailbox/v1alpha1/mailboxes/{mailbox_id}/aliases"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/mailbox/v1alpha1/mailboxes/{mailbox_id}/aliases" \
            X-Auth-Token:$SCW_SECRET_KEY \
            local_part="string"
  /mailbox/v1alpha1/mailboxes/{mailbox_id}/restore:
    post:
      tags:
      - Mailboxes
      operationId: RestoreMailbox
      summary: Restore a mailbox in deletion scheduled status by its ID.
      parameters:
      - in: path
        name: mailbox_id
        description: ID of the mailbox to restore. (UUID format)
        required: true
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/mailbox/v1alpha1/mailboxes/{mailbox_id}/restore"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/mailbox/v1alpha1/mailboxes/{mailbox_id}/restore" \
            X-Auth-Token:$SCW_SECRET_KEY
