{"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/v2"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"common.CurrentTask":{"type":"object","description":"Asynchronous operation currently running","properties":{"errors":{"type":"array","description":"Errors that occurred on the task","nullable":true,"items":{"$ref":"#/components/schemas/common.TaskError"},"readOnly":true},"id":{"type":"string","description":"Identifier of the current task","format":"uuid","readOnly":true},"link":{"type":"string","description":"Link to the task details","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/common.CurrentTaskStatusEnum"}],"description":"Current global status of the current task","nullable":true,"readOnly":true},"type":{"type":"string","description":"Type of the current task","readOnly":true}}},"common.CurrentTaskStatusEnum":{"type":"string","description":"Current status of a task. A task in ERROR cannot be retried without your inputs. PENDING tasks will be executed as soon as possible. A RUNNING task is currently executing your original request. SCHEDULED is used for tasks that will be executed in the future.","enum":["ERROR","PENDING","RUNNING","SCHEDULED","WAITING_USER_INPUT"]},"common.ResourceStatusEnum":{"type":"string","description":"Current status of a resource","enum":["CREATING","CREATION_PLANNED","DELETING","ERROR","OUT_OF_SYNC","READY","SUSPENDED","UNKNOWN","UPDATING"]},"common.TaskError":{"type":"object","description":"Errors that occurred on the task","properties":{"message":{"type":"string","description":"Error description","readOnly":true}}},"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"},"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"},"zimbra.AccountCurrentState":{"type":"object","description":"Object representing account","properties":{"contactInformation":{"allOf":[{"$ref":"#/components/schemas/zimbra.ContactInformation"}],"description":"Object representing contact information which extends account object","nullable":true,"readOnly":true},"createdAt":{"type":"string","description":"Date of creation","format":"date-time","readOnly":true},"description":{"type":"string","description":"Description of the account","nullable":true,"readOnly":true},"detailedStatus":{"type":"array","description":"Breakdown of what the account is doing, giving the reason behind its overall status","items":{"$ref":"#/components/schemas/zimbra.AccountDetailedStatus"},"readOnly":true},"displayName":{"type":"string","description":"Display name of the account","nullable":true,"readOnly":true},"domainId":{"type":"string","description":"Domain ID related to the account","format":"uuid","readOnly":true},"email":{"type":"string","description":"Email address of the account","readOnly":true},"firstName":{"type":"string","description":"First name of the account user","nullable":true,"readOnly":true},"hideInGal":{"type":"boolean","description":"Whether to hide email address in GAL or not","readOnly":true},"lastConnectionAt":{"type":"string","description":"Last connection date","nullable":true,"format":"date-time","readOnly":true},"lastName":{"type":"string","description":"Last name of the account user","nullable":true,"readOnly":true},"offer":{"allOf":[{"$ref":"#/components/schemas/zimbra.OfferEnum"}],"description":"Offer of the account","readOnly":true},"organizationId":{"type":"string","description":"ID of the organization to which the account belongs","format":"uuid","readOnly":true},"organizationLabel":{"type":"string","description":"Label of the organization to which the account belongs","readOnly":true},"quota":{"allOf":[{"$ref":"#/components/schemas/zimbra.Quota"}],"description":"Maximum account capacity","readOnly":true},"quotaRefreshedAt":{"type":"string","description":"Datetime of last quota refresh","format":"date-time","readOnly":true},"slotId":{"type":"string","description":"Slot id of the account","format":"uuid","readOnly":true},"updatedAt":{"type":"string","description":"Date of update","nullable":true,"format":"date-time","readOnly":true}}},"zimbra.AccountDetailedStatus":{"type":"object","description":"Detailed Status of an Account","properties":{"details":{"type":"string","description":"Further details if the code is not sufficient","readOnly":true},"link":{"type":"string","description":"A link to a document that provides more information on the status","nullable":true,"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/zimbra.AccountStatusEnum"}],"description":"Current account status","readOnly":true}}},"zimbra.AccountPostPayload":{"type":"object","description":"Object representing POST account route payload","properties":{"targetSpec":{"allOf":[{"$ref":"#/components/schemas/zimbra.AccountPostTargetSpec"}],"description":"Target organization specification"}},"required":["targetSpec"]},"zimbra.AccountPostTargetSpec":{"type":"object","description":"Object representing POST account route payload","properties":{"contactInformation":{"allOf":[{"$ref":"#/components/schemas/zimbra.ContactInformation"}],"description":"Object representing contact information which extends account object"},"description":{"type":"string","description":"Description of the account"},"displayName":{"type":"string","description":"Display name of the account"},"email":{"type":"string","description":"Email address of the account"},"firstName":{"type":"string","description":"First name of the account user"},"forceChangePasswordAfterLogin":{"type":"boolean","description":"Force a change password after user logs into webmail"},"hideInGal":{"type":"boolean","description":"Whether email address should be hidden in GAL"},"lastName":{"type":"string","description":"Last name of the account user"},"offer":{"allOf":[{"$ref":"#/components/schemas/zimbra.OfferEnum"}],"description":"Offer type of the account"},"password":{"type":"string","description":"Password of the account","format":"password"},"quota":{"allOf":[{"$ref":"#/components/schemas/zimbra.QuotaPayload"}],"description":"Number representation of account capacity","nullable":true},"slotId":{"type":"string","description":"Slot ID to be linked to the account","format":"uuid"}},"required":["email","offer","password","slotId"]},"zimbra.AccountPutPayload":{"type":"object","description":"Object representing PUT account route payload","properties":{"checksum":{"type":"string","description":"Known checksum of the resource, allowing to prevent unwanted side effects"},"targetSpec":{"allOf":[{"$ref":"#/components/schemas/zimbra.AccountPutTargetSpec"}],"description":"Target account specification"}},"required":["targetSpec"]},"zimbra.AccountPutTargetSpec":{"type":"object","description":"Base object of the account","properties":{"contactInformation":{"allOf":[{"$ref":"#/components/schemas/zimbra.ContactInformation"}],"description":"Object representing contact information which extends account object","nullable":true},"description":{"type":"string","description":"Description of the account","nullable":true},"displayName":{"type":"string","description":"Display name of the account","nullable":true},"email":{"type":"string","description":"Email address of the account"},"firstName":{"type":"string","description":"First name of the account user","nullable":true},"forceChangePasswordAfterLogin":{"type":"boolean","description":"Force a change password after user logs into webmail"},"hideInGal":{"type":"boolean","description":"Whether email address should be hidden in GAL"},"lastName":{"type":"string","description":"Last name of the account user","nullable":true},"password":{"type":"string","description":"Password of the account"},"quota":{"allOf":[{"$ref":"#/components/schemas/zimbra.QuotaPayload"}],"description":"Number representation of account capacity","nullable":true},"quotaRefreshedAt":{"type":"string","description":"Datetime of last quota refresh","format":"date-time"}}},"zimbra.AccountResponse":{"type":"object","description":"Response for a Zimbra Account","properties":{"checksum":{"type":"string","description":"Checksum hash in MD5 representation","readOnly":true},"currentState":{"allOf":[{"$ref":"#/components/schemas/zimbra.AccountCurrentState"}],"description":"Object representing account","readOnly":true},"currentTasks":{"type":"array","description":"An array containing tasks responses pending on resource extends AsyncResourceBase object","items":{"$ref":"#/components/schemas/common.CurrentTask"},"readOnly":true},"id":{"type":"string","description":"Resource identifier in UUID representation","format":"uuid","readOnly":true},"resourceStatus":{"allOf":[{"$ref":"#/components/schemas/common.ResourceStatusEnum"}],"description":"Current resource status","readOnly":true},"targetSpec":{"allOf":[{"$ref":"#/components/schemas/zimbra.AccountTargetSpec"}],"description":"Object representing account","readOnly":true}}},"zimbra.AccountStatusEnum":{"type":"string","description":"Current account status","enum":["BILLINGLOCKED","BLOCKEDFORSPAM"]},"zimbra.AccountTargetSpec":{"type":"object","description":"Base object of the account","properties":{"contactInformation":{"allOf":[{"$ref":"#/components/schemas/zimbra.ContactInformation"}],"description":"Object representing contact information which extends account object","nullable":true,"readOnly":true},"description":{"type":"string","description":"Description of the account","nullable":true,"readOnly":true},"displayName":{"type":"string","description":"Display name of the account","nullable":true,"readOnly":true},"email":{"type":"string","description":"Email address of the account","readOnly":true},"firstName":{"type":"string","description":"First name of the account user","nullable":true,"readOnly":true},"hideInGal":{"type":"boolean","description":"Whether email address should be hidden in GAL","readOnly":true},"lastName":{"type":"string","description":"Last name of the account user","nullable":true,"readOnly":true},"quota":{"allOf":[{"$ref":"#/components/schemas/zimbra.QuotaPayload"}],"description":"Number representation of account capacity","nullable":true,"readOnly":true},"quotaRefreshedAt":{"type":"string","description":"Datetime of last quota refresh","format":"date-time","readOnly":true}}},"zimbra.ContactInformation":{"type":"object","description":"Object representing contact information which extends account object","properties":{"city":{"type":"string","description":"City of the account user","nullable":true},"company":{"type":"string","description":"Company name of the account user","nullable":true},"country":{"type":"string","description":"Company name of the account user","nullable":true},"faxNumber":{"type":"string","description":"Fax number of the account user","nullable":true},"mobileNumber":{"type":"string","description":"Mobile number of the account user","nullable":true},"office":{"type":"string","description":"Office location of the account user","nullable":true},"phoneNumber":{"type":"string","description":"Phone number of the account user","nullable":true},"postcode":{"type":"string","description":"Postal code of the account user","nullable":true},"profession":{"type":"string","description":"Profession of the account user","nullable":true},"service":{"type":"string","description":"Department of the account user","nullable":true},"street":{"type":"string","description":"Street name of the account user","nullable":true}}},"zimbra.OfferEnum":{"type":"string","description":"Commercial name of the offer","enum":["PRO","STARTER"]},"zimbra.Quota":{"type":"object","description":"Number representation of account capacity","properties":{"additional":{"type":"number","description":"Space included in account additions","readOnly":true},"available":{"type":"number","description":"Remaining space","readOnly":true},"limit":{"type":"number","description":"User defined maximum space for account","readOnly":true},"maximum":{"type":"number","description":"Total space for account","readOnly":true},"offer":{"type":"number","description":"Space included in account offer","readOnly":true},"used":{"type":"number","description":"Space already taken","readOnly":true}}},"zimbra.QuotaPayload":{"type":"object","description":"Number representation of account capacity","properties":{"limit":{"type":"number","description":"Maximum space for account","nullable":true}}}},"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":{"/zimbra/platform/{platformId}/account":{"get":{"operationId":"getAllZimbraAccounts","summary":"List email accounts","description":"Returns the email accounts of the platform with their current state. Filter them by `organizationId`, `organizationLabel`, `domainId`, `email` or `offer`.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"header","name":"X-Pagination-Cursor","description":"Pagination cursor","schema":{"type":"string"}},{"in":"header","name":"X-Pagination-Size","description":"Pagination size","schema":{"type":"integer"}},{"in":"query","name":"domainId","description":"Filter by Domain identifier","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"email","description":"Filter by email","schema":{"type":"string"}},{"in":"query","name":"offer","description":"Filter by offer","schema":{"$ref":"#/components/schemas/zimbra.OfferEnum"}},{"in":"query","name":"organizationId","description":"Filter by organization identifier","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"organizationLabel","description":"Filter by organization label","schema":{"type":"string"}},{"in":"path","name":"platformId","description":"Platform ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/zimbra.AccountResponse"}}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::CannotFilterByOffer":{"value":{"class":"Client::BadRequest::CannotFilterByOffer","message":"Filtering by this offer is not yet possible"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::PlatformNotFound":{"value":{"class":"Client::NotFound::PlatformNotFound","message":"The platform was not found"}}}}}}},"tags":["Account"],"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","Zimbra","Accounts@@@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(\"/v2/zimbra/platform/{platformId}/account\")\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(\"/v2/zimbra/platform/{platformId}/account\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"zimbra:apiovh:platform/account/get","required":true}],"x-response-identifier":"id","x-expanded-response":"ZimbraAccountResponse"},"post":{"operationId":"createZimbraAccount","summary":"Create an email account","description":"Creates an email account from its `email`, `password`, `offer` and `slotId`. The domain must be ready and the slot must match the offer. Creation is asynchronous: follow `resourceStatus` and `currentTasks`.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"platformId","description":"Platform ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zimbra.AccountPostPayload"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/zimbra.AccountResponse"}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::AccountEmailContainForbiddenCharacter":{"value":{"class":"Client::BadRequest::AccountEmailContainForbiddenCharacter","message":"The account name contains one or more forbidden characters; it should match: {{.REGEX_EMAIL}}"}},"Client::BadRequest::AccountSlotHasWrongOffer":{"value":{"class":"Client::BadRequest::AccountSlotHasWrongOffer","message":"The account slot offer does not correspond to the requested offer"}},"Client::BadRequest::DomainNotReady":{"value":{"class":"Client::BadRequest::DomainNotReady","message":"The domain is not in ready status"}},"Client::BadRequest::InvalidPasswordNotMatchingPolicy":{"value":{"class":"Client::BadRequest::InvalidPasswordNotMatchingPolicy","message":"Your password does not match the policy"}},"Client::BadRequest::NoSlotAvailable":{"value":{"class":"Client::BadRequest::NoSlotAvailable","message":"There is no available slot to create an account"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::DomainNotFound":{"value":{"class":"Client::NotFound::DomainNotFound","message":"The domain was not found with the provided criteria"}},"Client::NotFound::OrganizationNotFound":{"value":{"class":"Client::NotFound::OrganizationNotFound","message":"The organization was not found"}},"Client::NotFound::SlotNotFound":{"value":{"class":"Client::NotFound::SlotNotFound","message":"The slot was not found"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::AccountEmailAddressAlreadyUsed":{"value":{"class":"Client::Conflict::AccountEmailAddressAlreadyUsed","message":"The email address for your account is already used; check existing mailbox, alias, redirection, or mailing list name"}},"Client::Conflict::AccountSlotInUndesiredStatus":{"value":{"class":"Client::Conflict::AccountSlotInUndesiredStatus","message":"The chosen slot is in an undesired status"}},"Client::Conflict::AccountSlotIsAlreadyUsed":{"value":{"class":"Client::Conflict::AccountSlotIsAlreadyUsed","message":"The chosen slot for an account was already reserved by another request; please retry"}}}}}}},"tags":["Account"],"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","Zimbra","Accounts@@@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: zimbra.AccountPostPayload\nresult = client.post(\"/v2/zimbra/platform/{platformId}/account\",\n\ttargetSpec = None, # Target organization specification (type: zimbra.AccountPostTargetSpec)\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: zimbra.AccountPostPayload\n$result = $ovh->post(\"/v2/zimbra/platform/{platformId}/account\", array(\n\ttargetSpec => null, // Target organization specification (type: zimbra.AccountPostTargetSpec)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"zimbra:apiovh:platform/account/create","required":true}]}},"/zimbra/platform/{platformId}/account/{accountId}":{"delete":{"operationId":"deleteZimbraAccount","summary":"Delete an email account","description":"Deletes the email account. An account blocked for spam cannot be deleted.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"accountId","description":"Account ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"platformId","description":"Platform ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation"}},"tags":["Account"],"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","Zimbra","Accounts@@@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(\"/v2/zimbra/platform/{platformId}/account/{accountId}\")\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(\"/v2/zimbra/platform/{platformId}/account/{accountId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"zimbra:apiovh:platform/account/delete","required":true}]},"get":{"operationId":"getZimbraAccount","summary":"Get an email account","description":"Returns the email address, offer, slot, quota usage, contact information and detailed status of the email account, with its ongoing tasks.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"accountId","description":"Account ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"platformId","description":"Platform ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/zimbra.AccountResponse"}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::MultipleAccountsFoundWithSameID":{"value":{"class":"Client::BadRequest::MultipleAccountsFoundWithSameID","message":"Multiple accounts were found with the requested ID"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::AccountNotFound":{"value":{"class":"Client::NotFound::AccountNotFound","message":"The account was not found"}},"Client::NotFound::PlatformNotFound":{"value":{"class":"Client::NotFound::PlatformNotFound","message":"The platform was not found"}}}}}}},"tags":["Account"],"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","Zimbra","Accounts@@@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(\"/v2/zimbra/platform/{platformId}/account/{accountId}\")\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(\"/v2/zimbra/platform/{platformId}/account/{accountId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"zimbra:apiovh:platform/account/get","required":true}],"x-response-identifier":"id"},"put":{"operationId":"editZimbraAccount","summary":"Update an email account","description":"Updates the email address, password, names, contact information, visibility in the global address list (`hideInGal`) or quota limit of the email account. When set, `checksum` must match the current checksum of the account, otherwise the update is rejected.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"accountId","description":"Account ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"platformId","description":"Platform ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zimbra.AccountPutPayload"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/zimbra.AccountResponse"}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::MultipleDomainsFound":{"value":{"class":"Client::BadRequest::MultipleDomainsFound","message":"Multiple domains were found when only one was expected"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::AccountNotFound":{"value":{"class":"Client::NotFound::AccountNotFound","message":"The account was not found"}},"Client::NotFound::DomainNotFound":{"value":{"class":"Client::NotFound::DomainNotFound","message":"The domain was not found with the provided criteria"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::AccountEmailAddressAlreadyUsed":{"value":{"class":"Client::Conflict::AccountEmailAddressAlreadyUsed","message":"The email address for your account is already used; check existing mailbox, alias, redirection, or mailing list name"}},"Client::Conflict::DomainNotReady":{"value":{"class":"Client::Conflict::DomainNotReady","message":"The domain is not in ready status"}},"Client::Conflict::UndesiredObjectStatus":{"value":{"class":"Client::Conflict::UndesiredObjectStatus","message":"The object is in an undesired status"}}}}}},"412":{"description":"Error 412 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::PreconditionFailed::InvalidChecksum":{"value":{"class":"Client::PreconditionFailed::InvalidChecksum","message":"The checksum is invalid because the object has expired"}}}}}}},"tags":["Account"],"x-developer-hub-navigation":[["Web Cloud","Email and Collaborative Solutions","Zimbra","Accounts@@@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\n# Request body type: zimbra.AccountPutPayload\nresult = client.put(\"/v2/zimbra/platform/{platformId}/account/{accountId}\",\n\tchecksum = None, # Known checksum of the resource, allowing to prevent unwanted side effects (type: string)\n\ttargetSpec = None, # Target account specification (type: zimbra.AccountPutTargetSpec)\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: zimbra.AccountPutPayload\n$result = $ovh->put(\"/v2/zimbra/platform/{platformId}/account/{accountId}\", array(\n\tchecksum => null, // Known checksum of the resource, allowing to prevent unwanted side effects (type: string)\n\ttargetSpec => null, // Target account specification (type: zimbra.AccountPutTargetSpec)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"zimbra:apiovh:platform/account/edit","required":true}]}}},"tags":[{"name":"Account","x-tag-expanded":false,"description":"Missing description"}]}
