QBOXMAIL API

Domains

Domains - Add new domain

This method is used to add a new domain. The domain code is returned in the location header field.

post
https://api.qboxmail.com/api/domains

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
name String

Domain name without www.

postmaster_password String

Password for the user Postmaster (min 8 chars and at least one number).

postmaster_password_confirmation String

Repeat the password.

plan optional String

the plan of the domain.

Default value: basic

Allowed values: basic, professional, enterprise

catch_all_enabled optional Boolean

true if you want to active the catch all for the domain. Available only for non trial users.

Default value: false

catch_all_destination optional String

valid email address, must be present if catch_all_enabled is true. Available only for non trial users.

max_email_accounts optional Integer

Max number of email accounts for the domain, -1 = no-limit.

max_email_accounts_archive optional Integer

Max number of email accounts with the archive option activated for the domain, -1 = no-limit.

max_email_accounts_25gb optional Integer

Max number of email accounts with 25GB of storage for the domain, -1 = no-limit.

max_email_quota optional Integer

Max quota in bytes for the email accounts of the domain

Default value: 8589934592

Allowed values: 1073741824, 2147483648, 3221225472, 4294967296, 5368709120, 6442450944, 7516192768, 8589934592, 17179869184, 26843545600

antispam_level optional Integer

Level of the antispam. 0: disabled, 1: permissive, 2: standard, 3: aggressive

Default value: 2

Allowed values: 0, 1, 2, 3

default_quota optional Integer

Default quota used at the creation of new email for the domain.

Default value: 8589934592

Allowed values: 1073741824, 2147483648, 3221225472, 4294967296, 5368709120, 6442450944, 7516192768, 8589934592, 17179869184, 26843545600

imap_disabled optional Boolean

Disable IMAP protocol on all email accounts of the domain.

Default value: false

pop_disabled optional Boolean

Disable POP protocol on all email accounts of the domain.

Default value: false

archive_disabled optional Boolean

Disable archive on all email accounts of the domain.

Default value: false

webmail_disabled optional Boolean

Disable webmail access on all email accounts of the domain.

Default value: false

smtp_disabled optional Boolean

Disable SMTP protocol on all email accounts of the domain.

Default value: false

chat optional Boolean

Enable chat on the Qboxmail webmail. Only available on domain with plan "enterprise"

Default value: true

activesync optional Boolean

Enable activesync service on domain accounts. Only available on domain with plan "professional" or "enterprise".

Default value: true

meeting optional Boolean

Enable meeting video chat on the Qboxmail webmail. Only available on domain with plan "enterprise"

Default value: true

calendar optional Boolean

Enable calendar on the Qboxmail webmail. Only available on domain with plan "enterprise"

Default value: true

xmpp optional Boolean

Enable xmpp service on domain accounts. Only available on domain with plan "professional" or "enterprise"

Default value: true

dav optional Boolean

Enable dav service on domain accounts. Only available on domain with plan "professional" or "enterprise"

Default value: true

api_enabled optional Boolean

Enable API access on domain accounts. Only available on domain with plan "professional" or "enterprise"

Default value: true

password_change_disabled optional Boolean

Disable the password change from the user. Only the domain owner will be able to change users passwords. This is the default value that will be applied on new email accounts that have not set this option explicitly, but it can be overwritten in the settings of the single email account. Only available on domain with plan "professional" or "enterprise"

Default value: false

password_recovery_disabled optional Boolean

Disable the password recovery from the user. This is the default value that will be applied on new email accounts that have not set this option explicitly, but it can be overwritten in the settings of the single email account. Only available on domain with plan "professional" or "enterprise"

Default value: false

password_expiration optional Integer

Set the number of months before the password will expire and will need to be changed. This is the default value that will be applied on new email accounts that have not set this option explicitly, but it can be overwritten in the settings of the single email account. Only available on domain with plan "professional" or "enterprise"

Default value: -1

Allowed values: -1, 3, 6, 12

force_password_first_login optional Boolean

If true, every account will need to set a new password on the first login. This is the default value that will be applied on new email accounts that have not set this option explicitly, but it can be overwritten in the settings of the single email account. Only available on domain with plan "professional" or "enterprise"

Default value: false

block_old_password optional Boolean

If true, the users will not be able to choose a password that has been already used in the past. This is the default value that will be applied on new email accounts that have not set this option explicitly, but it can be overwritten in the settings of the single email account. Only available on domain with plan "enterprise"

Default value: false

force_otp optional Boolean

If true, every users must have to use 2 factor authentication to login to Qboxmail services. This is the default value that will be applied on new email accounts that have not set this option explicitly, but it can be overwritten in the settings of the single email account. Only available on domain with plan "enterprise"

Default value: false

allow_nets optional String[]

List of valid ip addresses.

Default value: empty

company optional String

Name of the company associated with the domain

telephone optional String

Telephone number of the company

address optional String

Address of the company

city optional String

City of the company

zip optional String

Zip code of the company

state optional String

State of the company

country optional String

Country of the company

language optional String

Language for the users of the domains. it = Italian, en = English. By default the language of the customer is applied.

Allowed values: it, en

timezone optional String

Timezone. You can find the list of valid timezones here: https://gist.githubusercontent.com/ciaoben/f926d7ae8d1387b439de17f4fb9d308f/raw/03d719e51be724a327b665d53f00dc1a45aeab20/qboxmail_timezones.txt By the timezone of the customer is applied.

Created 201

Field Type Description
message String

Confirmation message and newly created resource code.

