Add a mailbox

v1
mail
post
/1/mail_hostings/{mail_hosting_id}/mailboxes

Creates a new mailbox in the mail hosting.

Path parameters

mail_hosting_id
requiredinteger

The unique identifier (ID) of the mail hosting to request.

Examples:67452

Query parameters

withstring
Possible values:full_nameauthorized_sendersblocked_sendershas_auto_responderauto_responderredirectionhas_move_spamaliaseslast_loginpassword_last_changed_atcreated_atuserssmtpbanhas_dkim_signatureis_removableauthpermissionshas_operation_in_progressfull_aliasesmailbox_idsignature_models
Examples:has_auto_responder

Body Parameters

application/json
mailbox_namerequiredstring

Mailbox

Examples:example
passwordrequiredstring

Mailbox password

Examples:0sl.V{$9d(RR<t^
link_to_current_userboolean

Link mailbox to current user to access this address from the Mail tool. (default value is set to true if target is current_user)

targetstring

current_user|other_user

Examples:example

Response Body

application/json
resultrequiredstring
Possible values:successerrorasynchronous

Result of the HTTP request

Examples:success
dataMailboxStore

Example request

                <?php
use GuzzleHttp\Client;

$client = new Client();
$headers = [
	'Authorization' => 'Bearer YOUR-TOKEN-HERE',
	'Content-Type' => 'application/json'
];

$body = '{
    "mailbox_name": "example",
    "password": "0sl.V{$9d(RR<t^"
}';

$request = new Request('POST', 'https://api.infomaniak.com/1/mail_hostings/{mail_hosting_id}/mailboxes', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
            

Example response

application/json
                
                    
{
"result":"success",
"data":{
"mailbox":{
"mailbox_name":"user",
"mailbox_idn":"user@êxample.com",
"is_limited":false,
"is_free_mail":true
},
"quota":34366,
"used":91770,
"total":53687
}
}