{"openapi":"3.0.0","info":{"title":"OVHcloud API specification","description":"Specification for OVHcloud API","version":"1.0","contact":{"name":"OVH","email":"api@ml.ovh.net"}},"servers":[{"url":"https://api.eu.ovhcloud.com/1.0"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"duration":{"type":"string","description":"Duration (e.g., P1Y2M3DT4H6M9S)","example":"P1Y2M3DT4H6M9S"},"email":{"type":"string","description":"Email address (e.g., api@ml.ovh.net)","format":"email","example":"api@ml.ovh.net"},"email.mxplan.AccountFullAccess":{"type":"object","description":"Users having full access on this mailbox","properties":{"allowedAccountId":{"type":"integer","description":"Account id to give full access","readOnly":true},"creationDate":{"type":"string","description":"Creation date","format":"date-time","readOnly":true},"taskPendingId":{"type":"integer","description":"Pending task id","readOnly":true}}},"email.mxplan.AccountSendAs":{"type":"object","description":"Users authorized to send mails from this mailbox","properties":{"allowedAccountId":{"type":"integer","description":"Account id to give send as","readOnly":true},"creationDate":{"type":"string","description":"Creation date","format":"date-time","readOnly":true},"taskPendingId":{"type":"integer","description":"Pending task id","readOnly":true}}},"email.mxplan.AccountSendOnBehalfTo":{"type":"object","description":"Get users authorized to Send On Behalf To mails from this mailbox","properties":{"allowedAccountId":{"type":"integer","description":"Account id to give send on behalf to","readOnly":true},"creationDate":{"type":"string","description":"Creation date","format":"date-time","readOnly":true},"taskPendingId":{"type":"integer","description":"Pending task id","readOnly":true}}},"email.pro.Task":{"type":"object","description":"Organization task details","properties":{"finishDate":{"type":"string","description":"Completion date","nullable":true,"format":"date-time","readOnly":true},"function":{"allOf":[{"$ref":"#/components/schemas/email.pro.TaskFunctionEnum"}],"description":"Function name","readOnly":true},"id":{"type":"integer","description":"Task id","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/email.pro.TaskStatusEnum"}],"description":"Task status","readOnly":true},"todoDate":{"type":"string","description":"Creation date","format":"date-time","readOnly":true}}},"email.pro.TaskFunctionEnum":{"type":"string","description":"function enumeration for task","enum":["addAccount","addAlias","addDomain","addDomainDKIM","addDomainDisclaimer","addExternalContact","addFullAccess","addSendAs","addSendOnBehalfTo","addServiceAuthorizedIp","changeHostname","changePassword","configureCustomer","deleteAccount","deleteAlias","deleteDomain","deleteDomainDKIM","deleteDomainDisclaimer","deleteExternalContact","deleteFullAccess","deleteSendAs","deleteSendOnBehalfTo","deleteService","deleteServiceAuthorizedIp","diagnoseAccount","disableDKIM","enableDKIM","expandDrive","installServer","maintenance","migrateAccountViaOMM","migrationAccount","migrationDisclaimer","migrationExternalContact","migrationHistory","migrationService","reOpenAccount","setAccount","setAlias","setDns","setDomain","setDomainDisclaimer","setExternalContact","setService","suspendAccount","suspendService","unknown","unsuspendAccount","unsuspendService"]},"email.pro.TaskStatusEnum":{"type":"string","description":"Task status","enum":["cancelled","doing","done","error","todo"]},"internationalPhoneNumber":{"type":"string","description":"International phone number","format":"phone-number"},"ip":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipBlock":{"type":"string","description":"IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)","format":"ip-block","example":"192.0.2.0/24"},"ipInterface":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4":{"type":"string","description":"IPv4 address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4Block":{"type":"string","description":"IPv4 CIDR notation (e.g., 192.0.2.0/24)","format":"ipv4-block","example":"192.0.2.0/24"},"ipv6":{"type":"string","description":"IPv6 address (e.g., 2001:41d0:1:1994::1)","format":"ipv6","example":"2001:41d0:1:1994::1"},"ipv6Block":{"type":"string","description":"IPv6 CIDR notation (e.g., 2001:41d0::/128)","format":"ipv6-block","example":"2001:41d0::/128"},"macAddress":{"type":"string","description":"MAC address (e.g., 00:00:5e:00:53:01)","format":"mac-address","example":"00:00:5e:00:53:01"},"phoneNumber":{"type":"string","description":"Phone number","format":"phone-number"},"time":{"type":"string","description":"Time (e.g., 15:04:05)","format":"time","example":"15:04:05"}},"securitySchemes":{"oAuth2AuthCode":{"type":"oauth2","description":"Oauth2","x-client-id":"1bb9c7df371741c0","x-client-secret":"a5b4de870aca620d10fbf63cd18d205b","flows":{"authorizationCode":{"authorizationUrl":"https://auth.eu.ovhcloud.com/oauth2/authorize","tokenUrl":"https://auth.eu.ovhcloud.com/oauth2/token","scopes":{"account/all":"Manage your account","all":"Manage your whole account and all your services","services/all":"Manage your services lifecycle and billing"}}}}}},"paths":{"/email/mxplan/{service}/account/{email}/fullAccess":{"get":{"summary":"List full access permissions","description":"List full access permissions. Returns the IDs of the accounts that have full access to the email account.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@10"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/email/mxplan/{service}/account/{email}/fullAccess\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/email/mxplan/{service}/account/{email}/fullAccess\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/fullAccess/get","required":true}],"x-expanded-response":"EmailMxplanAccountFullAccess"},"post":{"summary":"Add a full access permission","description":"Add a full access permission. Gives the account `allowedAccountId` full access to the email account, and returns the task.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowedAccountId":{"type":"integer","description":"User to give full access"}},"required":["allowedAccountId"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email.pro.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@30"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: long\nresult = client.post(\"/email/mxplan/{service}/account/{email}/fullAccess\",\n\tallowedAccountId = None, # User to give full access (type: long)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: long\n$result = $ovh->post(\"/email/mxplan/{service}/account/{email}/fullAccess\", array(\n\tallowedAccountId => null, // User to give full access (type: long)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/fullAccess/grant","required":true}]}},"/email/mxplan/{service}/account/{email}/fullAccess/{allowedAccountId}":{"delete":{"summary":"Remove a full access permission","description":"Remove a full access permission. Withdraws the access of the allowed account to the mailbox of this email account, and returns the task.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"allowedAccountId","description":"Account id to give full access","required":true,"schema":{"type":"integer"}},{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email.pro.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@40"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.delete(\"/email/mxplan/{service}/account/{email}/fullAccess/{allowedAccountId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->delete(\"/email/mxplan/{service}/account/{email}/fullAccess/{allowedAccountId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/fullAccess/revoke","required":true}]},"get":{"summary":"Get a full access permission","description":"Get a full access permission. Returns the ID of the account that has full access to the email account, and the creation date of the permission.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"allowedAccountId","description":"Account id to give full access","required":true,"schema":{"type":"integer"}},{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email.mxplan.AccountFullAccess"}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@20"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/email/mxplan/{service}/account/{email}/fullAccess/{allowedAccountId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/email/mxplan/{service}/account/{email}/fullAccess/{allowedAccountId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/fullAccess/get","required":true}]}},"/email/mxplan/{service}/account/{email}/sendAs":{"get":{"summary":"List send as permissions","description":"List send as permissions. Returns the IDs of the accounts allowed to send emails as the email account.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@50"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/email/mxplan/{service}/account/{email}/sendAs\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/email/mxplan/{service}/account/{email}/sendAs\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/sendAs/get","required":true}],"x-expanded-response":"EmailMxplanAccountSendAs"},"post":{"summary":"Add a send as permission","description":"Add a send as permission. Allows the account `allowAccountId` to send emails as the email account, and returns the task.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowAccountId":{"type":"integer","description":"Account id to allow to send mails from this mailbox"}},"required":["allowAccountId"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email.pro.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@70"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: long\nresult = client.post(\"/email/mxplan/{service}/account/{email}/sendAs\",\n\tallowAccountId = None, # Account id to allow to send mails from this mailbox (type: long)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: long\n$result = $ovh->post(\"/email/mxplan/{service}/account/{email}/sendAs\", array(\n\tallowAccountId => null, // Account id to allow to send mails from this mailbox (type: long)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/sendAs/grant","required":true}]}},"/email/mxplan/{service}/account/{email}/sendAs/{allowedAccountId}":{"delete":{"summary":"Remove a send as permission","description":"Remove a send as permission. Withdraws the right of the allowed account to send emails as this email account, and returns the task.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"allowedAccountId","description":"Account id to give send as","required":true,"schema":{"type":"integer"}},{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email.pro.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@80"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.delete(\"/email/mxplan/{service}/account/{email}/sendAs/{allowedAccountId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->delete(\"/email/mxplan/{service}/account/{email}/sendAs/{allowedAccountId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/sendAs/revoke","required":true}]},"get":{"summary":"Get a send as permission","description":"Get a send as permission. Returns the ID of the account allowed to send emails as the email account, and the creation date of the permission.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"allowedAccountId","description":"Account id to give send as","required":true,"schema":{"type":"integer"}},{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email.mxplan.AccountSendAs"}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@60"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/email/mxplan/{service}/account/{email}/sendAs/{allowedAccountId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/email/mxplan/{service}/account/{email}/sendAs/{allowedAccountId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/sendAs/get","required":true}]}},"/email/mxplan/{service}/account/{email}/sendOnBehalfTo":{"get":{"summary":"List send on behalf permissions","description":"List send on behalf permissions. Returns the IDs of the accounts allowed to send emails on behalf of the email account.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@90"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/email/mxplan/{service}/account/{email}/sendOnBehalfTo\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/email/mxplan/{service}/account/{email}/sendOnBehalfTo\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/sendOnBehalfTo/get","required":true}],"x-expanded-response":"EmailMxplanAccountSendOnBehalfTo"},"post":{"summary":"Add a send on behalf permission","description":"Add a send on behalf permission. Allows the account `allowAccountId` to send emails on behalf of the email account, and returns the task.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowAccountId":{"type":"integer","description":"Account id to allow to send On Behalf To mails from this mailbox"}},"required":["allowAccountId"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email.pro.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@110"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: long\nresult = client.post(\"/email/mxplan/{service}/account/{email}/sendOnBehalfTo\",\n\tallowAccountId = None, # Account id to allow to send On Behalf To mails from this mailbox (type: long)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: long\n$result = $ovh->post(\"/email/mxplan/{service}/account/{email}/sendOnBehalfTo\", array(\n\tallowAccountId => null, // Account id to allow to send On Behalf To mails from this mailbox (type: long)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/sendOnBehalfTo/grant","required":true}]}},"/email/mxplan/{service}/account/{email}/sendOnBehalfTo/{allowedAccountId}":{"delete":{"summary":"Remove a send on behalf permission","description":"Remove a send on behalf permission. Withdraws the right of the allowed account to send emails on behalf of this email account, and returns the task.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"allowedAccountId","description":"Account id to give send on behalf to","required":true,"schema":{"type":"integer"}},{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email.pro.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@120"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.delete(\"/email/mxplan/{service}/account/{email}/sendOnBehalfTo/{allowedAccountId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->delete(\"/email/mxplan/{service}/account/{email}/sendOnBehalfTo/{allowedAccountId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/sendOnBehalfTo/revoke","required":true}]},"get":{"summary":"Get a send on behalf permission","description":"Get a send on behalf permission. Returns the ID of the account allowed to send emails on behalf of the email account, and the creation date of the permission.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"allowedAccountId","description":"Account id to give send on behalf to","required":true,"schema":{"type":"integer"}},{"in":"path","name":"email","description":"Default email for this mailbox","required":true,"schema":{"type":"string"}},{"in":"path","name":"service","description":"The internal name of your mxplan organization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email.mxplan.AccountSendOnBehalfTo"}}}}},"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","MX Plan","Zimbra platform","Delegations@@@100"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/email/mxplan/{service}/account/{email}/sendOnBehalfTo/{allowedAccountId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/email/mxplan/{service}/account/{email}/sendOnBehalfTo/{allowedAccountId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"emailMxplan:apiovh:account/sendOnBehalfTo/get","required":true}]}}}}