/*
 * Create a domain with all the default settings
 * sending only the name and the password of the postmaster accoun
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST -d '{
        "name":"hello1.com",
        "postmaster_password":"Qwertyuiop0",
        "postmaster_password_confirmation":"Qwertyuiop0" }' \
    https://api.qboxmail.com/api/domains

> POST /api/domains HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 97

< HTTP/1.1 201 Created
< Location: https://api.qboxmail.com/domains/D072048005
< Content-Type: application/json
< Content-Length: 28
< Etag: W/"a0d00fe50a65a8b47780d2dce5029fb4"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: a4fc6b0f-bc05-47c5-be04-021848b52dea
< X-Runtime: 0.030012
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 10:58:00 GMT
< Connection: Keep-Alive

Body:
{
    "message": "risorsa creata",
    "resource_code":"D477048238"
}
/*
 * Create a domain with the enterprise plan, the company name
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST -d '{
        "name":"hello2.com",
        "postmaster_password":"Qwertyuiop0",
        "postmaster_password_confirmation":"Qwertyuiop0",
        "plan": "enterprise",
        "company": 'Qboxmail' }' \
    https://api.qboxmail.com/api/domains

> POST /api/domains HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 290

< HTTP/1.1 201 Created
< Location: https://api.qboxmail.com/domains/D727264119
< Content-Type: application/json
< Content-Length: 28
< Etag: W/"a0d00fe50a65a8b47780d2dce5029fb4"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 4473c7ac-e843-47d6-8bbf-2318a7e7e939
< X-Runtime: 0.045450
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 11:54:46 GMT
< Connection: Keep-Alive

Body:
{
    "message": "risorsa creata",
    "resource_code":"D477048238"
}

Error 400

Name Type Description
BadRequest json

Invalid JSON.

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field": "max_email_quota",
            "description": "non è un valore valido"
        },
        {
            "field": "default_quota",
            "description": "non è un valore valido"
        }
    ]
}

Domains - Check MX records validity

This method is used to check domain MX records validity.

put
https://api.qboxmail.com/api/domains/:code/dns

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No content 204

Field Type Description
none String

No content.

/*
 * Check Domain MX records validity
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d "" https://api.qboxmail.com/api/domains/D072048005/dns


Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domains - DKIM: disable support

This method is used to disable DKIM support removing domain key.

delete
https://api.qboxmail.com/api/domains/:domain_code/dkim

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No Content 204

Field Type Description
message none

The TXT record is verified

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X DELETE \
    https://api.qboxmail.com/api/domains/D111925535/dkim/reset

    > PUT /api/domains/D576488342/dkim HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.47.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: -57RMyGYoMtG6rAcShB_uZ-EBkqsY0tc3dKVpyxfHLjXy0V5ejnlHY2gyqYRXLSQ

    < HTTP/1.1 204 No Content
    < Server: nginx/1.10.2
    < Date: Wed, 08 Mar 2017 12:04:56 GMT
    < Connection: keep-alive
    < Cache-Control: no-cache
    < X-Request-Id: a1360d14-b4ff-4fe8-8aff-cee40417808e
    < X-Runtime: 0.219012
    < Set-Cookie: __profilin=p%3Dt%2Ca%3Da1a24b5670174f84a65a0bd5e0ddcca2%7C6e6a2fab9c754824c8eefd9b29c464c7; path=/
    < Vary: Origin

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain was not found.

{
    "error": "Unauthorized"
}
{
    "error": "Resource not found"
}

Domains - DKIM: obtain TXT record

This method is used to obtain Selector and DNS TXT record used by DKIM

post
https://api.qboxmail.com/api/domains/:domain_code/dkim

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Ok 200

Field Type Description
message String

Dns TXT record and selector.

No Content 204

Field Type Description
message none

The key has already been generated

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST \
    https://api.qboxmail.com/api/domains/D111925535/dkim

    > POST /api/domains/D576488342/dkim HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.47.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: -57RMyGYoMtG6rAcShB_uZ-EBkqsY0tc3dKVpyxfHLjXy0V5ejnlHY2gyqYRXLSQ

    < HTTP/1.1 200 OK
    < Server: nginx/1.10.2
    < Date: Wed, 08 Mar 2017 11:32:08 GMT
    < Content-Type: application/json
    < Content-Length: 321
    < Connection: keep-alive
    < ETag: W/"2c97ab2f329e4e926ec9cfac780842de"
    < Cache-Control: max-age=0, private, must-revalidate
    < X-Request-Id: deeb4ad1-adce-48e7-b199-54a4f24589ea
    < X-Runtime: 0.467393
    < Set-Cookie: __profilin=p%3Dt%2Ca%3D6e6a2fab9c754824c8eefd9b29c464c7%7C3447c82f559afd130b522e97df34e7ae; path=/
    < Vary: Origin

    {
        "resources": [
            {
                "selector":"qbm1703086434._domainkey",
                "txt_record":"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCzrgaWd20gUTBjw6D3RqJhUpNmpk1w3sj3EqtBUfVRmeZXqr650ZFpS9ii8SxolDBRybOQ+l9DgURlWCz0RdjGLp02rNb1li7LauZ4YfZmFYAyZYLHLel0qoIUZPPPaQa+NkLiHBo0kSQdTiLlXZHfM7GLMK3ZDKUG0mIkvs7UkQIDAQAB"
            }
        ],
        "pagination":{

        }
    }

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain was not found.

{
    "error": "Unauthorized"
}
{
    "error": "Resource not found"
}

Domains - DKIM: reset procedure

This method is used to reset DKIM procedure before DNS verification.

put
https://api.qboxmail.com/api/domains/:domain_code/dkim/reset

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No Content 204

Field Type Description
message none

The TXT record is verified

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT \
    https://api.qboxmail.com/api/domains/D111925535/dkim/reset

    > PUT /api/domains/D576488342/dkim HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.47.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: -57RMyGYoMtG6rAcShB_uZ-EBkqsY0tc3dKVpyxfHLjXy0V5ejnlHY2gyqYRXLSQ

    < HTTP/1.1 204 No Content
    < Server: nginx/1.10.2
    < Date: Wed, 08 Mar 2017 12:04:56 GMT
    < Connection: keep-alive
    < Cache-Control: no-cache
    < X-Request-Id: a1360d14-b4ff-4fe8-8aff-cee40417808e
    < X-Runtime: 0.219012
    < Set-Cookie: __profilin=p%3Dt%2Ca%3Da1a24b5670174f84a65a0bd5e0ddcca2%7C6e6a2fab9c754824c8eefd9b29c464c7; path=/
    < Vary: Origin

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain was not found.

{
    "error": "Unauthorized"
}
{
    "error": "Resource not found"
}

Domains - DKIM: validate TXT record

This method is used to validate DNS TXT record used by DKIM

put
https://api.qboxmail.com/api/domains/:domain_code/dkim

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No Content 204

Field Type Description
message none

The TXT record is verified

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT \
    https://api.qboxmail.com/api/domains/D111925535/dkim

    > PUT /api/domains/D576488342/dkim HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.47.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: -57RMyGYoMtG6rAcShB_uZ-EBkqsY0tc3dKVpyxfHLjXy0V5ejnlHY2gyqYRXLSQ

    < HTTP/1.1 204 No Content
    < Server: nginx/1.10.2
    < Date: Wed, 08 Mar 2017 12:04:56 GMT
    < Connection: keep-alive
    < Cache-Control: no-cache
    < X-Request-Id: a1360d14-b4ff-4fe8-8aff-cee40417808e
    < X-Runtime: 0.219012
    < Set-Cookie: __profilin=p%3Dt%2Ca%3Da1a24b5670174f84a65a0bd5e0ddcca2%7C6e6a2fab9c754824c8eefd9b29c464c7; path=/
    < Vary: Origin

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain was not found.

Error 422

Name Type Description
ValidationFailed json

Validation is failed.

{
    "error": "Unauthorized"
}
{
    "error": "Resource not found"
}
{
    "message": "Validation Failed",
    "errors": [
        {
            "field": "dkim_public_key",
            "description": "error..."
        }
    ]
}

Domains - Delete a registered domain

This method is used to delete a registered domain.

delete
https://api.qboxmail.com/api/domains/:code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No Content 204

Field Type Description
none json

No Content

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X DELETE https://api.qboxmail.com/api/domains/D072048005

    > DELETE /api/domains/D032875431 HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.51.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
    >
    < HTTP/1.1 204 No Content
    < Cache-Control: no-cache
    < X-Request-Id: 8de90f43-0b72-4c3e-9755-e254c4e97c9c
    < X-Runtime: 0.030340
    < Vary: Origin
    < Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
    < Date: Mon, 28 Nov 2016 14:21:22 GMT
    < Connection: Keep-Alive

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domains - Edit domain attributes

This method is used to change domain attributes.

put
https://api.qboxmail.com/api/domains/:code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
postmaster_password optional String

Password for the user Postmaster (min 8 chars and at least one number).

postmaster_password_confirmation optional String

Repeat the password.

profile_code optional String

Code of the profile that you want to apply. Available only for resellers and wholesales.

catch_all_enabled optional Boolean

True if you want to active the catch all for the domain. Available only for non trial users.

catch_all_destination optional Integer

Valid email address, must be present if catch_all_enabled is true. Available only for non trial users.

max_email_accounts optional Integer

Max number of email accounts for the domain, -1 = no-limit.

max_email_accounts_archive optional Integer

Max number of email accounts with the archive option activated for the domain, -1 = no-limit.

max_mailing_lists optional Integer

Max number of mailing lists for the domain, -1 = no-limit.

max_email_quota optional Integer

Max quota in bytes for the email accounts of the domain.

Allowed values: 1073741824, 2147483648, 3221225472, 4294967296, 5368709120, 6442450944, 7516192768, 8589934592, 17179869184, 26843545600

antispam_level optional Integer

Level of the antispam.

Allowed values: 0, 1, 2, 3

default_quota optional Integer

Default quota used at the creation of new email for the domain

Allowed values: 1073741824, 2147483648, 3221225472, 4294967296, 5368709120, 6442450944, 7516192768, 8589934592, 17179869184, 26843545600

imap_disabled optional Boolean

Disable IMAP protocol on all email accounts of the domain.

pop_disabled optional Boolean

Disable POP protocol on all email accounts of the domain.

archive_disabled optional Boolean

Disable archive on all email accounts of the domain.

webmail_disabled optional Boolean

Disable webmail access on all email accounts of the domain.

smtp_disabled optional Boolean

Disable SMTP protocol on all email accounts of the domain.

allow_nets optional String[]

List of valid ip addresses.

outbound_limit optional Integer

Id of a valid outboud limit to set on the domain. Set 0 for the default (1000/24hr). Available only for non trial users.

No content 204

Field Type Description
none String

No content.

/*
 * Set domain to support 100 email accounts
 * at most 5 mailing list
 * and each email with a max quota of 2GB
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{
        "max_email_accounts":100,
        "max_mailing_lists":5,
        "max_email_quota":2147483648 }' \
    https://api.qboxmail.com/api/domains/D072048005

> PUT /api/domains/D072048005 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty
/*
 * Enable a disabled domain
 * set spam level 2
 * and add default email quota of 2GB
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{
        "status":"enabled",
        "antispam_level":2,
        "default_quota":2147483648 }' \
    https://api.qboxmail.com/api/domains/D072048005

> PUT /api/domains/D072048005 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty
/*
 * Change postmaster password
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{
        "postmaster_password":"Qwertyuiop0",
        "postmaster_password_confirmation":"Qwertyuiop0" }' \
    https://api.qboxmail.com/api/domains/D072048005

> PUT /api/domains/D072048005 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty

Error 400

Name Type Description
BadRequest json

Invalid JSON.

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field": "max_email_quota",
            "description": "non è un valore valido"
        },
        {
            "field": "default_quota",
            "description": "non è un valore valido"
        }
    ]
}

Domains - Enable or disable a domain

This method is used to enable or disable a domain.

put
https://api.qboxmail.com/api/domains/:code/status

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
status String

New status of the domain.

Allowed values: "enabled", "disabled"

No content 204

Field Type Description
none String

No content.

/*
 * Set domain to support 100 email accounts
 * at most 5 mailing list
 * and each email with a max quota of 2GB
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{
        "status":"enabled" }' \
    https://api.qboxmail.com/api/domains/D072048005/status

> PUT /api/domains/D072048005 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty

Error 400

Name Type Description
BadRequest json

Invalid JSON.

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 403

Name Type Description
Forbidden json

Domain in ownership check.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domains - Generate HTML ownership

This method is used to generate an HTML to upload to the root of the site to verify the ownership of the domain

post
https://api.qboxmail.com/api/domains/:code/dns_ownership_check

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Created 201

Field Type Description
body json

message and url to use to download the file

/*
 * Enable Domain verification using DNS query
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST -d "" https://api.qboxmail.com/api/domains/D072048005/html_ownership_check


> POST /api/domains/D072048005/html_ownership_check HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 201 Created
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body:
{
  "message": "risorsa creata",
  "file_url": "/ocheck_htmls/d072048005.html"
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domains - Get details of registered domain

This method is used to get the details of a registered domain.

get
https://api.qboxmail.com/api/domains/:code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

OK 200

Field Type Description
message json

Details of registered domain

/*
 * Get the information of a specified domain
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/domains/D072048005

> GET /api/domains/D072048005 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 1007
< Etag: W/"58e6af44870bf0c5893bf193b6cde1b7"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: a5e71559-06b7-4b11-88ce-fce1a0d2ab1d
< X-Runtime: 0.020041
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:12:30 GMT
< Connection: Keep-Alive

Body:
{
    "resources": [
        {
        "activated_at": "2019-08-07T10:37:28.000+02:00",
        "archive_activated_at": null,
        "created_at": "2019-08-07T10:37:11.000+02:00",
        "updated_at": "2019-08-07T10:37:28.000+02:00",
        "status": "enabled",
        "status_detail": "ok",
        "archive_status": null,
        "code": "D072048005",
        "is_healthy": false,
        "name": "testdomain.com",
        "customer_fullname": "John Doe",
        "customer_code": "C196317406",
        "customer_catch_all": true,
        "allow_nets": [
            "0.0.0.0/0"
        ],
        "antispam_level": 2,
        "archive": false,
        "manager_fullname": null,
        "manager_code": null,
        "imap_disabled": false,
        "smtp_disabled": false,
        "pop_disabled": false,
        "webmail_disabled": false,
        "xmpp": false,
        "calendar": true,
        "meeting": true,
        "activesync": false,
        "chat": true,
        "dav": true,
        "default_retention": 0,
        "default_archive": false,
        "email_services": 0,
        "default_quota": 8589934592,
        "dkim_public_key": null,
        "dkim_selector": "._domainkey",
        "has_dkim": null,
        "max_email_accounts": 10,
        "max_email_accounts_archive": 0,
        "max_email_accounts_25gb": 9,
        "max_email_quota": 8589934592,
        "no_alias_domains": 0,
        "no_alias_email_accounts": 0,
        "no_email_accounts": 2,
        "no_email_accounts_archive": 0,
        "no_email_accounts_25gb": 0,
        "ownership_verification_email_address": null,
        "ownership_verification_random_code": null,
        "possession_a_record": "",
        "catch_all_destination": null,
        "catch_all_enabled": false,
        "outbound_limit": 0,
        "outbound_limit_status": 0,
        "postmaster_code": "P646067187",
        "postmaster_max_email_quota": 52428800,
        "postmaster_lastauth": null,
        "plan": {
            "name": "enterprise"
        },
        "addressbook_data": {
            "id": 64,
            "domain_id": 74,
            "company": "Lab87",
            "telephone": null,
            "address": null,
            "zip": null,
            "city": null,
            "state": null,
            "country": null,
            "language": "en",
            "timezone": "Europe/Rome"
        },
        "api_enabled": false,
        "force_otp": true,
        "block_old_password": false,
        "force_password_first_login": false,
        "password_expiration": 12,
        "password_recovery_disabled": true,
        "password_change_disabled": false,
        "address": null,
        "city": null,
        "timezone": "Europe/Rome",
        "language": "en",
        "company": "Lab87",
        "country": null,
        "zip": null,
        "telephone": null,
        "state": null
        }
    ],
    "pagination": {}
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domains - Get list of registered domains

This method is used to get the list of registered domains.

get
https://api.qboxmail.com/api/domains

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
query optional String

Filter results by name.

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of domains on each page.

Default value: 25

OK 200

Field Type Description
message json

List of registered domains

/*
 * Get the list of the registered domains.
 * In the example response here below you can see three domains
 * 2 enabled and 1 waiting for the DNS verification
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/domains

> GET /api/domains HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 4941
< Etag: W/"14c49ec9251df6f8ce0240c22349e673"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 3045fc33-2b28-4415-a4c1-bf192bba15d6
< X-Runtime: 0.028940
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 13:22:24 GMT
< Connection: Keep-Alive

Body:
{
  "resources": [
    {
      "activated_at": "2019-05-30T10:33:31.000+02:00",
      "archive_activated_at": null,
      "created_at": "2019-05-30T10:31:00.000+02:00",
      "updated_at": "2019-05-30T10:33:33.000+02:00",
      "status": "enabled",
      "status_detail": "ok",
      "archive_status": null,
      "code": "D200295257",
      "is_healthy": false,
      "name": "domainbasic.om",
      "customer_fullname": "John Doe",
      "customer_code": "C196317406",
      "customer_catch_all": true,
      "allow_nets": [
        "0.0.0.0/0"
      ],
      "antispam_level": 2,
      "archive": false,
      "manager_fullname": null,
      "manager_code": null,
      "imap_disabled": false,
      "smtp_disabled": false,
      "pop_disabled": false,
      "webmail_disabled": false,
      "xmpp": false,
      "calendar": false,
      "meeting": false,
      "activesync": false,
      "chat": false,
      "dav": false,
      "default_retention": 0,
      "default_archive": false,
      "email_services": 0,
      "default_quota": 8589934592,
      "dkim_public_key": null,
      "dkim_selector": "._domainkey",
      "has_dkim": null,
      "max_email_accounts": -1,
      "max_email_accounts_archive": -1,
      "max_email_accounts_25gb": -1,
      "max_email_quota": 8589934592,
      "no_alias_domains": 0,
      "no_alias_email_accounts": 0,
      "no_email_accounts": 0,
      "no_email_accounts_archive": 0,
      "no_email_accounts_25gb": 0,
      "ownership_verification_email_address": null,
      "ownership_verification_random_code": null,
      "possession_a_record": "",
      "catch_all_destination": null,
      "catch_all_enabled": false,
      "outbound_limit": 0,
      "postmaster_quota": null,
      "postmaster_code": null,
      "postmaster_max_email_quota": null,
      "postmaster_lastauth": null,
      "plan": {
        "name": "basic"
      },
      "addressbook_data": null,
      "api_enabled": true,
      "force_otp": false,
      "block_old_password": false,
      "force_password_first_login": false,
      "password_expiration": -1,
      "password_recovery_disabled": false,
      "password_change_disabled": false,
      "address": null,
      "city": null,
      "timezone": null,
      "language": null,
      "company": null,
      "country": null,
      "zip": null,
      "telephone": null,
      "state": null
    },
    {
      "activated_at": null,
      "archive_activated_at": null,
      "created_at": "2019-05-30T10:34:23.000+02:00",
      "updated_at": "2019-05-30T10:34:23.000+02:00",
      "status": "ownership_check",
      "status_detail": "dns",
      "archive_status": null,
      "code": "D072367632",
      "is_healthy": false,
      "name": "domainenterprise.com",
      "customer_fullname": "John Doe",
      "customer_code": "C196317406",
      "customer_catch_all": true,
      "allow_nets": [
        "0.0.0.0/0"
      ],
      "antispam_level": 2,
      "archive": false,
      "manager_fullname": null,
      "manager_code": null,
      "imap_disabled": false,
      "smtp_disabled": false,
      "pop_disabled": false,
      "webmail_disabled": false,
      "xmpp": false,
      "calendar": false,
      "meeting": false,
      "activesync": false,
      "chat": false,
      "dav": false,
      "default_retention": 0,
      "default_archive": false,
      "email_services": 0,
      "default_quota": 8589934592,
      "dkim_public_key": null,
      "dkim_selector": "._domainkey",
      "has_dkim": null,
      "max_email_accounts": -1,
      "max_email_accounts_archive": -1,
      "max_email_accounts_25gb": -1,
      "max_email_quota": 8589934592,
      "no_alias_domains": 0,
      "no_alias_email_accounts": 0,
      "no_email_accounts": 0,
      "no_email_accounts_archive": 0,
      "no_email_accounts_25gb": 0,
      "ownership_verification_email_address": null,
      "ownership_verification_random_code": null,
      "possession_a_record": "d072367632",
      "catch_all_destination": null,
      "catch_all_enabled": false,
      "outbound_limit": 0,
      "postmaster_quota": null,
      "postmaster_code": null,
      "postmaster_max_email_quota": null,
      "postmaster_lastauth": null,
      "plan": {
        "name": "enterprise"
      },
      "addressbook_data": null,
      "api_enabled": true,
      "force_otp": false,
      "block_old_password": false,
      "force_password_first_login": false,
      "password_expiration": -1,
      "password_recovery_disabled": false,
      "password_change_disabled": false,
      "address": null,
      "city": null,
      "timezone": null,
      "language": null,
      "company": null,
      "country": null,
      "zip": null,
      "telephone": null,
      "state": null
    },
    {
      "activated_at": "2019-05-30T10:33:36.000+02:00",
      "archive_activated_at": null,
      "created_at": "2019-05-30T10:30:20.000+02:00",
      "updated_at": "2019-05-30T10:33:40.000+02:00",
      "status": "enabled",
      "status_detail": "ok",
      "archive_status": null,
      "code": "D862164271",
      "is_healthy": false,
      "name": "domainexample.com",
      "customer_fullname": "John Doe",
      "customer_code": "C196317406",
      "customer_catch_all": true,
      "allow_nets": [
        "0.0.0.0/0"
      ],
      "antispam_level": 2,
      "archive": false,
      "manager_fullname": null,
      "manager_code": null,
      "imap_disabled": false,
      "smtp_disabled": false,
      "pop_disabled": false,
      "webmail_disabled": false,
      "xmpp": false,
      "calendar": false,
      "meeting": false,
      "activesync": false,
      "chat": false,
      "dav": false,
      "default_retention": 0,
      "default_archive": false,
      "email_services": 0,
      "default_quota": 8589934592,
      "dkim_public_key": null,
      "dkim_selector": "._domainkey",
      "has_dkim": null,
      "max_email_accounts": -1,
      "max_email_accounts_archive": -1,
      "max_email_accounts_25gb": -1,
      "max_email_quota": 8589934592,
      "no_alias_domains": 0,
      "no_alias_email_accounts": 0,
      "no_email_accounts": 0,
      "no_email_accounts_archive": 0,
      "no_email_accounts_25gb": 0,
      "ownership_verification_email_address": null,
      "ownership_verification_random_code": null,
      "possession_a_record": "",
      "catch_all_destination": null,
      "catch_all_enabled": false,
      "outbound_limit": 0,
      "postmaster_quota": null,
      "postmaster_code": null,
      "postmaster_max_email_quota": null,
      "postmaster_lastauth": null,
      "plan": {
        "name": "professional"
      },
      "addressbook_data": null,
      "api_enabled": true,
      "force_otp": false,
      "block_old_password": false,
      "force_password_first_login": false,
      "password_expiration": -1,
      "password_recovery_disabled": false,
      "password_change_disabled": false,
      "address": null,
      "city": null,
      "timezone": null,
      "language": null,
      "company": null,
      "country": null,
      "zip": null,
      "telephone": null,
      "state": null
    }
  ],
  "pagination": {
    "per": 25,
    "page": 1,
    "total_pages": 1,
    "query": null,
    "filter": null,
    "status": null,
    "sort_field": null,
    "sort": null,
    "total_records": 3,
    "totals": {
      "all": 3,
      "enabled": 2,
      "disabled": 0,
      "ownership_check": 1,
      "unhealthy": 2,
      "failure": 0
    }
  }
}
/*
 * Get the first page (of 25 results) of domains that contain
 * the string "domainexample" in the name field
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET "https://api.qboxmail.com/api/domains?page=1&per=1&query=domainexample"

> GET /api/domains?page=1&per=1 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 1073
< Etag: W/"9ce751539b85992f667964d52e880f68"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 00bba357-caac-4280-931e-b91a807cb012
< X-Runtime: 0.022284
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 13:50:09 GMT
< Connection: Keep-Alive

Body:
{
  "resources": [
    {
      "activated_at": "2019-05-30T10:33:36.000+02:00",
      "archive_activated_at": null,
      "created_at": "2019-05-30T10:30:20.000+02:00",
      "updated_at": "2019-05-30T10:33:40.000+02:00",
      "status": "enabled",
      "status_detail": "ok",
      "archive_status": null,
      "code": "D862164271",
      "is_healthy": false,
      "name": "domainexample.com",
      "customer_fullname": "John Doe",
      "customer_code": "C196317406",
      "customer_catch_all": true,
      "allow_nets": [
        "0.0.0.0/0"
      ],
      "antispam_level": 2,
      "archive": false,
      "manager_fullname": null,
      "manager_code": null,
      "imap_disabled": false,
      "smtp_disabled": false,
      "pop_disabled": false,
      "webmail_disabled": false,
      "xmpp": false,
      "calendar": false,
      "meeting": false,
      "activesync": false,
      "chat": false,
      "dav": false,
      "default_retention": 0,
      "default_archive": false,
      "email_services": 0,
      "default_quota": 8589934592,
      "dkim_public_key": null,
      "dkim_selector": "._domainkey",
      "has_dkim": null,
      "max_email_accounts": -1,
      "max_email_accounts_archive": -1,
      "max_email_accounts_25gb": -1,
      "max_email_quota": 8589934592,
      "no_alias_domains": 0,
      "no_alias_email_accounts": 0,
      "no_email_accounts": 0,
      "no_email_accounts_archive": 0,
      "no_email_accounts_25gb": 0,
      "ownership_verification_email_address": null,
      "ownership_verification_random_code": null,
      "possession_a_record": "",
      "catch_all_destination": null,
      "catch_all_enabled": false,
      "outbound_limit": 0,
      "postmaster_quota": null,
      "postmaster_code": null,
      "postmaster_max_email_quota": null,
      "postmaster_lastauth": null,
      "plan": {
        "name": "professional",
      },
      "addressbook_data": null,
      "api_enabled": true,
      "force_otp": false,
      "block_old_password": false,
      "force_password_first_login": false,
      "password_expiration": -1,
      "password_recovery_disabled": false,
      "password_change_disabled": false,
      "address": null,
      "city": null,
      "timezone": null,
      "language": null,
      "company": null,
      "country": null,
      "zip": null,
      "telephone": null,
      "state": null
    }
  ],
  "pagination": {
    "per": 25,
    "page": 1,
    "total_pages": 1,
    "query": "domainexample.com",
    "filter": null,
    "status": null,
    "sort_field": null,
    "sort": null,
    "total_records": 1,
    "totals": {
      "all": 1,
      "enabled": 1,
      "disabled": 0,
      "ownership_check": 0,
      "unhealthy": 1,
      "failure": 0
    }
  }
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

No domains found for this request.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domains - Skip DNS verification

This method is used to skip domain ownership verification through DNS query. This method is reserved to wholesales.

put
https://api.qboxmail.com/api/domains/:code/skip_ownership_check

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No content 204

Field Type Description
none String

No content.

/*
 * Skip Domain verification
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d "" https://api.qboxmail.com/api/domains/D072048005/skip_ownership_check


Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domains - Validate DNS ownership

This method is used to validate domain ownership through DNS record.

put
https://api.qboxmail.com/api/domains/:code/dns_ownership_check

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No content 204

Field Type Description
none String

No content.

/*
 * Enable Domain verification using DNS query
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d "" https://api.qboxmail.com/api/domains/D072048005/dns_ownership_check


Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domains - Validate HTML ownership

This method is used to verify the file HTML upload to the root of the site. Generate the file to upload using the "Generate HTML ownership" endpoint

put
https://api.qboxmail.com/api/domains/:code/dns_ownership_check

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No content 204

Field Type Description
body json

message and url to use to download the file

/*
 * Enable Domain verification using DNS query
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d "" https://api.qboxmail.com/api/domains/D072048005/html_ownership_check


> PUT /api/domains/D072048005/html_ownership_check HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domain Aliases

Domain_Aliases - Add new domain alias

This method is used to add new alias to a domain alias. The domain alias code is returned in the location header field.

post
https://api.qboxmail.com/api/domains/:code/aliases

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
name String

Domain name without www.

Created 201

Field Type Description
message String

Confirmation message.

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST -d '{ "name":"hello1.com" }' \
    https://api.qboxmail.com/api/domains/D727264119/aliases

> POST /api/domains/D727264119/aliases HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 35

< HTTP/1.1 201 Created
< Location: https://api.qboxmail.com/domains/D727264119/aliases/AD72157178
< Content-Type: application/json
< Content-Length: 28
< Etag: W/"a0d00fe50a65a8b47780d2dce5029fb4"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: d10991f5-9609-443e-ae23-8f60c8bb15d5
< X-Runtime: 0.035825
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 07:07:23 GMT
< Connection: Keep-Alive

Body:
{
    "message": "risorsa creata"
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field":"name",
            "description":"non è un valore valido"
        },
    ]
}

Domain_Aliases - Check MX records validity

This method is used to check domain alias MX records validity.

put
https://api.qboxmail.com/api/domains_alias/:code/dns

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No content 204

Field Type Description
none String

No content.

/*
 * Check Domain Alias MX records validity
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d "" https://api.qboxmail.com/api/domains/D072048005/aliases/AD72157178/dns


Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domain_Aliases - Delete a registered domain alias

This method is used to delete a registered domain alias.

delete
https://api.qboxmail.com/api/domains/:code/aliases/:alias_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No Content 204

Field Type Description
none json

No Content

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X DELETE https://api.qboxmail.com/api/domains/D727264119/aliases/AD40567094

> DELETE /api/domains/D727264119/aliases/AD40567094 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: cb06f989-0067-49a5-85e4-c8d6baaa2b4a
< X-Runtime: 0.025276
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 08:14:38 GMT
< Connection: Keep-Alive

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain alias not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domain_Aliases - Get details of registered alias

This method is used to get the details of a registered domain alias.

get
https://api.qboxmail.com/api/domains/:code/aliases/:alias_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

OK 200

Field Type Description
message json

Details of registered domain alias

/*
 * Get the information of a specified domain alias
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/domains/D727264119/aliases/AD72157178

> GET /api/domains/D727264119/aliases/AD72157178 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 415
< Etag: W/"979219bbd183d9a5256b4f348f0a706d"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 6cfb39d6-50a2-4850-9038-f7d4a0a63215
< X-Runtime: 0.024699
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 08:09:55 GMT
< Connection: Keep-Alive

Body:
{
    "resources": [{
        "id": 5,
        "creator_id": 5,
        "domain_id": 12,
        "status": "ownership_check",
        "status_detail": null,
        "is_healthy": false,
        "code": "AD72157178",
        "name": "hello1.com",
        "possession_a_record": "ad72157178",
        "activated_at": null,
        "created_at": "2016-11-29T07:07:23.000Z",
        "updated_at": "2016-11-29T07:07:23.000Z",
        "is_pilot": false,
        "ownership_verification_random_code": null,
        "ownership_verification_email_address": null
    }],
    "pagination": {}
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain alias not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domain_Aliases - Get list of registered aliases

This method is used to get the list of registered domain aliases.

get
https://api.qboxmail.com/api/domains/:code/aliases

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
query optional String

Filter results by name.

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of domains on each page.

Default value: 25

OK 200

Field Type Description
message json

List of registered domains

/*
 * Get the list of the registered domain aliases.
 * One is waiting for verification.
 * One is enabled.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/domains/D727264119/aliases

> GET /api/domains/D727264119/aliases HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 863
< Etag: W/"8ea2c5404326f9cd0ae7993c5b931385"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 3f00e32e-f5ed-4595-8633-5b7f66132f44
< X-Runtime: 0.018738
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 07:58:13 GMT
< Connection: Keep-Alive

Body:
{
    "resources": [{
        "id": 5,
        "creator_id": 5,
        "domain_id": 12,
        "status": "ownership_check",
        "status_detail": null,
        "is_healthy": false,
        "code": "AD72157178",
        "name": "hello1.com",
        "possession_a_record": "ad72157178",
        "activated_at": null,
        "created_at": "2016-11-29T07:07:23.000Z",
        "updated_at": "2016-11-29T07:07:23.000Z",
        "is_pilot": false,
        "ownership_verification_random_code": null,
        "ownership_verification_email_address": null
    }, {
        "id": 6,
        "creator_id": 5,
        "domain_id": 12,
        "status": "ownership_check",
        "status_detail": null,
        "is_healthy": false,
        "code": "AD40567094",
        "name": "example.com",
        "possession_a_record": "ad40567094",
        "activated_at": null,
        "created_at": "2016-11-29T07:15:20.000Z",
        "updated_at": "2016-11-29T07:15:20.000Z",
        "is_pilot": false,
        "ownership_verification_random_code": null,
        "ownership_verification_email_address": null
    }],
    "pagination": {
        "per": 25,
        "page": 1,
        "total_pages": 1,
        "query": null,
        "total_records": 2
    }
}
/*
 * Get the list of all domain aliases that contain the string "hello1"
 * selecting only one record per page
 * and pointing to page 1.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET "https://api.qboxmail.com/api/domains/D727264119/aliases?page=1&per=1&query=hello1"

> GET /api/domains/D727264119/aliases?page=1&per=1&query=hello1 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 482
< Etag: W/"1c35ce98954be3e915acaa0ce6de31a9"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: abc9f0f5-f8b4-4c4b-aef3-5ccb45a016be
< X-Runtime: 0.023253
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 08:05:13 GMT
< Connection: Keep-Alive

Body:
{
    "resources": [{
        "id": 5,
        "creator_id": 5,
        "domain_id": 12,
        "status": "ownership_check",
        "status_detail": null,
        "is_healthy": false,
        "code": "AD72157178",
        "name": "hello1.com",
        "possession_a_record": "ad72157178",
        "activated_at": null,
        "created_at": "2016-11-29T07:07:23.000Z",
        "updated_at": "2016-11-29T07:07:23.000Z",
        "is_pilot": false,
        "ownership_verification_random_code": null,
        "ownership_verification_email_address": null
    }],
    "pagination": {
        "per": 1,
        "page": 1,
        "total_pages": 1,
        "query": "hello1",
        "total_records": 1
    }
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain alias not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domain_Aliases - Skip DNS verification

This method is used to skip alias domain ownership verification through DNS query. This method is reserved to wholesales.

put
https://api.qboxmail.com/api/domains/:code/aliases/:alias_code/skip_ownership_check

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No content 204

Field Type Description
none String

No content.

/*
 * Skip Alias Domain verification
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d "" https://api.qboxmail.com/api/domains/D727264119/aliases/AD72157178/skip_ownership_check


Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Domain_Aliases - Validate DNS ownership

This method is used to validate alias domain ownership through DNS record.

put
https://api.qboxmail.com/api/domains/:code/aliases/:alias_code/dns_ownership_check

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No content 204

Field Type Description
none String

No content.

/*
 * Enable Alias Domain verification using DNS query
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d "" https://api.qboxmail.com/api/domains/D727264119/aliases/AD72157178/dns_ownership_check


Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Emails

Emails - Add new email

This method is used to add a new email for a domain. The email code is returned in the location header field.

post
https://api.qboxmail.com/api/domains/:code/email_accounts

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
name String

Email name (string before @).

password String

Password of the account (min 8 chars and at least one number).

password_confirmation String

Repeat the password.

firstname String

Firstname of the user of the email account. (or generic description if not a person)

lastname optional String

Lastname of the user of the email account.

forwards optional String[]

List of valid email address to forwards the messages.

Default value: empty

Size range: 0-5

keep_copy optional Boolean

Can be true only if there are some forwards; if true, a copy of the fowarded message is kept.

Default value: false

max_email_quota optional Integer

Max quota in bytes for the email accounts of the domain.

Default value: 8589934592

Allowed values: 1073741824, 2147483648, 3221225472, 4294967296, 5368709120, 6442450944, 7516192768, 8589934592, 17179869184, 26843545600

bounce_mail optional Boolean

Can be true only if there are any forwards; if true, the email account does not accept messages.

Default value: false

bounce_msg optional String

The message that the email account will send when boucing messages.

allow_nets optional String[]

List of valid ip addresses.

Default value: empty

Size range: 0-5

apply_allow_nets_webmail optional Boolean

Apply allow nets rules also to the webmail access. Only available on email accounts of domains with plan "enterprise".

Default value: false

pop_disabled optional Boolean

Set it to true if you want POP to be disabled.

Default value: false

imap_disabled optional Boolean

Set it to true if you want IMAP to be disabled.

Default value: false

smtp_disabled optional Boolean

Set it to true if you want SMTP to be disabled.

Default value: false

archive_disabled optional Boolean

Set it to true if you want archive to be disabled.

Default value: false

webmail_disabled optional Boolean

Set it to true if you want webmail to be disabled.

Default value: false

autoresponder_enabled optional Boolean

Set it to true to enable autoresponder.

Default value: false

autoresponder_subject optional String

Subject of the autoresponder.

Default value: empty

autoresponder_body optional String

Body message of the autoresponder.

Default value: empty

autoresponder_intervals_enabled optional Boolean

Set it to true if you want to enable date intervals in autoresponder.

Default value: false

autoresponder_start_date optional String

Start date of the autoresponder in ISO8601 format (i.e. "2017-09-02T23:08:00.000Z").

Default value: null

autoresponder_end_date optional String

End date of the autoresponder in ISO8601 format (i.e. "2017-09-02T05:32:00.000Z").

Default value: null

outbound_limit optional Integer

Id of a valid outboud limit to set on the email. Set 0 for the default (follow the domain's limits).

spam_in_inbox optional Boolean

True if we want to store Spam inside Inbox, false otherwise.

password_expiration optional Integer

Set the number of months before the password will expire and will need to be changed. Only available on email accounts of domains with plan "professional" or "enterprise"

Default value: -1

Allowed values: -1, 3, 6, 12

password_change_disabled optional Boolean

Disable possibility to change password by the user. Only the domain owner will be able to change users passwords. Only available on email accounts of domains with plan "professional" or "enterprise"

Default value: false

password_recovery_disabled optional Boolean

Disable possibility to ask password recovery by the user. Only available on email accounts of domains with plan "professional" or "enterprise"

Default value: false

block_old_password optional Boolean

If true, the user will not be able to use password already used in the past. Only available on email accounts of domains with plan "enterprise"

Default value: false

api_enabled optional Boolean

Enable API access for this account. Only available on email accounts of domains with plan "professional" or "enterprise"

Default value: true

force_otp optional Boolean

If true, user must have to use 2 factor authentication to login on Qboxmail services.
Only available on email accounts of domains with plan "enterprise"

Default value: false

chat optional Boolean

Enable chat on Qboxmail webmail. Only available on email accounts of domains with plan "enterprise"

Default value: true

activesync optional Boolean

Enable activesync service on domain accounts. Only available on email accounts of domains with plan "professional" or "enterprise".

Default value: true

meeting optional Boolean

Enable meeting video chat on Qboxmail webmail. Only available on email accounts of domains with plan "enterprise"

Default value: true

calendar optional Boolean

Enable calendar on Qboxmail webmail. Only available on email accounts of domains with plan "enterprise"

Default value: true

xmpp optional Boolean

Enable xmpp service on domain accounts. Only available on email accounts of domains with plan "professional" or "enterprise"

Default value: true

dav optional Boolean

Enable dav service on domain accounts. Only available on email accounts of domains with plan "professional" or "enterprise"

Default value: true

secondary_email optional String

Secondary email of the user of the email account. This info will be shown in the addressbook info of this account.

country optional String

Country email of the user of the email account. This info will be shown in the addressbook info of this account.

address optional String

Address of the user of the email account. This info will be shown in the addressbook info of this account.

city optional String

City of the user of the email account. This info will be shown in the addressbook info of this account.

company optional String

Company of the user of the email account. This info will be shown in the addressbook info of this account.

role optional String

Role of the user of the email account. This info will be shown in the addressbook info of this account.

telephone optional String

Telephone number of the user of the email account. This info will be shown in the addressbook info of this account.

mobilephone optional String

Mobilephone number of the user of the email account. This info will be shown in the addressbook info of this account.

fax optional String

Fax number of the user of the email account. This info will be shown in the addressbook info of this account.

state optional String

State of the user of the email account. This info will be shown in the addressbook info of this account.

zip optional String

Zip of the user of the email account. This info will be shown in the addressbook info of this account.

Created 201

Field Type Description
message String

Confirmation message.

/**
 * Create a new email account (info@hello2.com)
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST -d '{
        "name":"info",
        "firstname": "info",
        "password":"Qwertyuiop0",
        "password_confirmation":"Qwertyuiop0" }' \
    https://api.qboxmail.com/api/domains/D727264119/email_accounts

> POST /api/domains/D727264119/email_accounts HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 108

< HTTP/1.1 201 Created
< Location: https://api.qboxmail.com/domains/D727264119/email_accounts/EA03350967
< Content-Type: application/json
< Content-Length: 28
< Etag: W/"a0d00fe50a65a8b47780d2dce5029fb4"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: e9032d55-3d8a-4c5f-99d9-af18bb44c015
< X-Runtime: 0.775738
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 08:38:30 GMT
< Connection: Keep-Alive

Body:
{
    "message": "risorsa creata"
}
/**
 * Create a new email account (matteo@hello2.com)
 * with three forwards and keep a copy of the forwarded messages.
 */
curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST -d '{
        "name":"matteo",
        "firstname": "matteo",
        "password":"Qwertyuiop0",
        "password_confirmation":"Qwertyuiop0",
        "forwards":["info@hello2.com","matteo@xyz.com","matteo111@gmail.com"],
        "keep_copy":true }' \
    https://api.qboxmail.com/api/domains/D727264119/email_accounts

> POST /api/domains/D727264119/email_accounts HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 223

< HTTP/1.1 201 Created
< Location: https://api.qboxmail.com/domains/D727264119/email_accounts/EA19113732
< Content-Type: application/json
< Content-Length: 28
< Etag: W/"a0d00fe50a65a8b47780d2dce5029fb4"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 6008a452-3288-4c9f-91e1-63c65b36eb6c
< X-Runtime: 0.784350
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 08:45:50 GMT
< Connection: Keep-Alive

Body:
{
    "message": "risorsa creata"
}
/**
 * Create a new email account (test@hello2.com)
 * with access limited to a specified ip addresses
 * and SMTP disabled.
 */
curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST -d '{
        "name":"test",
        "firstname": "test",
        "password":"Qwertyuiop0",
        "password_confirmation":"Qwertyuiop0",
        "allow_nets":["194.4.5.6","194.4.5.7"],
        "smtp_disabled":true }' \
    https://api.qboxmail.com/api/domains/D727264119/email_accounts

> POST /api/domains/D727264119/email_accounts HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 223

< HTTP/1.1 201 Created
< Location: https://api.qboxmail.com/domains/D727264119/email_accounts/EA19113732
< Content-Type: application/json
< Content-Length: 28
< Etag: W/"a0d00fe50a65a8b47780d2dce5029fb4"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 6008a452-3288-4c9f-91e1-63c65b36eb6c
< X-Runtime: 0.784350
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 08:45:50 GMT
< Connection: Keep-Alive

Body:
{
    "message": "risorsa creata"
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field": "max_email_quota",
            "description": "non è un valore valido"
        }
    ]
}

Emails - Change email status

This method is used to change email account status (enable/disable).

put
https://api.qboxmail.com/api/domains/:code/email_accounts/:email_code/status

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
status optional String

New email status.

