Mail-in-a-Box SSL API

TLS (SSL) Certificates operations, which include checking certificate status and installing custom certificates.

Operations 4

GET /ssl/status Get SSL status #
POST /ssl/csr/{domain} Generate SSL CSR #
POST /ssl/install Install SSL certificate #
POST /ssl/provision Provision SSL certificates #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mail-in-a-box:mail-in-a-box-ssl-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mail-in-a-box-ssl-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mail-in-a-Box SSL API
  description: 'Mail-in-a-Box API HTTP specification.


    # Introduction

    This API is documented in **OpenAPI format**.

    (View the full HTTP specification.)


    All endpoints are relative to `https://{host}/admin` and are secured with `Basic Access` authentication. If you have multi-factor authentication enabled, authentication with a `user:password` combination will fail unless a valid OTP is supplied via the `x-auth-token` header. Authentication via a `user:user_key` pair is possible without the header being present.'
  contact:
    name: Mail-in-a-Box support
    url: https://mailinabox.email/
  license:
    name: CC0 1.0 Universal
    url: https://creativecommons.org/publicdomain/zero/1.0/legalcode
  version: 0.51.0
  x-logo:
    url: https://mailinabox.email/static/logo.png
    altText: Mail-in-a-Box logo
servers:
- url: https://{host}/admin
  variables:
    host:
      default: box.example.com
      description: The API hostname.
security:
- basicAuth: []
tags:
- name: SSL
  description: 'TLS (SSL) Certificates operations, which include checking certificate status

    and installing custom certificates.'
paths:
  /ssl/status:
    get:
      tags:
      - SSL
      summary: Get SSL status
      description: Returns the SSL status for all domains.
      operationId: getSSLStatus
      x-codeSamples:
      - lang: curl
        source: "curl -X GET \"https://{host}/admin/ssl/status\" \\\n  -u \"<email>:<password>\"\n"
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SSLStatusResponse'
        403:
          description: Forbidden
          content:
            text/html:
              schema:
                type: string
  /ssl/csr/{domain}:
    post:
      tags:
      - SSL
      summary: Generate SSL CSR
      description: Generates a Certificate Signing Request (CSR) for a domain & country code.
      operationId: generateSSLCSR
      parameters:
      - in: path
        name: domain
        schema:
          $ref: '#/components/schemas/Hostname'
        required: true
        description: Domain to generate CSR for.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SSLCSRGenerateRequest'
            example:
              countrycode: GB
      x-codeSamples:
      - lang: curl
        source: "curl -X POST \"https://{host}/admin/ssl/csr/<hostname>\" \\\n  -d \"countrycode=<string>\" \\\n  -u \"<email>:<password>\"\n"
      responses:
        200:
          description: Successful operation
          content:
            text/html:
              schema:
                $ref: '#/components/schemas/SSLCSRGenerateResponse'
              example: '-----BEGIN CERTIFICATE REQUEST-----

                MIICaDCCAVACAQAwIzELMAkGA1UEBhMCQlMxFDASBgNVBAMMC2V4YW1wbGUuY29t

                ...

                JmFDQESSfUxLPHLC660Wnf3GmrP/duZHpPC+qTe8b1AlQ7zDT3cOaAQ+Mb0=

                -----END CERTIFICATE REQUEST-----

                '
        400:
          description: Bad request
          content:
            text/html:
              schema:
                type: string
        403:
          description: Forbidden
          content:
            text/html:
              schema:
                type: string
  /ssl/install:
    post:
      tags:
      - SSL
      summary: Install SSL certificate
      description: Installs a custom certificate. The chain certificate is optional.
      operationId: installSSLCertificate
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SSLCertificateInstallRequest'
            example:
              domain: example.com
              cert: CERT_STRING
              chain: CHAIN_STRING
      x-codeSamples:
      - lang: curl
        source: "curl -X POST \"https://{host}/admin/ssl/install\" \\\n  -d \"domain=<hostname>\" \\\n  -d \"cert=<string>\" \\\n  -d \"chain=<string>\" \\\n  -u \"<email>:<password>\"\n"
      responses:
        200:
          description: Successful operation
          content:
            text/html:
              schema:
                $ref: '#/components/schemas/SSLCertificateInstallResponse'
              example: OK
        400:
          description: Bad request
          content:
            text/html:
              schema:
                type: string
        403:
          description: Forbidden
          content:
            text/html:
              schema:
                type: string
  /ssl/provision:
    post:
      tags:
      - SSL
      summary: Provision SSL certificates
      description: Provisions certificates for all domains.
      operationId: provisionSSLCertificates
      x-codeSamples:
      - lang: curl
        source: "curl -X POST \"https://{host}/admin/ssl/provision\" \\\n  -u \"<email>:<password>\"\n"
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SSLCertificatesProvisionResponse'
        403:
          description: Forbidden
          content:
            text/html:
              schema:
                type: string
