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:
          description: Current status of the alias.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Alias.Status'
        created_at:
          type:
          - string
          - "null"
          description: Date and time of alias creation. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date and time when the alias was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
      x-properties-order:
      - id
      - email
      - mailbox_id
      - description
      - status
      - created_at
      - updated_at
    scaleway.mailbox.v1alpha1.Alias.Status:
      type: string
      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
    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:
          description: Status of the domain.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Domain.Status'
        mailbox_total_count:
          type: integer
          description: Number of mailboxes of the domain.
          format: uint64
        created_at:
          type:
          - string
          - "null"
          description: Date and time of domain creation. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date and time of the domain's last update. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        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.DomainRecord:
      type: object
      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:
          description: Status of the record.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord.Status'
        level:
          description: Level of requirement of the record.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord.Level'
        dns_type:
          description: DNS type of the record.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord.DNSType'
        dns_name:
          type: string
          description: DNS name of the record.
        dns_value:
          type: string
          description: DNS value of the record.
        error:
          type:
          - string
          - "null"
          description: Error associated in case the record is not valid.
        created_at:
          type:
          - string
          - "null"
          description: Date and time of record creation. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date and time of record last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
      x-properties-order:
      - id
      - domain_id
      - status
      - level
      - dns_type
      - dns_name
      - dns_value
      - error
      - created_at
      - updated_at
    scaleway.mailbox.v1alpha1.DomainRecord.DNSType:
      type: string
      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
    scaleway.mailbox.v1alpha1.DomainRecord.Level:
      type: string
      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
    scaleway.mailbox.v1alpha1.DomainRecord.Status:
      type: string
      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
    scaleway.mailbox.v1alpha1.GetDomainRecordsResponse:
      type: object
      properties:
        autoconfig:
          description: Record designed to automatically configure an email client
            with the appropriate mail server settings using a standardized XML file
            format.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        autodiscover:
          description: Record designed to automate the discovery of server settings
            to configure email clients like Outlook.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        caldav:
          description: Record that allows clients to interact with calendar data stored
            on a server.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        carddav:
          description: Record that allows clients to interact with contact data stored
            on a server.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        dkim:
          description: Record that allows the DKIM email authentication method to
            be employed to verify the authenticity of an email message.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        dmarc:
          description: Record that provides a mechanism for email receivers to determine
            if incoming messages are legitimate and were sent from authorized sources.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        domain_validation:
          description: Record that provides a unique token to validate a domain ownership.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        imap:
          description: Record that allows accessing the mailbox with the IMAP protocol.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        mx:
          description: Record that directs emails to a mail server.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        pop3:
          description: Record that allows accessing the mailbox with the POP3 protocol.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        spf:
          description: Record that lists all the servers authorized to send emails
            from a particular domain.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
        submission:
          description: Record that allows the use of the SMTP submission mechanism.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.DomainRecord'
      x-properties-order:
      - autoconfig
      - autodiscover
      - caldav
      - carddav
      - dkim
      - dmarc
      - domain_validation
      - imap
      - mx
      - pop3
      - spf
      - submission
    scaleway.mailbox.v1alpha1.ListAliasesRequest.OrderBy:
      type: string
      enum:
      - created_at_desc
      - created_at_asc
      - updated_at_desc
      - updated_at_asc
      - name_desc
      - name_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).
      default: created_at_desc
    scaleway.mailbox.v1alpha1.ListAliasesResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Number of aliases that match the request (without pagination).
          format: uint64
        aliases:
          type: array
          description: Single page of aliases matching the requested criteria.
          items:
            $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Alias'
      x-properties-order:
      - total_count
      - aliases
    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.ListMailboxesRequest.OrderBy:
      type: string
      enum:
      - created_at_desc
      - created_at_asc
      - updated_at_desc
      - updated_at_asc
      - email_desc
      - email_asc
      default: created_at_desc
    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:
          description: Status of the mailbox.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox.Status'
        subscription_period:
          description: Subscription renewal period, it can be monthly, yearly or canceled
            if the subscription has been canceled.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox.SubscriptionPeriod'
        subscription_period_started_at:
          type:
          - string
          - "null"
          description: Date and time of subscription period start. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        next_subscription_period:
          description: Next subscription renewal period, it can be monthly or yearly
            or canceled if the subscription has been canceled.
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox.SubscriptionPeriod'
        next_subscription_period_starts_at:
          type:
          - string
          - "null"
          description: Date and time when the next subscription period starts. (RFC
            3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        created_at:
          type:
          - string
          - "null"
          description: Date and time of mailbox creation. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Date and time when the mailbox was last updated. (RFC 3339
            format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        deletion_scheduled_at:
          type:
          - string
          - "null"
          description: Date and time of the unrecoverable mailbox deletion. (RFC 3339
            format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
      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
    scaleway.mailbox.v1alpha1.Mailbox.SubscriptionPeriod:
      type: string
      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
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /mailbox/v1alpha1/aliases:
    get:
      tags:
      - Mailboxes
      operationId: ListAliases
      summary: List aliases for a mailbox.
      parameters:
      - in: query
        name: order_by
        description: Order aliases by specific criteria.
        schema:
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.ListAliasesRequest.OrderBy'
      - 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 100.
        schema:
          type: integer
          format: uint32
      - in: query
        name: mailbox_id
        description: ID of the mailbox for which to list aliases. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: status
        description: (Optional) Filter aliases by their status.
        schema:
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Alias.Status'
      - in: query
        name: project_id
        description: Project ID to filter on. (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.ListAliasesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/mailbox/v1alpha1/aliases?project_id=6170692e-7363-616c-6577-61792e636f6d"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/mailbox/v1alpha1/aliases" \
            X-Auth-Token:$SCW_SECRET_KEY \
            project_id==6170692e-7363-616c-6577-61792e636f6d
    post:
      tags:
      - Mailboxes
      operationId: CreateAlias
      summary: Create an alias for a mailbox.
      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).
                mailbox_id:
                  type: string
                  description: ID of the mailbox to associate with the alias. (UUID
                    format)
                  example: 6170692e-7363-616c-6577-61792e636f6d
                description:
                  type:
                  - string
                  - "null"
                  description: (Optional) Description of the alias.
              x-properties-order:
              - local_part
              - mailbox_id
              - 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","mailbox_id":"6170692e-7363-616c-6577-61792e636f6d"}' \
            "https://api.scaleway.com/mailbox/v1alpha1/aliases"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/mailbox/v1alpha1/aliases" \
            X-Auth-Token:$SCW_SECRET_KEY \
            local_part="string" \
            mailbox_id="6170692e-7363-616c-6577-61792e636f6d"
  /mailbox/v1alpha1/aliases/{alias_id}:
    get:
      tags:
      - Mailboxes
      operationId: GetAlias
      summary: Get an alias by its ID.
      parameters:
      - in: path
        name: alias_id
        description: ID of the alias 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.Alias'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/mailbox/v1alpha1/aliases/{alias_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/mailbox/v1alpha1/aliases/{alias_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Mailboxes
      operationId: UpdateAlias
      summary: Update an alias by its ID.
      parameters:
      - in: path
        name: alias_id
        description: ID of the alias 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.Alias'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type:
                  - string
                  - "null"
                  description: (Optional) Description of the alias.
              x-properties-order:
              - description
      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/aliases/{alias_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/mailbox/v1alpha1/aliases/{alias_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Mailboxes
      operationId: DeleteAlias
      summary: Delete an alias by its ID.
      parameters:
      - in: path
        name: alias_id
        description: ID of the alias 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.Alias'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/mailbox/v1alpha1/aliases/{alias_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/mailbox/v1alpha1/aliases/{alias_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /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:
                  description: Subscription renewal period, it can be monthly or yearly.
                  $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox.SubscriptionPeriod'
              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:
          $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.ListMailboxesRequest.OrderBy'
      - 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
      - in: query
        name: project_id
        description: (Optional) Project ID to filter mailboxes on. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      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:
                  description: (Optional) New subscription period for the mailbox.
                  $ref: '#/components/schemas/scaleway.mailbox.v1alpha1.Mailbox.SubscriptionPeriod'
                new_password:
                  type:
                  - string
                  - "null"
                  description: (Optional) New password of the mailbox.
              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}/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