Allowed values: disabled, enabled

bounce_msg optional String

Bounce message to use when disabled.

No content 204

Field Type Description
none String

No content.

/*
 * Disable email account
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{ "status":"disabled", "bounce_msg":"This address is disabled and no longer accepts mail." }' \
    https://api.qboxmail.com/api/domains/D727264119/email_accounts/EA19113732/status

> PUT /api/domains/D727264119/email_accounts/EA19113732/status HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field": "max_email_quota",
            "description": "non è un valore valido"
        }
    ]
}

Emails - Delete a configured email

This method is used to delete a configured email address.

delete
https://api.qboxmail.com/api/domains/:code/email_accounts/:email_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No Content 204

Field Type Description
none json

No Content

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X DELETE https://api.qboxmail.com/api/domains/D727264119/email_accounts/EA19113732

    > DELETE /api/domains/D727264119/email_accounts/EA19113732 HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.51.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
    >
    < HTTP/1.1 204 No Content
    < Cache-Control: no-cache
    < X-Request-Id: 8de90f43-0b72-4c3e-9755-e254c4e97c9c
    < X-Runtime: 0.030340
    < Vary: Origin
    < Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
    < Date: Mon, 28 Nov 2016 14:21:22 GMT
    < Connection: Keep-Alive

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Emails - Edit email attributes

This method is used to change email attributes.

put
https://api.qboxmail.com/api/domains/:code/email_accounts/:email_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
password optional String

Password of the account (min 8 chars and at least one number).

password_confirmation optional String

Repeat the password.

firstname optional String

Firstname of the user of the email account. (or generic description if not a person)

lastname optional String

Lastname of the user of the email account.

forwards optional String[]

List of valid email address to forwards the messages.

Size range: 0-5

keep_copy optional Boolean

Can be true only if there are some forwards; if true, a copy of the fowarded message is kept.

max_email_quota optional Integer

Max quota in bytes for the email accounts of the domain.

Allowed values: 1073741824, 2147483648, 3221225472, 4294967296, 5368709120, 6442450944, 7516192768, 8589934592, 17179869184, 26843545600

bounce_mail optional Boolean

Can be true only if there are any forwards; if true, the email account does not accept messages.

bounce_msg optional String

The message that the email account will send when boucing messages.

allow_nets optional String[]

List of valid ip addresses.

Size range: 0-5

apply_allow_nets_webmail optional Boolean

Apply allow nets rules also to the webmail access. Only available on email accounts of domains with plan "enterprise".

Default value: false

pop_disabled optional Boolean

Set it to true if you want POP to be disabled.

imap_disabled optional Boolean

Set it to true if you want IMAP to be disabled.

smtp_disabled optional Boolean

Set it to true if you want SMTP to be disabled.

archive_disabled optional Boolean

Set it to true if you want archive to be disabled.

webmail_disabled optional Boolean

Set it to true if you want webmail to be disabled.

autoresponder_enabled optional Boolean

Set it to true to enable autoresponder.

autoresponder_subject optional String

Subject of the autoresponder.

autoresponder_body optional String

Body message of the autoresponder.

autoresponder_intervals_enabled optional Boolean

Set it to true if you want to enable date intervals in autoresponder.

Default value: false

autoresponder_start_date optional String

Start date of the autoresponder in ISO8601 format (i.e. "2017-09-02T23:08:00.000Z").

Default value: null

autoresponder_end_date optional String

End date of the autoresponder in ISO8601 format (i.e. "2017-09-02T05:32:00.000Z").

Default value: null

outbound_limit optional Integer

Id of a valid outboud limit to set on the email. Set 0 for the default (follow the domain's limits).

spam_in_inbox optional Boolean

True if we want to store Spam inside Inbox, false otherwise.

No content 204

Field Type Description
none String

No content.

/*
 * Disable smtp on this email address
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{ "smtp_disabled":true }' \
    https://api.qboxmail.com/api/domains/D727264119/email_accounts/EA19113732

> PUT /api/domains/D727264119/email_accounts/EA19113732 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty
/*
 * Set forwarders to this email address
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{ "forwards":["info@aaa.com","test@infodomain.eu"] }' \
    https://api.qboxmail.com/api/domains/D727264119/email_accounts/EA19113732

> PUT /api/domains/D727264119/email_accounts/EA19113732 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty
/*
 * Change password of this email address
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{
        "password":"Qwertyuiop0",
        "password_confirmation":"Qwertyuiop0" }' \
    https://api.qboxmail.com/api/domains/D727264119/email_accounts/EA19113732

> PUT /api/domains/D727264119/email_accounts/EA19113732 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty
/*
 * Configure autoresponder
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{
        "autoresponder_enable":true,
        "autoresponder_subject":"Out of office"
        "autoresponder_body":"I am out of office with limited email access until next Monday..." }' \
    https://api.qboxmail.com/api/domains/D727264119/email_accounts/EA19113732

> PUT /api/domains/D727264119/email_accounts/EA19113732 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 403

Name Type Description
Forbidden json

Not permitted.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "message": "Quota massima del dominio superata"
}
{
    "error": "Risorsa non trovata"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field": "max_email_quota",
            "description": "non è un valore valido"
        }
    ]
}

Emails - Get details of a configured email

This method is used to get the details of a configured email address.

get
https://api.qboxmail.com/api/domains/:code/email_accounts/:email_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

OK 200

Field Type Description
message json

Details of registered domain

/*
 * Get the information of a specified email address
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/domains/D727264119/email_accounts/EA19113732

> GET /api/domains/D727264119/email_accounts/EA19113732 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 1305
< Etag: W/"dac18324d194eaca01b66d28b2e42671"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 9a421cfc-e6c3-487f-a1a6-e3e21c6ce805
< X-Runtime: 0.036221
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 09:30:06 GMT
< Connection: Keep-Alive

Body:
{
    "resources": [{
        "type": "EmailAccount",
        "otp": false,
        "email_address": "matteo@hello2.com",
        "timezone": "Europe/Berlin",
        "otp_secret": null,
        "api_token": null,
        "session_token": null,
        "session_ip": null,
        "allow_nets": "0.0.0.0/0",
        "login_mail_notification": "none",
        "session_token_expire": null,
        "created_at": "2016-11-29T08:45:50.000Z",
        "updated_at": "2016-11-29T08:45:58.000Z",
        "language": "it",
        "domain_id": 12,
        "status": "enabled",
        "status_detail": "",
        "name": "matteo",
        "firstname": "matteo",
        "lastname": null,
        "code": "EA19113732",
        "email_services": 0,
        "archive": false,
        "forwards": "info@hello1.com,matteo@xyz.com,matteo111@gmail.com",
        "keep_copy": true,
        "autoresponder_enabled": false,
        "autoresponder_subject": null,
        "autoresponder_body": null,
        "autoresponder_intervals": [],
        "max_email_quota": 2147483648,
        "bounce_mail": false,
        "activated_at": null,
        "domain_code": "D727264119",
        "domain_name": "hello2.com",
        "imap_disabled": false,
        "pop_disabled": false,
        "webmail_disabled": false,
        "archive_disabled": false,
        "smtp_disabled": false,
        "lastauth": null,
        "lastauth_datetime": null,
        "lastauth_protocol": null,
        "messages": 0,
        "quota": 0,
        "outbound_limit": 0,
        "outbound_limit_status": 232,
        "outbound_limit_period": 86400,
        "reset_outbound_limit_time": "2017-03-15T08:58:50.688Z"
    }],
    "pagination": {}
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Emails - Get list of all emails of a domain

This method is used to get the list of all configured email of a domain.

get
https://api.qboxmail.com/api/domains/:code/email_accounts

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
query optional String

Filter results by name.

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of domains on each page.

Default value: 25

OK 200

Field Type Description
message json

List of configured emails.

/*
 * Get the list of the emails for this domain.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/domains/D727264119/email_accounts

> GET /api/domains/D727264119/email_accounts HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 3723
< Etag: W/"f8be17d3b9b68a32412473e367652e54"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: da35cd18-38a2-4c7b-97c4-708169c8ceb2
< X-Runtime: 0.401339
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 09:21:05 GMT
< Connection: Keep-Alive

Body:
{
    "resources": [
        {
        "activated_at": null,
        "archive_activated_at": null,
        "created_at": "2019-08-07T10:43:48.000+02:00",
        "updated_at": "2019-08-07T10:46:03.000+02:00",
        "archive_import_executed_at": null,
        "allow_nets": [
            "0.0.0.0/0"
        ],
        "api_token": null,
        "archive": false,
        "archive_disabled": false,
        "pop_disabled": false,
        "email_services": 0,
        "webmail_disabled": false,
        "imap_disabled": false,
        "smtp_disabled": false,
        "xmpp": false,
        "calendar": false,
        "meeting": false,
        "activesync": false,
        "chat": false,
        "dav": false,
        "max_email_quota": 8589934592,
        "status": "failure",
        "status_detail": "already_exist_in_vpopmail",
        "archive_status": null,
        "archive_import_status": null,
        "timezone": "Europe/Rome",
        "type": "EmailAccount",
        "code": "EA06298313",
        "name": "nic",
        "imapsync_errors": null,
        "domain_name": "testdomain.com",
        "domain_code": "D727264119",
        "domain_force_otp": true,
        "email_address": "nic@testdomain.com",
        "language": "en",
        "bounce_mail": false,
        "bounce_msg": null,
        "keep_copy": false,
        "forwards": [],
        "autoresponder_subject": null,
        "autoresponder_body": null,
        "autoresponder_enabled": false,
        "autoresponder_start_date": null,
        "autoresponder_end_date": null,
        "autoresponder_intervals_enabled": false,
        "lastauth": "none",
        "lastauth_protocol": null,
        "lastauth_datetime": null,
        "messages": 0,
        "quota": 0,
        "vault_quota": 0,
        "vault_messages": 0,
        "otp": false,
        "otp_secret": null,
        "sessions": [],
        "customization_logo": null,
        "customization_help_desk_url": null,
        "customization_company": null,
        "outbound_limit": 0,
        "outbound_limit_status": 0,
        "outbound_limit_period": 86400,
        "reset_outbound_limit_time": "2019-08-08T11:07:27.425+02:00",
        "spam_in_inbox": false,
        "retention": 0,
        "delegates": [],
        "delegates_no": null,
        "qbvault_last_auth": null,
        "qbvault_session_ip": null,
        "firstname": "Nicolll",
        "lastname": null,
        "secondary_email": null,
        "country": null,
        "city": null,
        "state": null,
        "zip": null,
        "address": null,
        "company": "Lab87",
        "role": null,
        "team_manager": null,
        "telephone": null,
        "mobilephone": null,
        "fax": null,
        "api_enabled": false,
        "force_otp": false,
        "block_old_password": false,
        "password_expiration": -1,
        "password_recovery_disabled": false,
        "password_change_disabled": false,
        "force_new_password": false,
        "password_expired": false
        },
        {
        "activated_at": null,
        "archive_activated_at": null,
        "created_at": "2019-08-07T10:46:17.000+02:00",
        "updated_at": "2019-08-07T10:46:22.000+02:00",
        "archive_import_executed_at": null,
        "allow_nets": [
            "0.0.0.0/0"
        ],
        "api_token": null,
        "archive": false,
        "archive_disabled": false,
        "pop_disabled": false,
        "email_services": 0,
        "webmail_disabled": false,
        "imap_disabled": false,
        "smtp_disabled": false,
        "xmpp": false,
        "calendar": true,
        "meeting": true,
        "activesync": false,
        "chat": true,
        "dav": false,
        "max_email_quota": 8589934592,
        "status": "enabled",
        "status_detail": "ok",
        "archive_status": null,
        "archive_import_status": null,
        "timezone": "Europe/Rome",
        "type": "EmailAccount",
        "code": "EA17120927",
        "name": "nicy",
        "imapsync_errors": null,
        "domain_name": "testdomain.com",
        "domain_code": "D727264119",
        "domain_force_otp": true,
        "email_address": "nicy@testdomain.com",
        "language": "en",
        "bounce_mail": false,
        "bounce_msg": null,
        "keep_copy": false,
        "forwards": [],
        "autoresponder_subject": null,
        "autoresponder_body": null,
        "autoresponder_enabled": false,
        "autoresponder_start_date": null,
        "autoresponder_end_date": null,
        "autoresponder_intervals_enabled": false,
        "lastauth": "none",
        "lastauth_protocol": null,
        "lastauth_datetime": null,
        "messages": 0,
        "quota": 0,
        "vault_quota": 0,
        "vault_messages": 0,
        "otp": false,
        "otp_secret": null,
        "sessions": [],
        "customization_logo": null,
        "customization_help_desk_url": null,
        "customization_company": null,
        "outbound_limit": 0,
        "outbound_limit_status": 0,
        "outbound_limit_period": 86400,
        "reset_outbound_limit_time": "2019-08-08T11:07:27.469+02:00",
        "spam_in_inbox": false,
        "retention": 0,
        "delegates": [],
        "delegates_no": null,
        "qbvault_last_auth": null,
        "qbvault_session_ip": null,
        "firstname": "Nicolll",
        "lastname": null,
        "secondary_email": null,
        "country": null,
        "city": null,
        "state": null,
        "zip": null,
        "address": null,
        "company": "Lab87",
        "role": null,
        "team_manager": null,
        "telephone": null,
        "mobilephone": null,
        "fax": null,
        "api_enabled": false,
        "force_otp": false,
        "block_old_password": false,
        "password_expiration": -1,
        "password_recovery_disabled": false,
        "password_change_disabled": false,
        "force_new_password": false,
        "password_expired": false
        }
    ],
    "pagination": {
        "per": 25,
        "page": 1,
        "total_pages": 1,
        "query": null,
        "filter": null,
        "status": null,
        "sort_field": null,
        "sort": null,
        "total_records": 2,
        "totals": {
        "all": 2,
        "enabled": 1,
        "disabled": 0,
        "failure": 1,
        "updating": 0
        }
    }
}
/*
 * Get the list of all emails that contain the string "matteo"
 * selecting only one record per page
 * and pointing to page 1.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET "https://api.qboxmail.com/api/domains/D727264119/email_accounts?page=1&per=1&query=matteo"

> GET /api/domains/D727264119/email_accounts?page=1&per=1&query=matteo HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 1372
< Etag: W/"14700925e70b665666a3478e6fe8b905"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: c6b0f6eb-0ccd-4d35-b0ae-ae5df27029f2
< X-Runtime: 0.072608
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 09:24:37 GMT
< Connection: Keep-Alive

Body:
{
    "resources": [{
        "activated_at": null,
        "archive_activated_at": null,
        "created_at": "2019-08-07T10:43:48.000+02:00",
        "updated_at": "2019-08-07T10:46:03.000+02:00",
        "archive_import_executed_at": null,
        "allow_nets": [
            "0.0.0.0/0"
        ],
        "api_token": null,
        "archive": false,
        "archive_disabled": false,
        "pop_disabled": false,
        "email_services": 0,
        "webmail_disabled": false,
        "imap_disabled": false,
        "smtp_disabled": false,
        "xmpp": false,
        "calendar": false,
        "meeting": false,
        "activesync": false,
        "chat": false,
        "dav": false,
        "max_email_quota": 8589934592,
        "status": "failure",
        "status_detail": "already_exist_in_vpopmail",
        "archive_status": null,
        "archive_import_status": null,
        "timezone": "Europe/Rome",
        "type": "EmailAccount",
        "code": "EA06298313",
        "name": "matteo",
        "imapsync_errors": null,
        "domain_name": "hello2.com",
        "domain_code": "D026385550",
        "domain_force_otp": true,
        "email_address": "matteo@hello2.com",
        "language": "en",
        "bounce_mail": false,
        "bounce_msg": null,
        "keep_copy": false,
        "forwards": [],
        "autoresponder_subject": null,
        "autoresponder_body": null,
        "autoresponder_enabled": false,
        "autoresponder_start_date": null,
        "autoresponder_end_date": null,
        "autoresponder_intervals_enabled": false,
        "lastauth": "none",
        "lastauth_protocol": null,
        "lastauth_datetime": null,
        "messages": 0,
        "quota": 0,
        "vault_quota": 0,
        "vault_messages": 0,
        "otp": false,
        "otp_secret": null,
        "sessions": [],
        "customization_logo": null,
        "customization_help_desk_url": null,
        "customization_company": null,
        "outbound_limit": 0,
        "outbound_limit_status": 0,
        "outbound_limit_period": 86400,
        "reset_outbound_limit_time": "2019-08-08T11:09:47.287+02:00",
        "spam_in_inbox": false,
        "retention": 0,
        "delegates": [],
        "delegates_no": null,
        "qbvault_last_auth": null,
        "qbvault_session_ip": null,
        "firstname": "matteo",
        "lastname": null,
        "secondary_email": null,
        "country": null,
        "city": null,
        "state": null,
        "zip": null,
        "address": null,
        "company": "Lab87",
        "role": null,
        "team_manager": null,
        "telephone": null,
        "mobilephone": null,
        "fax": null,
        "api_enabled": false,
        "force_otp": false,
        "block_old_password": false,
        "password_expiration": -1,
        "password_recovery_disabled": false,
        "password_change_disabled": false,
        "force_new_password": false,
        "password_expired": false
    }],
    "pagination": {
        "per": 1,
        "page": 1,
        "total_pages": 1,
        "query": "matteo",
        "total_records": 1
    }
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Email Aliases

Email_Aliases - Add new email alias

This method is used to add new email alias to a domain. The email alias code is returned in the location header field.

post
https://api.qboxmail.com/api/domains/:code/alias_email_accounts

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
name String

Email alias name (before @)

destinations String[]

Valid email addresses (max 6)

Created 201

Field Type Description
message String

Confirmation message.

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST -d '{ "name":"staff", "destinations":["aaa@gmail.com","matteo@hello1.com"] }' \
    https://api.qboxmail.com/api/domains/D727264119/alias_email_accounts

> POST /api/domains/D727264119/alias_email_accounts HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 72
>
* upload completely sent off: 72 out of 72 bytes
< HTTP/1.1 201 Created
< Location: https://api.qboxmail.com/domains/D727264119/alias_email_accounts/AE43007508
< Content-Type: application/json
< Content-Length: 28
< Etag: W/"a0d00fe50a65a8b47780d2dce5029fb4"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 68c0b758-4b9e-4c28-a621-13125f081fc7
< X-Runtime: 0.117730
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 09:55:31 GMT
< Connection: Keep-Alive

Body:
{
    "message": "risorsa creata"
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field":"destinations",
            "description":"non è presente"
        },
    ]
}

Email_Aliases - Delete a configured email alias

This method is used to delete a configured email alias.

delete
https://api.qboxmail.com/api/domains/:code/alias_email_accounts/:alias_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No Content 204

Field Type Description
none json

No Content

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X DELETE https://api.qboxmail.com/api/domains/D727264119/aliases/AE43007508

> DELETE /api/domains/D727264119/alias_email_accounts/AE43007508 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: cb06f989-0067-49a5-85e4-c8d6baaa2b4a
< X-Runtime: 0.025276
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 08:14:38 GMT
< Connection: Keep-Alive

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Email_Aliases - Edit email alias attributes

This method is used to add a new destination to an existing email alias.

put
https://api.qboxmail.com/api/domains/:code/alias_email_accounts/:alias_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
destinations String[]

Valid email addresses (max 6)

No content 204

Field Type Description
none String

No content.

/*
 * Add destination to an existing email alias
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{"destinations":["aaa@example.com"]}' https://api.qboxmail.com/api/domains/D727264119/alias_email_accounts/AE43007508

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field":"destinations",
            "description":"non è presente"
        },
    ]
}

Email_Aliases - Get details of configured alias

This method is used to get the details of a configured email alias.

get
https://api.qboxmail.com/api/domains/:code/alias_email_accounts/:alias_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

OK 200

Field Type Description
message json

Details of configured email alias

/*
 * Get the information of a specified email alias
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/domains/D727264119/alias_email_accounts/AE43007508

> GET /api/domains/D727264119/alias_email_accounts/AE43007508 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 259
< Etag: W/"5dc2530240bdec31f9c6bb84d30bd60d"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 0c4568b1-2349-4be8-922c-2e876f6910ef
< X-Runtime: 0.027843
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 10:25:28 GMT
< Connection: Keep-Alive

Body:
{
    "resources": [{
        "code": "AE43007508",
        "name": "staff",
        "destinations": "aaa@gmail.com,matteo@hello1.com",
        "created_at": "2016-11-29T09:55:31.000Z",
        "updated_at": "2016-11-29T09:55:31.000Z",
        "status": null,
        "status_detail": null,
        "domain_name": "hello2.com"
    }],
    "pagination": {}
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Email_Aliases - Get list of email aliases

This method is used to get the list of configured email aliases.

get
https://api.qboxmail.com/api/domains/:code/alias_email_accounts

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
query optional String

Filter results by name.

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of email aliases on each page.

Default value: 25

OK 200

Field Type Description
message json

List of registered emails

/*
 * Get the list of the configured email aliases.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/domains/D727264119/alias_email_accounts

> GET /api/domains/D727264119/alias_email_accounts HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 323
< Etag: W/"317aa8b790e083b247a8b04aae9ea76a"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 7421f143-dfe5-4d58-8fad-5f9e938e9a5e
< X-Runtime: 0.022556
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 10:05:31 GMT
< Connection: Keep-Alive

Body:
{
    "resources": [{
        "code": "AE43007508",
        "name": "staff",
        "destinations": "aaa@gmail.com,matteo@hello1.com",
        "created_at": "2016-11-29T09:55:31.000Z",
        "updated_at": "2016-11-29T09:55:31.000Z",
        "status": null,
        "status_detail": null,
        "domain_name": "hello2.com"
    }],
    "pagination": {
        "per": 25,
        "page": 1,
        "total_pages": 1,
        "query": null,
        "total_records": 1
    }
}
/*
 * Get the list of all email aliases that contain the string "staff"
 * selecting only one record per page
 * and pointing to page 1.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET "https://api.qboxmail.com/api/domains/D727264119/alias_email_accounts?page=1&per=1&query=staff"

> GET /api/domains/D727264119/alias_email_accounts?page=1&per=1&query=staff HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 325
< Etag: W/"62db232622c6cebb443353a37b06555a"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 9051254e-216e-4489-a84b-591b7346d85a
< X-Runtime: 0.043649
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Tue, 29 Nov 2016 10:07:30 GMT
< Connection: Keep-Alive

Body:
{
    "resources": [{
        "code": "AE43007508",
        "name": "staff",
        "destinations": "aaa@gmail.com,matteo@hello1.com",
        "created_at": "2016-11-29T09:55:31.000Z",
        "updated_at": "2016-11-29T09:55:31.000Z",
        "status": null,
        "status_detail": null,
        "domain_name": "hello2.com"
    }],
    "pagination": {
        "per": 1,
        "page": 1,
        "total_pages": 1,
        "query": "staff",
        "total_records": 1
    }
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Imports

Imports - Get status of previous imports

This method is used to obtain the status of the previous imports

get
https://api.qboxmail.com/api/imports

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
query optional String

Filter results by name.

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of imports on each page.

Default value: 25

OK 200

Field Type Description
message String

Confirmation message and newly created resource code.

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/imports

> GET /api/imports HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: Lrot09a0cmKqhlCi8Z0GltBKG1T9IoqLuvW_F729lpnTPzToQO-_XS_Cz1n6j8bY
>
< HTTP/1.1 200 OK
< Server: nginx/1.10.2
< Date: Wed, 14 Jun 2017 13:52:01 GMT
< Content-Type: application/json
< Content-Length: 747
< Connection: keep-alive
< ETag: W/"cae1781ed5b0c09e8a61a6879a1a56eb"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 961b767e-7837-49c0-99ca-5456c6903501
< X-Runtime: 0.027292
< Set-Cookie: __profilin=p%3Dt%2Ca%3D09880ab175f83eb0c80bf5b659649a0b%7C7e51f765ea69893a4f864d0188685bea; path=/
< Vary: Origin

{
    "resources":[{
        "id":62,
        "status":"invalid",
        "status_detail":null,
        "expert_mode":true,
        "code":"I026904331",
        "type":"domains",
        "csv_file_name":"aaa.csv_C900473317_3749770e5e19c6b9e93e",
        "csv_file_size":null,
        "created_at":"2017-06-14T13:50:02.000Z",
        "owner":"Customer - Mario Rossi [C900473317]",
        "error_details":[],
        "resources":1
      },{
        "id":61,
        "status":"invalid",
        "status_detail":null,
        "expert_mode":true,
        "code":"I865389923",
        "type":"domains",
        "csv_file_name":"aaa.csv_C900473317_5a6eb36ca7a65656470c",
        "csv_file_size":null,
        "created_at":"2017-06-14T13:49:45.000Z",
        "owner":"Customer - Mario Rossi [C900473317]",
        "error_details":[],
        "resources":1
      }],
      "pagination":{
        "per":25,
        "page":1,
        "total_pages":1,
        "query":null,
        "filter":null,
        "sort_field":null,
        "sort":null,
        "total_records":2
      }
}

Error 400

Name Type Description
BadRequest json

Invalid JSON.

Error 401

Name Type Description
Unauthorized json

Invalid token.

{
    "error": "Unauthorized"
}

Imports - Import email addresses

This method is used to add import email addresses in batch.

post
https://api.qboxmail.com/api/imports

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
csv_file_name String

Name of the CSV file to process.

csv_file_content String

Base64 encoded content of the file.

type String

Type of file

Allowed values: alias_domains, domains, alias_email_accounts, email_accounts

csv_file_size optional String

File size.

expert_mode optional Boolean

Enable/Disable expert mode. Only for resellers plan and only for domains and email_accounts type.

Default value: false

Created 201

Field Type Description
message String

Confirmation message and newly created resource code.


curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST -d '{
        "csv_file_name":"aaa.csv",
        "csv_file_content":"...base64 encoded file...",
        "type": "domains"
    }' \
    https://api.qboxmail.com/api/imports

> POST /api/imports HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: Lrot09a0cmKqhlCi8Z0GltBKG1T9IoqLuvW_F729lpnTPzToQO-_XS_Cz1n6j8bY
> Content-Length: 170
>
* upload completely sent off: 170 out of 170 bytes
< HTTP/1.1 201 Created
< Server: nginx/1.10.2
< Date: Wed, 14 Jun 2017 13:50:02 GMT
< Content-Type: application/json
< Content-Length: 57
< Connection: keep-alive
< ETag: W/"f78f8ea558a0e85c815bbe74cda30fb6"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: addc40fb-0ef6-4911-a1c3-f0effab854e6
< X-Runtime: 0.023921
< Set-Cookie: __profilin=p%3Dt%2Ca%3D09880ab175f83eb0c80bf5b659649a0b%7C7e51f765ea69893a4f864d0188685bea; path=/
< Vary: Origin

Body:
{
    "message": "risorsa creata",
    "resource_code":"I091182607"
}

Error 400

Name Type Description
BadRequest json

Invalid JSON.

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field": "csv_file_content",
            "description": "cannot be empty"
        }
    ]
}

Migrations

Migrations - Get status of previous migrations

This method is used to obtain the status of the previous migrations

get
https://api.qboxmail.com/api/migrations

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
query optional String

Filter results by name.

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of imports on each page.

Default value: 25

OK 200

Field Type Description
message String

Confirmation message and newly created resource code.

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/migrations

> GET /api/migrations HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: Lrot09a0cmKqhlCi8Z0GltBKG1T9IoqLuvW_F729lpnTPzToQO-_XS_Cz1n6j8bY
>
< HTTP/1.1 200 OK
< Server: nginx/1.10.2
< Date: Wed, 14 Jun 2017 16:23:49 GMT
< Content-Type: application/json
< Content-Length: 597
< Connection: keep-alive
< ETag: W/"8956fda7396e9fa96ec884039070f7e5"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: ef3cfe1d-40a0-48ef-b66d-1e4536a79bd8
< X-Runtime: 0.013828
< Set-Cookie: __profilin=p%3Dt%2Ca%3D7caed38281a75c47fbe1da2f441c9688%7C3b5696b246e4ebd4d805b776f329604f; path=/
< Vary: Origin

{
    "resources":[{
        "id":5,
        "status":"scheduled",
        "status_detail":"first execution",
        "has_masteruser":false,
        "code":"MG31279750",
        "csv_file_name":"aaa.csv_C900473317_55655efc18ead93ccca7",
        "csv_file_size":199,
        "migration_option_id":1,
        "migration_option_name":"Aruba",
        "error_details":[],
        "resources":1,
        "created_at":"2017-06-14T16:20:28.000Z",
        "updated_at":"2017-06-14T16:20:30.000Z",
        "first_execution_date":"2017-07-16T18:20:30.000Z",
        "second_execution_date":"2017-07-15T22:20:30.000Z"
      }],
      "pagination":{
        "per":25,
        "page":1,
        "total_pages":1,
        "query":null,
        "filter":null,
        "sort_field":null,
        "sort":null,
        "total_records":1
      }
}

Error 400

Name Type Description
BadRequest json

Invalid JSON.

Error 401

Name Type Description
Unauthorized json

Invalid token.

{
    "error": "Unauthorized"
}

Migrations - Migrate email addresses

This method is used to migrate email addresses in batch.

post
https://api.qboxmail.com/api/migrations

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
csv_file_name String

Name of the CSV file to process.

csv_file_content String

Base64 encoded content of the file.

option String

Migration from

Allowed values: Standard-no-SSL, Standard-SSL, GoogleApps, MailEnable, Aruba, MDaemon, Kerio, SmarterMail

first_execution_date DateTime

First execution date and time in the format ISO 8601 (eg 1997-07-16T19:20:30.45+01:00)

csv_file_size optional String

File size.

has_masteruser optional Boolean

Enable master user on migration.

Default value: false

second_execution_date optional DateTime

Second execution date and time in the format ISO 8601 (eg 1997-07-16T19:20:30.45+01:00)

Created 201

Field Type Description
message String

Confirmation message and newly created resource code.


curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST -d '{
        "csv_file_name":"aaa.csv",
        "csv_file_content":"...base64 encoded file...",
        "first_execution_date": "2017-06-22T19:20:30.00+01:00"
    }' \
    https://api.qboxmail.com/api/migrations

> POST /api/migrations HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: Lrot09a0cmKqhlCi8Z0GltBKG1T9IoqLuvW_F729lpnTPzToQO-_XS_Cz1n6j8bY
> Content-Length: 333
>
* upload completely sent off: 333 out of 333 bytes
< HTTP/1.1 422 Unprocessable Entity
< Server: nginx/1.10.2
< Date: Wed, 14 Jun 2017 16:21:33 GMT
< Content-Type: application/json
< Content-Length: 135
< Connection: keep-alive
< Cache-Control: no-cache
< X-Request-Id: a9bc37b1-2a26-4b6a-9d0d-51fd94594c7b
< X-Runtime: 1.995202
< Set-Cookie: __profilin=p%3Dt%2Ca%3D7caed38281a75c47fbe1da2f441c9688%7C3b5696b246e4ebd4d805b776f329604f; path=/
< Vary: Origin

Body:
{
    "message": "risorsa creata",
    "resource_code":"M091162607"
}

Error 400

Name Type Description
BadRequest json

Invalid JSON.

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field": "second_execution_date",
            "description": "cant be before than first_execution_date"
        }
    ]
}

Users

Users - Set user notifications

This method is used to set user notifications.

put
https://api.qboxmail.com/api/users/:customer_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
allow_nets optional String[]

List of allowed network addresses.

domain_create_callback optional Boolean

Call the callback on new domain creation.

email_overquota_callback optional Boolean

Call the callback when an email account passes its quota limit.

email_overquota_emali optional Boolean

Send an email when when an email account passes its quota limit.

language optional String

Set user language (en, it, etc...)

notification_email optional String

Email address where the notifications will arrive.

notification_url optional String

HTTPS URL of the callback where the notifications will arrive.

timezone optional String

User timezone (i.e. Europe/Rome.

No content 204

Field Type Description
none String

No content.

/*
 * Set notifications through email and callback
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: YqIK52fDo-iNeKlbE0y8KWXceOEkcOzBDrEwgJW0cJUD_dlQ8Rqvn7x3Ra9YBjOC" \
    -X PUT -d '{
        "language":"it",
        "timezone":"Europe/Rome",
        "allow_nets":[],
        "email_overquota_email":true,
        "notification_email":"info@example.com",
        "domain_create_callback":true,
        "email_overquota_callback":true,
        "notification_url":"https://example.com/mycallback.php"}' \
    https://api.qboxmail.com/api/users/C810965359

> PUT /api/users/C810965359 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: YqIK52fDo-iNeKlbE0y8KWXceOEkcOzBDrEwgJW0cJUD_dlQ8Rqvn7x3Ra9YBjOC
> Content-Length: 349

* upload completely sent off: 349 out of 349 bytes
< HTTP/1.1 204 No Content
< Server: nginx/1.10.2
< Date: Fri, 27 Oct 2017 12:51:31 GMT
< Connection: keep-alive
< Cache-Control: no-cache
< X-Request-Id: f15db511-9218-4b53-8ea1-90c570cea209
< X-Runtime: 0.054020
< Set-Cookie: __profilin=p%3Dt%2Ca%3Dd6d81b9839b40bba5870fa29a9cab88c%7C0d4bbba92e8b2b0d26f7f30b65d5a567; path=/
< Vary: Origin

Body: Empty
/*
 * Example of callback in PHP
 */