components:
  schemas:
    SSLStatusResponse:
      type: object
      required:
      - can_provision
      - status
      properties:
        can_provision:
          type: array
          items:
            type: string
        status:
          type: array
          items:
            $ref: '#/components/schemas/SSLStatus'
      description: SSL status response for all relevant domains.
    SSLCertificateInstallResponse:
      type: string
      example: OK
      description: Install certificate response.
    SSLCertificateInstallRequest:
      type: object
      required:
      - domain
      - cert
      - chain
      properties:
        domain:
          $ref: '#/components/schemas/Hostname'
        cert:
          type: string
          description: TLS/SSL certificate.
          example: '-----BEGIN CERTIFICATE-----

            MIICaDCCAVACAQAwIzELMAkGA1UEBhMCQlMxFDASBgNVBAMMC2V4YW1wbGUuY29t

            MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3K6dwLM2Nk8kVhIBaZmp

            eY6y7O0T3jrexEKlW839TVYdcH+K35V1NxilbMFKMuHeowGwFyyiqOy/OUYNeq+T

            Rz3s4b1qG2p01dwlsXHHYmXLYTAhvqvY+CU5ksieuZbyHRTwbHViQ0xtRXwoVCnj

            CkN7kJVpkLfVN0/BG6NBFpv/JI8F+hwp+IHdkC1gUXRrLJNC79ERqFP8HoqdQWNw

            OGGFaOe2aQhvj2zt8wFncyKVc40UKVbSzGGzdL2MPiAJHgZ2lmeY1xDyX1lOt12R

            IFPwtxmbxaxYaVfe2hxl7m88xV3OjYcKgwVYDusk2XJ37cGew5g+NbBvzEeEUpF9

            5wIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAD7UPC3/Nkgpn53mT9puUonYdJg9

            SD8vvTK/N78CzoEgPNyq+bYbqlcvVPKIdItf9TMiqfOSvW3e3NvkRisYle8Qp+0C

            8pafXBvQ9eHt5CFeJn4sH9GnxeflOZT/P9Jnp71KtZQvOobirX4GgEWs79g+/NHb

            Zyf8rbadt9HruNhKA5nlP8cn7Rdc/iuJU8MVSQszI1s1DEcXMPxr6iqb2g87/ifH

            lWcK59kvRJkCcPhPzjpUy9NulucH4WFA/WqKeDNFS/oC+upV5w8EDEcfnenJFG+N

            JmFDQESSfUxLPHLC660Wnf3GmrP/duZHpPC+qTe8b1AlQ7zDT3cOaAQ+Mb0=

            -----END CERTIFICATE-----

            '
        chain:
          type: string
          description: TLS/SSL intermediate chain (if provided, else empty string).
          example: '-----BEGIN CERTIFICATE-----

            MIICaDCCAVACAQAwIzELMAkGA1UEBhMCQlMxFDASBgNVBAMMC2V4YW1wbGUuY29t

            MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3K6dwLM2Nk8kVhIBaZmp

            eY6y7O0T3jrexEKlW839TVYdcH+K35V1NxilbMFKMuHeowGwFyyiqOy/OUYNeq+T

            Rz3s4b1qG2p01dwlsXHHYmXLYTAhvqvY+CU5ksieuZbyHRTwbHViQ0xtRXwoVCnj

            CkN7kJVpkLfVN0/BG6NBFpv/JI8F+hwp+IHdkC1gUXRrLJNC79ERqFP8HoqdQWNw

            OGGFaOe2aQhvj2zt8wFncyKVc40UKVbSzGGzdL2MPiAJHgZ2lmeY1xDyX1lOt12R

            IFPwtxmbxaxYaVfe2hxl7m88xV3OjYcKgwVYDusk2XJ37cGew5g+NbBvzEeEUpF9

            5wIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAD7UPC3/Nkgpn53mT9puUonYdJg9

            SD8vvTK/N78CzoEgPNyq+bYbqlcvVPKIdItf9TMiqfOSvW3e3NvkRisYle8Qp+0C

            8pafXBvQ9eHt5CFeJn4sH9GnxeflOZT/P9Jnp71KtZQvOobirX4GgEWs79g+/NHb

            Zyf8rbadt9HruNhKA5nlP8cn7Rdc/iuJU8MVSQszI1s1DEcXMPxr6iqb2g87/ifH

            lWcK59kvRJkCcPhPzjpUy9NulucH4WFA/WqKeDNFS/oC+upV5w8EDEcfnenJFG+N

            JmFDQESSfUxLPHLC660Wnf3GmrP/duZHpPC+qTe8b1AlQ7zDT3cOaAQ+Mb0=

            -----END CERTIFICATE-----

            '
      description: Install certificate request. `chain` can be an empty string.
    SSLStatus:
      type: object
      required:
      - domain
      - status
      - text
      properties:
        domain:
          $ref: '#/components/schemas/Hostname'
        status:
          $ref: '#/components/schemas/SSLStatusType'
        text:
          type: string
          example: Signed & valid. The certificate expires in 87 days on 10/28/20.
      description: SSL status details for domain.
    Hostname:
      type: string
      format: hostname
      example: example.com
      description: Hostname format.
    SSLStatusType:
      type: string
      enum:
      - success
      - danger
      - not-applicable
      example: success
      description: SSL status type.
    SSLCSRGenerateRequest:
      type: object
      required:
      - countrycode
      properties:
        countrycode:
          type: string
          example: GB
      description: Generate SSL CSR request.
    SSLCertificatesProvisionResponse:
      type: object
      required:
      - requests
      properties:
        requests:
          type: array
          items:
            type: object
            required:
            - log
            - result
            - domains
            properties:
              log:
                type: array
                items:
                  type: string
                example:
                - 'The domain name does not resolve to this machine: [Not Set] (A), [Not Set] (AAAA).'
              result:
                type: string
                enum:
                - installed
                - error
                - skipped
                example: installed
              domains:
                type: array
                items:
                  $ref: '#/components/schemas/Hostname'
      description: SSL certificates provision response.
    SSLCSRGenerateResponse:
      type: string
      example: '-----BEGIN CERTIFICATE REQUEST-----

        MIICaDCCAVACAQAwIzELMAkGA1UEBhMCQlMxFDASBgNVBAMMC2V4YW1wbGUuY29t

        MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3K6dwLM2Nk8kVhIBaZmp

        eY6y7O0T3jrexEKlW839TVYdcH+K35V1NxilbMFKMuHeowGwFyyiqOy/OUYNeq+T

        Rz3s4b1qG2p01dwlsXHHYmXLYTAhvqvY+CU5ksieuZbyHRTwbHViQ0xtRXwoVCnj

        CkN7kJVpkLfVN0/BG6NBFpv/JI8F+hwp+IHdkC1gUXRrLJNC79ERqFP8HoqdQWNw

        OGGFaOe2aQhvj2zt8wFncyKVc40UKVbSzGGzdL2MPiAJHgZ2lmeY1xDyX1lOt12R

        IFPwtxmbxaxYaVfe2hxl7m88xV3OjYcKgwVYDusk2XJ37cGew5g+NbBvzEeEUpF9

        5wIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAD7UPC3/Nkgpn53mT9puUonYdJg9

        SD8vvTK/N78CzoEgPNyq+bYbqlcvVPKIdItf9TMiqfOSvW3e3NvkRisYle8Qp+0C

        8pafXBvQ9eHt5CFeJn4sH9GnxeflOZT/P9Jnp71KtZQvOobirX4GgEWs79g+/NHb

        Zyf8rbadt9HruNhKA5nlP8cn7Rdc/iuJU8MVSQszI1s1DEcXMPxr6iqb2g87/ifH

        lWcK59kvRJkCcPhPzjpUy9NulucH4WFA/WqKeDNFS/oC+upV5w8EDEcfnenJFG+N

        JmFDQESSfUxLPHLC660Wnf3GmrP/duZHpPC+qTe8b1AlQ7zDT3cOaAQ+Mb0=

        -----END CERTIFICATE REQUEST-----

        '
      description: Generate SSL CSR response.
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: 'Credentials can be supplied using the `Authorization` header in

        format `Authorization: Basic {access-token}`.


        The `access-token` is comprised of the Base64 encoding of `username:password`.

        The `username` is the mail user''s email address, and `password` can either be the mail user''s

        password, or the `api_key` returned from the `login` operation.


        When using `curl`, you can supply user credentials using the `-u` or `--user` parameter.

        '
externalDocs:
  description: Find out more about Mail-in-a-box.
  url: https://mailinabox.email/