$res = json_decode(file_get_contents("php://input"));
print_r($res);

===========================================

OUTPUT:

stdClass Object
(
    [action_type] => domain_create
    [update_at] => 2017-10-27T13:11:49.259Z
    [domain_name] => example.com
    [payload] => stdClass Object
        (
            [postmaster_token] =>
            [postmaster_code] => P012453085
        )

)

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 403

Name Type Description
Forbidden json

Not permitted.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "message": "Quota massima del dominio superata"
}
{
    "error": "Risorsa non trovata"
}

Vault

Vault - Add archive for a domain

This method is used to add archive for a domain.

post
https://api.qboxmail.com/api/archive/domains/:domain_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
email_codes String[]

List of email codes to add to the archive.

domain_code String

Domain code the emails belong to.

retention optional Integer

Number of years of messages retention.

Default value: 1

default_archive optional Boolean

True to set archive for every new email account of this domain. False otherwise.

Default value: false

Created 201

Field Type Description
message String

Confirmation message.

/**
 * Add archive for selected domain
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85" \
    -X POST -d '{
        "email_codes": ["P993770558","EA26300813"],
        "domain_code": "D167252002",
        "retention": 7,
        "default_archive": true
      }' \
    https://api.qboxmail.com/api/archive/domains/D167252002

> POST /api/archive/domains/D167252002 HTTP/1.1
> Host: stg-panel.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85
> Content-Length: 161
>
* upload completely sent off: 161 out of 161 bytes
< HTTP/1.1 201 Created
< Server: nginx/1.12.2
< Date: Thu, 05 Apr 2018 10:59:37 GMT
< Content-Type: application/json
< Content-Length: 1021
< Connection: keep-alive
< ETag: W/"64fa9576392326e4da40ca668783dce2"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: a201f195-6095-414b-ac7e-8a9531f8661a
< X-Runtime: 0.188827
< Set-Cookie: __profilin=p%3Dt%2Ca%3Dae37a91f9af35915e8ae9a9c7978d903%7C7564fa3b59bd0897e5a1b5a0131f80eb; path=/
< Vary: Origin

Body:
{
  "id": 64,
	"customer_id": 210,
	"creator_id": 210,
	"status": "enabled",
	"status_detail": "ok",
	"is_healthy": false,
	"code": "D167252002",
	"name": "testdomain.com",
	"possession_a_record": "",
	"ownership_verification_random_code": null,
	"ownership_verification_email_address": null,
	"max_email_accounts": -1,
	"max_email_accounts_archive": -1,
	"max_mailing_lists": 0,
	"email_services": 0,
	"max_email_quota": 8589934592,
	"directory": "/home/vpopmail/domains/testdomain.com",
	"archive": true,
	"catch_all_enabled": false,
	"catch_all_destination": "",
	"activated_at": "2018-04-05T10:43:51.000Z",
	"created_at": "2018-04-05T10:43:05.000Z",
	"updated_at": "2018-04-05T13:04:25.951+02:00",
	"whois_expire": null,
	"whois_registar": "",
	"whois_status": true,
	"screenshot_path": null,
	"has_dkim": null,
	"dkim_selector": null,
	"dkim_public_key": null,
	"allow_nets": "0.0.0.0/0",
	"postmaster_password": "$1$LTrE8Go2$CQ/.ThKSUp6iIldsJLk631",
	"antispam_level": 2,
	"default_quota": 8589934592,
	"outbound_limit_id": 2,
	"archive_status": null,
	"archive_activated_at": null,
	"default_archive": true,
	"default_retention": 7
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Vault - Add archive for emails of a domain

This method is used to add archive for emails of a domain.

post
https://api.qboxmail.com/api/archive/domains/:domain_code/email_accounts

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
email_codes String[]

List of email codes to add the archive to.

domain_code String

Domain code the emails belong to.

retention optional Integer

Number of years of messages retention.

Default value: 1

default_archive optional Boolean

True to set archive for every new email account of this domain. False otherwise.

Default value: false

Created 201

Field Type Description
message String

Confirmation message.

/**
 * Add archive for selected email accounts
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85" \
    -X POST -d '{
        "email_codes": ["P993770558","EA26300813"],
        "domain_code": "D167252002",
        "retention": 7,
        "default_archive": true
      }' \
    https://api.qboxmail.com/api/archive/domains/D167252002/email_accounts

> POST /api/archive/domains/D167252002/email_accounts HTTP/1.1
> Host: stg-panel.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85
> Content-Length: 161
>
* upload completely sent off: 161 out of 161 bytes
< HTTP/1.1 201 Created
< Server: nginx/1.12.2
< Date: Thu, 05 Apr 2018 10:59:37 GMT
< Content-Type: application/json
< Content-Length: 1021
< Connection: keep-alive
< ETag: W/"64fa9576392326e4da40ca668783dce2"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: a201f195-6095-414b-ac7e-8a9531f8661a
< X-Runtime: 0.188827
< Set-Cookie: __profilin=p%3Dt%2Ca%3Dae37a91f9af35915e8ae9a9c7978d903%7C7564fa3b59bd0897e5a1b5a0131f80eb; path=/
< Vary: Origin

Body:
{
	"id": 64,
	"customer_id": 210,
	"creator_id": 210,
	"status": "enabled",
	"status_detail": "ok",
	"is_healthy": false,
	"code": "D167252002",
	"name": "testdomain.com",
	"possession_a_record": "",
	"ownership_verification_random_code": null,
	"ownership_verification_email_address": null,
	"max_email_accounts": -1,
	"max_email_accounts_archive": -1,
	"max_mailing_lists": 0,
	"email_services": 0,
	"max_email_quota": 8589934592,
	"directory": "/home/vpopmail/domains/testdomain.com",
	"archive": true,
	"catch_all_enabled": false,
	"catch_all_destination": "",
	"activated_at": "2018-04-05T10:43:51.000Z",
	"created_at": "2018-04-05T10:43:05.000Z",
	"updated_at": "2018-04-05T14:27:28.326+02:00",
	"whois_expire": null,
	"whois_registar": "",
	"whois_status": true,
	"screenshot_path": null,
	"has_dkim": null,
	"dkim_selector": null,
	"dkim_public_key": null,
	"allow_nets": "0.0.0.0/0",
	"postmaster_password": "$1$LTrE8Go2$CQ/.ThKSUp6iIldsJLk631",
	"antispam_level": 2,
	"default_quota": 8589934592,
	"outbound_limit_id": 2,
	"archive_status": "enabled",
	"archive_activated_at": "2018-04-05T11:04:29.000Z",
	"default_archive": true,
	"default_retention": 7
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Vault - Delete archive for domain

This method is used to delete archive for the selected domain.

delete
https://api.qboxmail.com/api/archive/domains/:domain_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No Content 204

Field Type Description
none json

No Content

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85" \
    -X DELETE https://api.qboxmail.com/api/archive/domains/D866466428

    > DELETE /api/archive/domains/D866466428 HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.51.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85
    >
    < HTTP/1.1 204 No Content
    < Cache-Control: no-cache
    < X-Request-Id: 8de90f43-0b72-4c3e-9755-e254c4e97c9c
    < X-Runtime: 0.030340
    < Vary: Origin
    < Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
    < Date: Mon, 28 Nov 2016 14:21:22 GMT
    < Connection: Keep-Alive

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Vault - Delete archive for email account

This method is used to delete archive for the selected email account.

delete
https://api.qboxmail.com/api/archive/domains/:domain_code/email_accounts/:email_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No Content 204

Field Type Description
none json

No Content

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85" \
    -X DELETE https://api.qboxmail.com/api/archive/domains/D866466428/email_accounts/EA88363031

    > DELETE /api/archive/domains/D866466428/email_accounts/EA88363031 HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.51.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85
    >
    < HTTP/1.1 204 No Content
    < Cache-Control: no-cache
    < X-Request-Id: 8de90f43-0b72-4c3e-9755-e254c4e97c9c
    < X-Runtime: 0.030340
    < Vary: Origin
    < Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
    < Date: Mon, 28 Nov 2016 14:21:22 GMT
    < Connection: Keep-Alive

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Vault - Get list of all domains with archive

This method is used to get the list of all domains with archive configured.

get
https://api.qboxmail.com/api/archive/domains

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
query optional String

Domain name to filter results.

archive_status optional String

Filter results by archive status.

Default value: all

Allowed values: "all", "disabled", "enabled"

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of domains on each page.

Default value: 25

OK 200

Field Type Description
message json

List of configured emails.

/*
 * Get the list of domains with archive.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85" \
    -X GET https://api.qboxmail.com/api/archive/domains?archive_status=all

> GET /api/archive/domains?archive_status=all HTTP/1.1
> Host: stg-panel.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85
>
< HTTP/1.1 200 OK
< Server: nginx/1.12.2
< Date: Wed, 04 Apr 2018 10:33:42 GMT
< Content-Type: application/json
< Content-Length: 2694
< Connection: keep-alive
< ETag: W/"12860d546c733584984a5bc08d87ff0f"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 7fc1e587-5843-4a77-95fb-dc08539db233
< X-Runtime: 0.093202
< Set-Cookie: __profilin=p%3Dt%2Ca%3D273c76119d9356f72f9fbe3f34da7023%7Cb0bfd0a47884f17204e7891918fc7751; path=/
< Vary: Origin

Body:
{
	"resources": [{
		"activated_at": "2018-03-01T15:44:18.000+01:00",
		"archive_activated_at": "2018-03-30T09:56:07.000+02:00",
		"created_at": "2018-03-01T15:44:05.000+01:00",
		"updated_at": "2018-03-30T09:56:07.000+02:00",
		"status": "enabled",
		"status_detail": "ok",
		"archive_status": "enabled",
		"code": "D866466428",
		"is_healthy": true,
		"name": "qboxmail.it",
		"customer_fullname": "John Doe",
		"customer_code": "C260354815",
		"customer_catch_all": true,
		"allow_nets": ["0.0.0.0/0"],
		"antispam_level": 2,
		"archive": true,
		"manager_fullname": null,
		"manager_code": null,
		"imap_disabled": false,
		"smtp_disabled": false,
		"pop_disabled": false,
		"webmail_disabled": false,
		"default_retention": 10,
		"default_archive": true,
		"email_services": 0,
		"default_quota": 8589934592,
		"dkim_public_key": null,
		"dkim_selector": "._domainkey",
		"has_dkim": null,
		"max_email_accounts": -1,
		"max_email_accounts_archive": 11,
		"max_email_quota": 8589934592,
		"max_mailing_lists": 0,
		"no_alias_domains": 0,
		"no_alias_email_accounts": 0,
		"no_email_accounts": 3,
		"no_email_accounts_archive": 1,
		"ownership_verification_email_address": null,
		"ownership_verification_random_code": null,
		"possession_a_record": "",
		"catch_all_destination": "",
		"catch_all_enabled": false,
		"outbound_limit": 0,
		"postmaster_quota": null,
		"postmaster_code": null,
		"postmaster_max_email_quota": null,
		"postmaster_lastauth": null
	}, {
		"activated_at": "2018-03-30T17:45:02.000+02:00",
		"archive_activated_at": "2018-03-30T17:50:10.000+02:00",
		"created_at": "2018-03-30T17:44:44.000+02:00",
		"updated_at": "2018-03-30T18:00:32.000+02:00",
		"status": "enabled",
		"status_detail": "ok",
		"archive_status": "enabled",
		"code": "D503635414",
		"is_healthy": false,
		"name": "mydomain.com",
		"customer_fullname": "John Doe",
		"customer_code": "C260354815",
		"customer_catch_all": true,
		"allow_nets": ["0.0.0.0/0"],
		"antispam_level": 2,
		"archive": true,
		"manager_fullname": null,
		"manager_code": null,
		"imap_disabled": false,
		"smtp_disabled": false,
		"pop_disabled": false,
		"webmail_disabled": false,
		"default_retention": 10,
		"default_archive": true,
		"email_services": 0,
		"default_quota": 8589934592,
		"dkim_public_key": null,
		"dkim_selector": "._domainkey",
		"has_dkim": null,
		"max_email_accounts": -1,
		"max_email_accounts_archive": -1,
		"max_email_quota": 8589934592,
		"max_mailing_lists": 0,
		"no_alias_domains": 0,
		"no_alias_email_accounts": 0,
		"no_email_accounts": 1,
		"no_email_accounts_archive": 1,
		"ownership_verification_email_address": null,
		"ownership_verification_random_code": null,
		"possession_a_record": "",
		"catch_all_destination": "",
		"catch_all_enabled": false,
		"outbound_limit": 0,
		"postmaster_quota": null,
		"postmaster_code": null,
		"postmaster_max_email_quota": null,
		"postmaster_lastauth": null
	}],
	"pagination": {
		"per": 25,
		"page": 1,
		"total_pages": 1,
		"query": null,
		"filter": null,
		"status": null,
		"sort_field": null,
		"sort": null,
		"total_records": 2
	}
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Vault - Get list of all emails with archive

This method is used to get the list of all email accounts of a domain with archive configured.

get
https://api.qboxmail.com/api/archive/domains/:domain_code/email_accounts

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
query optional String

Email address name to filter results.

archive_status optional String

Filter results by archive status.

Default value: all

Allowed values: "all", "disabled", "enabled"

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of domains on each page.

Default value: 25

OK 200

Field Type Description
message json

List of configured emails.

/*
 * Get the list of the email accounts with archive.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85" \
    -X GET https://api.qboxmail.com/api/archive/domains/D866466428/email_accounts?archive_status=all

> GET /api/archive/domains/D866466428/email_accounts?archive_status=all HTTP/1.1
> Host: stg-panel.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85
>
< HTTP/1.1 200 OK
< Server: nginx/1.12.2
< Date: Wed, 04 Apr 2018 13:29:28 GMT
< Content-Type: application/json
< Content-Length: 1710
< Connection: keep-alive
< ETag: W/"a859d0ef48d78d0158f3343ee9e00b33"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 3d1b45d0-327f-4892-ab7d-640d97540ac5
< X-Runtime: 0.173369
< Set-Cookie: __profilin=p%3Dt%2Ca%3D9c3a2ec7be592e4ae1d7e11df682c2cf%7C273c76119d9356f72f9fbe3f34da7023; path=/
< Vary: Origin

Body:
{
	"resources": [{
		"activated_at": null,
		"archive_activated_at": "2018-03-30T09:56:08.000+02:00",
		"created_at": "2018-03-30T09:53:07.000+02:00",
		"updated_at": "2018-03-30T09:56:22.000+02:00",
		"archive_import_executed_at": null,
		"allow_nets": ["0.0.0.0/0"],
		"api_token": null,
		"archive": true,
		"archive_disabled": false,
		"pop_disabled": false,
		"email_services": 0,
		"webmail_disabled": false,
		"imap_disabled": false,
		"smtp_disabled": false,
		"max_email_quota": 8589934592,
		"password_change_disabled": false,
		"status": "enabled",
		"status_detail": "ok",
		"archive_status": "enabled",
		"archive_import_status": null,
		"timezone": "Europe/Rome",
		"type": "EmailAccount",
		"code": "EA88363031",
		"name": "john doe",
		"imapsync_errors": false,
		"domain_name": "qboxmail.it",
		"domain_code": "D866466428",
		"email_address": "j.doe@qboxmail.it",
		"description": "john doe",
		"language": "en",
		"bounce_mail": false,
		"keep_copy": false,
		"forwards": [],
		"autoresponder_subject": null,
		"autoresponder_body": null,
		"autoresponder_enabled": false,
		"autoresponder_start_date": null,
		"autoresponder_end_date": null,
		"autoresponder_intervals_enabled": false,
		"lastauth": "none",
		"lastauth_protocol": null,
		"lastauth_datetime": null,
		"messages": 0,
		"quota": 0,
		"vault_quota": 0,
		"vault_messages": 0,
		"otp": false,
		"otp_secret": null,
		"customization_logo": null,
		"customization_title": null,
		"customization_color": null,
		"customization_help_desk_url": null,
		"outbound_limit": 0,
		"outbound_limit_period": 86400,
		"reset_outbound_limit_time": "2018-04-05T15:29:28.063+02:00",
		"spam_in_inbox": false,
		"retention": 10,
		"delegates": [],
		"delegates_no": null,
		"qbvault_last_auth": "2018-03-30T07:56:17.000Z",
		"qbvault_session_ip": null
	}],
	"pagination": {
		"per": 25,
		"page": 1,
		"total_pages": 1,
		"query": null,
		"filter": null,
		"status": null,
		"sort_field": null,
		"sort": null,
		"total_records": 1
	}
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Vault - Update archive configuration for domain

This method is used to update the archive configuration for the selected domain.

put
https://api.qboxmail.com/api/archive/domains/:domain_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
default_retention optional Integer

Number of years to keep the messages. This value can be overwritten by single email addresses.

Default value: 1

Size range: 1-10

default_archive optional Boolean

True to set archive for every new email account of this domain. False otherwise.

Default value: false

No content 204

Field Type Description
none String

No content.

/*
 * Update default domain retention at 5 years on selected domain.
 * And set default_archive to true so that every new email address of this
 * domain will have the archive enabled automatically.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85" \
    -X PUT -d '{ "default_retention":5, "default_archive":true }' \
    https://api.qboxmail.com/api/archive/domains/D866466428

> PUT /api/archive/domains/D866466428 HTTP/1.1
> Host: stg-panel.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85
> Content-Length: 49
>
* upload completely sent off: 49 out of 49 bytes
< HTTP/1.1 204 No Content
< Server: nginx/1.12.2
< Date: Wed, 04 Apr 2018 14:04:24 GMT
< Connection: keep-alive
< Cache-Control: no-cache
< X-Request-Id: 2f5807ba-22cb-49df-99aa-71e0ca686fe5
< X-Runtime: 0.146826
< Set-Cookie: __profilin=p%3Dt%2Ca%3Dd131f33c515f219914cdfcd3889d65d2%7C9c3a2ec7be592e4ae1d7e11df682c2cf; path=/
< Vary: Origin

Body: None

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Vault - Update archive configuration for email

This method is used to update the archive configuration for the selected email account.

put
https://api.qboxmail.com/api/archive/domains/:domain_code/email_accounts/:email_code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
retention optional Integer

Number of years to keep the messages. This value can override the domain configuration.

Default value: 1

Size range: 1-10

No content 204

Field Type Description
none String

No content.

/*
 * Update archive messages retention at 3 years on selected email account.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85" \
    -X PUT -d '{ "retention":3 }' \
    https://api.qboxmail.com/api/archive/domains/D866466428/email_accounts/EA88363031

> PUT /api/archive/domains/D866466428/email_accounts/EA88363031 HTTP/1.1
> Host: stg-panel.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85
> Content-Length: 17
>
* upload completely sent off: 17 out of 17 bytes
< HTTP/1.1 204 No Content
< Server: nginx/1.12.2
< Date: Wed, 04 Apr 2018 15:28:37 GMT
< Connection: keep-alive
< Cache-Control: no-cache
< X-Request-Id: de7fea0a-951f-411e-b91f-e4570a3dc9c5
< X-Runtime: 0.124944
< Set-Cookie: __profilin=p%3Dt%2Ca%3D5e1251171de40eec5bc9ae5bc2026841%7C5147784e3680650d0a242222e7d59cb5; path=/
< Vary: Origin

Body: None

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Vault - Update archive status for domain

This method is used to update the archive status for the selected domain.

put
https://api.qboxmail.com/api/archive/domains/:domain_code/status

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
status String

Enable or disable archive for domain.

Allowed values: "disabled", "enabled"

No content 204

Field Type Description
none String

No content.

/*
 * Disable email archive for an email account
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85" \
    -X PUT -d '{ "status":false }' \
    https://api.qboxmail.com/api/archive/domains/D866466428/status

> PUT /api/archive/domains/D866466428/status HTTP/1.1
> Host: stg-panel.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85
> Content-Length: 17
>
* upload completely sent off: 17 out of 17 bytes
< HTTP/1.1 204 No Content
< Server: nginx/1.12.2
< Date: Wed, 04 Apr 2018 15:28:37 GMT
< Connection: keep-alive
< Cache-Control: no-cache
< X-Request-Id: de7fea0a-951f-411e-b91f-e4570a3dc9c5
< X-Runtime: 0.124944
< Set-Cookie: __profilin=p%3Dt%2Ca%3D5e1251171de40eec5bc9ae5bc2026841%7C5147784e3680650d0a242222e7d59cb5; path=/
< Vary: Origin

Body: None

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Vault - Update archive status for email

This method is used to update the archive status for the selected email account.

put
https://api.qboxmail.com/api/archive/domains/:domain_code/email_accounts/:email_code/status

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
status String

Enable or disable archive for email account.

Allowed values: "disabled", "enabled"

No content 204

Field Type Description
none String

No content.

/*
 * Disable email archive for an email account
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85" \
    -X PUT -d '{ "status":false }' \
    https://api.qboxmail.com/api/archive/domains/D866466428/email_accounts/EA88363031/status

> PUT /api/archive/domains/D866466428/email_accounts/EA88363031/status HTTP/1.1
> Host: stg-panel.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 0weAYw8OG_KdrZmFqHCvkg4pVOOgJ6wiVOhdCmMV2SKsVY84aWj-N0A4U5mLYQ85
> Content-Length: 17
>
* upload completely sent off: 17 out of 17 bytes
< HTTP/1.1 204 No Content
< Server: nginx/1.12.2
< Date: Wed, 04 Apr 2018 15:28:37 GMT
< Connection: keep-alive
< Cache-Control: no-cache
< X-Request-Id: de7fea0a-951f-411e-b91f-e4570a3dc9c5
< X-Runtime: 0.124944
< Set-Cookie: __profilin=p%3Dt%2Ca%3D5e1251171de40eec5bc9ae5bc2026841%7C5147784e3680650d0a242222e7d59cb5; path=/
< Vary: Origin

Body: None

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Etlive

Etlive - Get access details of email accounts

This method is used to get the details of the accesses (login/logout) via POP/IMAP of email accounts.

get
https://api.qboxmail.com/api/etlive/accesses

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
domain String

Domain code.

type String

Type of query.

Allowed values: "accesses"

date String

Date with format YYYY-MM-DD.

mailbox optional String

Email account code.

protocol optional String

Filter accesses based on protocol [all|imap|pop].

Default value: all

Allowed values: "all", "pop", "imap"

action optional String

Filter all, success or failed accesses.

Default value: all

Allowed values: "all", "success", "login-error"

from optional String

Filter all accesses after 00:00.

Default value: 00:00

to optional String

Filter all accesses up to 23:59.

Default value: 00:00

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of domains on each page.

Default value: 25

with_totals optional String

Returns the info about total results in the answer.

Default value: no

Allowed values: "yes", "no"

OK 200

Field Type Description
message json

Details

/*
 * Get the accesses of a specified email address
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 7awk95a8QHwCjyCs6XOhF1YSUCJF7_C2em4CB7k7wxiCANsS5hYxlweEaHuLB0gh" \
    -X GET "https://api.qboxmail.com/api/etlive/accesses?action=all&date=2018-02-07&domain=D021556874&mailbox=EA81173121&protocol=imap&type=accesses&with_totals=yes"

    > GET /api/etlive/accesses?action=all&date=2018-02-07&domain=D021556874&mailbox=EA81173121&protocol=imap&type=accesses&with_totals=yes HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.47.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: 7awk95a8QHwCjyCs6XOhF1YSUCJF7_C2em4CB7k7wxiCANsS5hYxlweEaHuLB0gh
    >
    < HTTP/1.1 200 OK
    < Server: nginx/1.10.2
    < Date: Thu, 08 Feb 2018 14:02:09 GMT
    < Content-Type: application/json
    < Content-Length: 18575
    < Connection: keep-alive
    < ETag: W/"6841a67b82202e59634f08d797dfea05"
    < Cache-Control: max-age=0, private, must-revalidate
    < X-Request-Id: 2849b48f-5d20-4037-8cb0-a527e0ca834a
    < X-Runtime: 0.160171
    < Set-Cookie: __profilin=p%3Dt%2Ca%3D76ecc41d0e6e94263f32e85f8aaa67d5; path=/
    < Vary: Origin
    <

Body:
{
  "resources": [{
    "_id": "2018-02-07T20:36:13Z8d027532bf1fd6b4d9aea4d377396a65",
    "uid": "2018-02-07T20:46:16Z313eeb5d1cf32b58655616710902a7d5",
    "sid": "Z6UEP6Vk2Iy5Ydk+",
    "domain": "example.com",
    "user": "mario.rossi",
    "server": "pop04",
    "protocol": "imap",
    "rip": "185.97.217.62",
    "rip_country": "Italy",
    "lip": "185.97.217.20",
    "login": true,
    "login_at": "2018-02-07T20:36:13.214Z",
    "login_error": "",
    "logout": true,
    "logout_at": "2018-02-07T20:46:16.505Z",
    "logout_error": "",
    "in_traffic": 1457,
    "out_traffic": 19566,
    "pop_deleted_msgs": 0,
    "pop_deleted_bytes": 0,
    "pop_login_msgs": 0,
    "imap_deleted_msgs": 0,
    "imap_expunged_msgs": 0,
    "imap_trashed_msgs": 0,
    "client": ""
  }, {
    ...
  }],
  "pagination": {
    "count": 30,
    "last": "2018-02-07T17:50:06Z91d2cad92b770c2152f284f317bc129d",
    "total_records": 316
  }
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Resource not found.

{
    "error": "Unauthorized"
}
{
    "error": "Resource not found"
}

Etlive - Get details of emails sent by email accounts

This method is used to get the details of the emails sent by one or more email account.

get
https://api.qboxmail.com/api/etlive/mailouts

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
domain String

Domain code.

type String

Type of query.

Allowed values: "mailouts"

date String

Date with format YYYY-MM-DD.

mailbox optional String

Email account code.

action optional String

Filter emails on deliverability.

Default value: all

Allowed values: "all", "accepted", "rejected", "authfailed"

from optional String

Filter all accesses after 00:00.

Default value: 00:00

to optional String

Filter all accesses up to 23:59.

Default value: 00:00

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of domains on each page.

Default value: 25

with_totals optional String

Returns the info about total results in the answer.

Default value: no

Allowed values: "yes", "no"

OK 200

Field Type Description
message json

Details

  /*
   * Get details of incoming emails of a specified email address
   */

  curl -v \
      -H "Content-Type: application/json" \
      -H "X-Api-Token: 7awk95a8QHwCjyCs6XOhF1YSUCJF7_C2em4CB7k7wxiCANsS5hYxlweEaHuLB0gh" \
      -X GET "https://api.qboxmail.com/api/etlive/mailouts?action=all&date=2018-02-07&domain=D021556874&mailbox=EA81173121&filter=all&type=mailouts&with_totals=yes"

  > GET /api/etlive/mailouts?action=all&date=2018-02-07&domain=D021556874&mailbox=EA81173121&filter=all&type=mailouts&with_totals=yes HTTP/1.1
  > Host: api.qboxmail.com
  > User-Agent: curl/7.47.0
  > Accept: */*
  > Content-Type: application/json
  > X-Api-Token: 7awk95a8QHwCjyCs6XOhF1YSUCJF7_C2em4CB7k7wxiCANsS5hYxlweEaHuLB0gh
  >
  < HTTP/1.1 200 OK
  < Server: nginx/1.10.2
  < Date: Thu, 08 Feb 2018 14:40:07 GMT
  < Content-Type: application/json
  < Content-Length: 9326
  < Connection: keep-alive
  < ETag: W/"b6fb6682fb396cbfaa2c136e8967ad3b"
  < Cache-Control: max-age=0, private, must-revalidate
  < X-Request-Id: b881b082-5200-4433-9293-e2f94a7acf27
  < X-Runtime: 0.268643
  < Set-Cookie: __profilin=p%3Dt%2Ca%3D85c332ca570344f40030aa4083ab7b01; path=/
  < Vary: Origin

  Body:
  {
  	"resources": [{
  		"_id": "2018-02-07T17:33:20Z5f0135591a92b934ee80b120ba4e1dcc",
  		"uid": "2018-02-07T17:33:22Zae9dba57a025076c201afc6f4a6cb682",
  		"sid": "3zc7hc5TWSz4xRm",
  		"datetime": "2018-02-07T17:33:20.772Z",
  		"server": "smtp02",
  		"protocol": "smtp",
  		"sip": "*****",
  		"sip_country": "Italy",
  		"shost": "*****",
  		"method": "PLAIN",
  		"user": "mario.rossi",
  		"domain": "example.com",
  		"subject": "*****",
  		"from": "mario.rossi@example.com",
  		"to": "luca.verdi@helloworld.com",
  		"helo": "sogo03.cbsolt.net",
  		"msg_id": "E1B6465E-CECA-472A-BA9A-208D3B054C87@example.com",
  		"opendkim_selector": "priv20120804",
  		"opendkim_domain": "example.com",
  		"qmgr_received": true,
  		"size": "4066",
  		"nrcpt": "1",
  		"reject_code": "",
  		"reject_message": "",
  		"auth_context": "",
  		"auth_error": "",
  		"expired": false,
  		"deliveries": {
  			"2018-02-07T17:33:22Zae9dba57a025076c201afc6f4a6cb682": {
  				"datetime": "2018-02-07T17:33:22.955Z",
  				"to": "luca.verdi@helloworld.com",
  				"relay": "mx01.myhost.com[91.21.135.231]:25",
  				"delay": "2.2",
  				"dsn": "2.0.0",
  				"status": "sent",
  				"response": "250 2.0.0 Ok: queued as E1AA48116"
  			}
  		},
  		"bounces": null
  	}, {
      ...
	  }],
      "pagination": {
      "count": 30,
      "last": "2018-02-07T17:14:06Z91d2cad92b770c2152f284f317bc129d",
      "total_records": 9
    }
  }

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Resource not found.

{
    "error": "Unauthorized"
}
{
    "error": "Resource not found"
}

Etlive - Get details of received emails of email accounts

This method is used to get the details of the received emails of one or more email account.

get
https://api.qboxmail.com/api/etlive/mailins

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
domain String

Domain code.

type String

Type of query.

Allowed values: "mailins"

date String

Date with format YYYY-MM-DD.

mailbox optional String

Email account code.

filter optional String

Filter received emails based on scanner method.

Default value: all

Allowed values: "all", "spamdyke", "qmailscanner"

action optional String

Filter all, success or failed accesses.

Default value: all

Allowed values: "all", "accept", "spam-mark", "reject"

from optional String

Filter all accesses after 00:00.

Default value: 00:00

to optional String

Filter all accesses up to 23:59.

Default value: 00:00

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of domains on each page.

Default value: 25

with_totals optional String

Returns the info about total results in the answer.

Default value: no

Allowed values: "yes", "no"

OK 200

Field Type Description
message json

Details

/*
 * Get details of incoming emails of a specified email address
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 7awk95a8QHwCjyCs6XOhF1YSUCJF7_C2em4CB7k7wxiCANsS5hYxlweEaHuLB0gh" \
    -X GET "https://api.qboxmail.com/api/etlive/mailins?action=all&date=2018-02-07&domain=D021556874&mailbox=EA81173121&filter=all&type=mailins&with_totals=yes"

    > GET /api/etlive/mailins?action=all&date=2018-02-07&domain=D021146874&mailbox=EA81173221&filter=all&type=mailins&with_totals=yes HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.47.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: 7awk95a8QHwCjyCs6XOhF1YSUCJF7_C2em4CB7k7wxiCANsS5hYxlweEaHuLB0gh
    >
    < HTTP/1.1 200 OK
    < Server: nginx/1.10.2
    < Date: Thu, 08 Feb 2018 14:26:01 GMT
    < Content-Type: application/json
    < Content-Length: 28695
    < Connection: keep-alive
    < ETag: W/"b73ed91f1dd333fa5c6ef2a67614a093"
    < Cache-Control: max-age=0, private, must-revalidate
    < X-Request-Id: 402f6747-7624-46a1-8d43-20f2c7a23a67
    < X-Runtime: 0.080307
    < Set-Cookie: __profilin=p%3Dt%2Ca%3D3e158b8ad045e7d07b0b7bf11073db05; path=/
    < Vary: Origin

Body:
{
  "resources": [{
    "_id": "2018-02-07T22:55:12Za74a2cf94a2702c868ae3b82d947f8d7",
    "uid": "2018-02-07T22:55:12Z75b6b5478b234e911ff842f7369a2613",
    "sid": "f4b6ce900fcd0fe9157061054a1fba4e",
    "mid": "f47f449e3c1579d1891a9da041dd9911",
    "domain": "example.com",
    "user": "mario.rossi",
    "datetime": "2018-02-07T22:55:12.517Z",
    "server": "mail08",
    "filter": "qmailscanner",
    "filter_action": "accept",
    "filter_detail": "",
    "relay": false,
    "from": "feedback@yahoo.com",
    "return_path": "feedback@yahoo.com",
    "to": "mario.rossi@example.com",
    "sip": "66.163.187.199",
    "sdns": "",
    "encryption": false,
    "spam_score": "0.5",
    "spam_threshold": "5.0",
    "elapsed": "1.801742",
    "size": "54016",
    "subject": "Important information for you!",
    "msgid": "412654673.12134785.1518044077416@cms101.chakra.asd.mail.ne1.yahoo.com",
    "attachments": "image001.gif:1267;image003.gif:5966;image002.jpg:1818;image004.jpg:823;",
    "deliveries": {
      "2018-02-07T22:55:12Z75b6b5478b234e911ff842f7369a2613": {
        "datetime": "2018-02-07T22:55:12.992Z",
        "action": "store",
        "detail": "fbl",
        "errormsg": "",
        "session": "bSEwOdCDe1raMQAAyl3c5g",
        "deliverytime": 39
      }
    }
  }, {
    ...
  }],
  "pagination": {
    "count": 30,
    "last": "2018-02-07T17:14:06Z91d2cad92b770c2152f284f317bc129d",
    "total_records": 53
  }
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Resource not found.

{
    "error": "Unauthorized"
}
{
    "error": "Resource not found"
}

Managers

Managers - Add new manager

This method is used to add a new manager. The manager code is returned in the location header field.

post
https://api.qboxmail.com/api/managers

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
email_address String

Valid email address for the new manager.

firstname String

Firstname of the manager

lastname String

Lastname of the manager

password String

Password for the user Manager (min 8 chars and at least one number).

password_confirmation String

Repeat the password.

company optional String

Company of the manager.

is_god optional Boolean

true if you want to permit to the new manager to see and manager all the same resources of the customer.

Default value: false

max_domains optional Integer

Max number of domains that can be managed/created by the manager, -1 = no-limit. Available only if "is_god" is false

max_email_accounts optional Integer

Max number of email accounts that can be managed/created by the manager, -1 = no-limit. Available only if "is_god" is false

max_email_accounts_archive optional Integer

Max number of email accounts with archive that can be managed/created by the manager, -1 = no-limit. Available only if "is_god" is false

max_email_quota optional Integer

Max quota that can be set by the manager on its resources. Available only if "is_god" is false

Default value: 8589934592

Allowed values: 1073741824, 2147483648, 3221225472, 4294967296, 5368709120, 6442450944, 7516192768, 8589934592, 17179869184, 26843545600

domain_codes optional String[]

List of valid domain codes to assign to the manager. Available only if "is_god" is false

Default value: empty

Created 201

Field Type Description
message String

Confirmation message and newly created resource code.

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X POST \
    -d '{
      "email_address":"manager@ciao.com",
      "firstname":"Manager1",
      "lastname":"Verdi",
      "password":"Qwertyuiop0",
      "password_confirmation":"Qwertyuiop0",
      "domain_codes": ["D1234567", "D1545495"]
    }' \
    https://api.qboxmail.com/api/managers

> POST /api/managers HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 97

< HTTP/1.1 201 Created
< Location: https://api.qboxmail.com/managers/D072048005
< Content-Type: application/json
< Content-Length: 28
< Etag: W/"a0d00fe50a65a8b47780d2dce5029fb4"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: a4fc6b0f-bc05-47c5-be04-021848b52dea
< X-Runtime: 0.030012
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 10:58:00 GMT
< Connection: Keep-Alive

Body:
{
    "message": "risorsa creata",
    "resource_code":"M477048238"
}

Error 400

Name Type Description
BadRequest json

Invalid JSON.

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field": "max_email_quota",
            "description": "non è un valore valido"
        },
        {
            "field": "email_address",
            "description": "non è un valore valido"
        }
    ]
}

Managers - Delete a registered manager

This method is used to delete a registered manager.

delete
https://api.qboxmail.com/api/managers/:code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

No Content 204

Field Type Description
none json

No Content

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X DELETE https://api.qboxmail.com/api/managers/MN84319001

    > DELETE /api/managers/MN84319001 HTTP/1.1
    > Host: api.qboxmail.com
    > User-Agent: curl/7.51.0
    > Accept: */*
    > Content-Type: application/json
    > X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
    >
    < HTTP/1.1 204 No Content
    < Cache-Control: no-cache
    < X-Request-Id: 8de90f43-0b72-4c3e-9755-e254c4e97c9c
    < X-Runtime: 0.030340
    < Vary: Origin
    < Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
    < Date: Mon, 28 Nov 2016 14:21:22 GMT
    < Connection: Keep-Alive

Body: Empty

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Manager not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Managers - Edit manager attributes

This method is used to change manager attributes.

put
https://api.qboxmail.com/api/managers/:code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
password optional String

Password for the user Manager (min 8 chars and at least one number).

password_confirmation optional String

Repeat the password.

is_god optional Boolean

true if you want to permit to the new manager to see and manager all the same resources of the customer.

max_domains optional Integer

Max number of domains that can be managed/created by the manager, -1 = no-limit. Available only if "is_god" is false

max_email_accounts optional Integer

Max number of email accounts that can be managed/created by the manager, -1 = no-limit. Available only if "is_god" is false

max_email_accounts_archive optional Integer

Max number of email accounts with archive that can be managed/created by the manager, -1 = no-limit. Available only if "is_god" is false

max_email_quota optional Integer

Max quota that can be set by the manager on its resources. Available only if "is_god" is false

Default value: 8589934592

Allowed values: 1073741824, 2147483648, 3221225472, 4294967296, 5368709120, 6442450944, 7516192768, 8589934592, 17179869184, 26843545600

domain_codes optional String[]

List of valid domain codes to assign to the manager. Available only if "is_god" is false

No content 204

Field Type Description
none String

No content.

/*
 * Set domain to support 100 email accounts
 * at most 5 mailing list
 * and each email with a max quota of 2GB
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{
        "max_email_accounts":100,
        "max_mailing_lists":5,
        "max_email_quota":2147483648 }' \
    https://api.qboxmail.com/api/domains/D072048005

> PUT /api/domains/D072048005 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty

Error 400

Name Type Description
BadRequest json

Invalid JSON.

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}
{
    "message": "Validazione Fallita",
    "errors": [
        {
            "field": "max_email_quota",
            "description": "non è un valore valido"
        },
        {
            "field": "default_quota",
            "description": "non è un valore valido"
        }
    ]
}

Managers - Enable or disable a manager

This method is used to enable or disable a manager.

put
https://api.qboxmail.com/api/managers/:code/status

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
status String

New status of the manager.

Allowed values: "enabled", "disabled"

No content 204

Field Type Description
none String

No content.

/*
 * Set domain to support 100 email accounts
 * at most 5 mailing list
 * and each email with a max quota of 2GB
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X PUT -d '{
        "status":"enabled" }' \
    https://api.qboxmail.com/api/managers/MN72048005/status

> PUT /api/managers/MN72048005 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP
> Content-Length: 117

< HTTP/1.1 204 No Content
< Cache-Control: no-cache
< X-Request-Id: 906a3158-33d9-4a16-9d18-8f07333c5c6b
< X-Runtime: 0.054944
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:36:45 GMT
< Connection: Keep-Alive

Body: Empty

Error 400

Name Type Description
BadRequest json

Invalid JSON.

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 403

Name Type Description
Forbidden json

Domain in ownership check.

Error 404

Name Type Description
NotFound json

Domain not found.

Error 422

Name Type Description
ValidationError json

Validation failed.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Managers - Get details of registered manager

This method is used to get the details of a registered manager.

get
https://api.qboxmail.com/api/managers/:code

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

OK 200

Field Type Description
message json

Details of registered manager

/*
 * Get the information of a specified manager
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/managers/MN84319001

> GET /api/managers/D072048005 HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 1007
< Etag: W/"58e6af44870bf0c5893bf193b6cde1b7"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: a5e71559-06b7-4b11-88ce-fce1a0d2ab1d
< X-Runtime: 0.020041
< Vary: Origin
< Server: WEBrick/1.3.1 (Ruby/2.3.3/2016-11-21)
< Date: Mon, 28 Nov 2016 14:12:30 GMT
< Connection: Keep-Alive

Body:
{
  "resources": [
    {
      "created_at": "2017-06-15T07:19:02.000Z",
      "updated_at": "2017-06-15T07:19:02.000Z",
      "domain_codes": [
        "D061600254",
        "D327139879"
      ],
      "domain_names": [
        "sangiorgiospa.com",
        "qboxcloud.it"
      ],
      "selected_domain_data": [
        {
          "name": "sangiorgiospa.com",
          "code": "D061600254"
        },
        {
          "name": "qboxcloud.it",
          "code": "D327139879"
        }
      ],
      "is_customer_wholesale": true,
      "is_customer_reseller": false,
      "customer_code": null,
      "is_god": false,
      "catch_all": true,
      "max_mailing_lists": -1,
      "max_email_quota": 8589934592,
      "max_email_accounts_archive": -1,
      "max_email_accounts": -1,
      "max_domains": -1,
      "email_accounts_8gb": 17,
      "email_accounts_25gb": 0,
      "email_accounts_archive": 0,
      "status_detail": "ok",
      "status": "enabled",
      "code": "MN84319001",
      "company": null,
      "lastname": "Rossi",
      "firstname": "Manager2",
      "otp": false,
      "otp_secret": null,
      "allow_nets": [
        "0.0.0.0/0"
      ],
      "api_token": null,
      "timezone": "Europe/Rome",
      "email_address": "manager2@ciao.com",
      "language": "it",
      "type": "Manager",
      "customization_logo": null,
      "customization_title": null,
      "customization_color": null,
      "customization_help_desk_url": null
    }
  ],
  "pagination": {}
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Manager not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}

Managers - Get list of managers

This method is used to get the list of managers.

get
https://api.qboxmail.com/api/managers

Header

Field Type Description
X-Api-Token String

Authorization token.

Accept String

Accepted response format.

Allowed values: application/json

Content-Type String

Content type of the request.

Allowed values: application/json

{
    Accept: application/json
    X-Api-Token: 123456789
    Content-Type: application/json
}

Parameter

Field Type Description
query optional String

Filter results by name.

page optional Integer

Number of pages to receive.

Default value: 1

per optional Integer

Number of managers on each page.

Default value: 25

OK 200

Field Type Description
message json

List of registered managers

/*
 * Get the list of the registered managers.
 */

curl -v \
    -H "Content-Type: application/json" \
    -H "X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP" \
    -X GET https://api.qboxmail.com/api/managers

> GET /api/managers HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: 3u2eIGWX2oN_Z2TRxZOp5Si8hzrDF6vpyxYcdWAX-WUnbBroqNmphw9PUBbGNolP

> GET /api/managers HTTP/1.1
> Host: api.qboxmail.com
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: application/json
> X-Api-Token: Lrot09a0cmKqhlCi8Z0GltBKG1T9IoqLuvW_F729lpnTPzToQO-_XS_Cz1n6j8bY
> 
< HTTP/1.1 200 OK
< Server: nginx/1.10.2
< Date: Thu, 15 Jun 2017 07:22:31 GMT
< Content-Type: application/json
< Content-Length: 2920
< Connection: keep-alive
< ETag: W/"e0dbbe3fed5f4916c02b0b4055365999"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: b2ce1593-4bef-435a-9e66-00e037076f19
< X-Runtime: 0.028136
< Set-Cookie: __profilin=p%3Dt%2Ca%3Ddbd8be3aed6bfa9c6ae9c83d9dd350d2%7C916f7113a434c0cf88c5731cc3fd4178; path=/
< Vary: Origin

Body:
{
  "resources": [
    {
      "created_at": "2017-06-14T13:40:53.000Z",
      "updated_at": "2017-06-14T13:40:53.000Z",
      "domain_codes": null,
      "domain_names": null,
      "selected_domain_data": null,
      "is_customer_wholesale": true,
      "is_customer_reseller": false,
      "customer_code": "C900473317",
      "is_god": false,
      "catch_all": true,
      "max_mailing_lists": -1,
      "max_email_quota": null,
      "max_email_accounts_archive": 10,
      "max_email_accounts": 10,
      "max_domains": 5,
      "email_accounts_8gb": 0,
      "email_accounts_25gb": 0,
      "email_accounts_archive": 0,
      "status_detail": "ok",
      "status": "enabled",
      "code": "MN82321164",
      "company": "qboxmail",
      "lastname": "BBB",
      "firstname": "AAA",
      "otp": false,
      "otp_secret": null,
      "allow_nets": [
        "0.0.0.0/0"
      ],
      "api_token": null,
      "timezone": "Europe/Rome",
      "email_address": "ciao@mondo.it",
      "language": "it",
      "type": "Manager",
      "customization_logo": null,
      "customization_title": null,
      "customization_color": null,
      "customization_help_desk_url": null
    },
    {
      "created_at": "2017-06-15T07:14:47.000Z",
      "updated_at": "2017-06-15T07:14:47.000Z",
      "domain_codes": null,
      "domain_names": null,
      "selected_domain_data": null,
      "is_customer_wholesale": true,
      "is_customer_reseller": false,
      "customer_code": "C900473317",
      "is_god": false,
      "catch_all": true,
      "max_mailing_lists": -1,
      "max_email_quota": 8589934592,
      "max_email_accounts_archive": -1,
      "max_email_accounts": -1,
      "max_domains": -1,
      "email_accounts_8gb": 0,
      "email_accounts_25gb": 0,
      "email_accounts_archive": 0,
      "status_detail": "ok",
      "status": "enabled",
      "code": "MN53672820",
      "company": null,
      "lastname": "Verdi",
      "firstname": "Manager1",
      "otp": false,
      "otp_secret": null,
      "allow_nets": [
        "0.0.0.0/0"
      ],
      "api_token": null,
      "timezone": "Europe/Rome",
      "email_address": "manager@ciao.com",
      "language": "it",
      "type": "Manager",
      "customization_logo": null,
      "customization_title": null,
      "customization_color": null,
      "customization_help_desk_url": null
    },
    {
      "created_at": "2017-06-15T07:19:02.000Z",
      "updated_at": "2017-06-15T07:19:02.000Z",
      "domain_codes": [
        "D061600254",
        "D327139879"
      ],
      "domain_names": [
        "sangiorgiospa.com",
        "qboxcloud.it"
      ],
      "selected_domain_data": [
        {
          "name": "sangiorgiospa.com",
          "code": "D061600254"
        },
        {
          "name": "qboxcloud.it",
          "code": "D327139879"
        }
      ],
      "is_customer_wholesale": true,
      "is_customer_reseller": false,
      "customer_code": "C900473317",
      "is_god": false,
      "catch_all": true,
      "max_mailing_lists": -1,
      "max_email_quota": 8589934592,
      "max_email_accounts_archive": -1,
      "max_email_accounts": -1,
      "max_domains": -1,
      "email_accounts_8gb": 17,
      "email_accounts_25gb": 0,
      "email_accounts_archive": 0,
      "status_detail": "ok",
      "status": "enabled",
      "code": "MN84319001",
      "company": null,
      "lastname": "Rossi",
      "firstname": "Manager2",
      "otp": false,
      "otp_secret": null,
      "allow_nets": [
        "0.0.0.0/0"
      ],
      "api_token": null,
      "timezone": "Europe/Rome",
      "email_address": "manager2@ciao.com",
      "language": "it",
      "type": "Manager",
      "customization_logo": null,
      "customization_title": null,
      "customization_color": null,
      "customization_help_desk_url": null
    }
  ],
  "pagination": {
    "per": 25,
    "page": 1,
    "total_pages": 1,
    "query": null,
    "filter": null,
    "sort_field": null,
    "sort": null,
    "total_records": 3,
    "totals": {
      "all": 3,
      "enabled": 3,
      "disabled": 0
    }
  }
}

Error 401

Name Type Description
Unauthorized json

Invalid token.

Error 404

Name Type Description
NotFound json

Manager not found.

{
    "error": "Unauthorized"
}
{
    "error": "Risorsa non trovata"
}
Generated with apidoc 0.17.7 - 2019-09-11T07:59:01.643Z