# Web Cloud › Domains API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Web Cloud product's sections: https://developers.eu.ovhcloud.com/reference/web-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 79 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/domains.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/domains.json?format=openapi3

## Operations

- `GET /domain/name` — List all domain name resources
- `GET /domain/name/{domainName}` — Get a domain name resource
- `PUT /domain/name/{domainName}` — Update an existing domain name by modifying various configurations through the targetSpec
- `GET /domain` — Get the list of managed domain names
- `GET /domain/{serviceName}` — Get domain name information
- `PUT /domain/{serviceName}` — Edit domain name properties
- `GET /domain/{serviceName}/serviceInfos` — Get service information
- `PUT /domain/{serviceName}/serviceInfos` — Update service information
- `GET /domain/{serviceName}/nameServer` — List of current name servers
- `GET /domain/{serviceName}/nameServer/{id}` — Get this name server configuration
- `POST /domain/{serviceName}/nameServer` — Add new name server
- `DELETE /domain/{serviceName}/nameServer/{id}` — Delete a name server
- `GET /domain/{serviceName}/nameServer/{id}/status` — Get name server status
- `POST /domain/{serviceName}/nameServers/update` — Update DNS servers
- `GET /domain/{serviceName}/dsRecord` — List of domain's DS Records
- `GET /domain/{serviceName}/dsRecord/{id}` — Get details on this DS Record
- `POST /domain/{serviceName}/dsRecord` — Update DS records
- `GET /domain/{serviceName}/glueRecord` — List of glue records
- `GET /domain/{serviceName}/glueRecord/{host}` — Get this glue record
- `POST /domain/{serviceName}/glueRecord` — Create a glue record
- `DELETE /domain/{serviceName}/glueRecord/{host}` — Delete the glue record
- `POST /domain/{serviceName}/glueRecord/{host}/update` — Update the glue record
- `GET /domain/{serviceName}/option` — List domain options
- `GET /domain/{serviceName}/option/{option}` — Get details on this domain option
- `DELETE /domain/{serviceName}/option/{option}` — Remove a given option
- `GET /domain/{serviceName}/options` — Retrieve data about the options associated to a domain
- `GET /allDom` — List available services
- `GET /allDom/{serviceName}` — Void
- `GET /domain/zone` — List available services
- `GET /domain/zone/{zoneName}` — Get this object properties
- `GET /domain/zone/{zoneName}/capabilities` — Zone capabilities
- `POST /domain/zone/{zoneName}/changeContact` — Change service contacts
- `POST /domain/zone/{zoneName}/confirmTermination` — Confirm service termination
- `GET /domain/zone/{zoneName}/dnssec` — Get this object properties
- `POST /domain/zone/{zoneName}/dnssec` — Enable Dnssec
- `DELETE /domain/zone/{zoneName}/dnssec` — Disable Dnssec
- `GET /domain/zone/{zoneName}/dynHost/login` — DynHost' logins
- `POST /domain/zone/{zoneName}/dynHost/login` — Create a new DynHost login
- `GET /domain/zone/{zoneName}/dynHost/login/{login}` — Get this object properties
- `PUT /domain/zone/{zoneName}/dynHost/login/{login}` — Alter this object properties
- `DELETE /domain/zone/{zoneName}/dynHost/login/{login}` — Delete a DynHost login
- `POST /domain/zone/{zoneName}/dynHost/login/{login}/changePassword` — Change password of the DynHost login
- `GET /domain/zone/{zoneName}/dynHost/record` — DynHost' records
- `POST /domain/zone/{zoneName}/dynHost/record` — Create a new DynHost record (Don't forget to refresh the zone)
- `GET /domain/zone/{zoneName}/dynHost/record/{id}` — Get this object properties
- `PUT /domain/zone/{zoneName}/dynHost/record/{id}` — Alter this object properties
- `DELETE /domain/zone/{zoneName}/dynHost/record/{id}` — Delete a DynHost record (Don't forget to refresh the zone)
- `GET /domain/zone/{zoneName}/export` — Export zone
- `GET /domain/zone/{zoneName}/history` — Zone restore points
- `GET /domain/zone/{zoneName}/history/{creationDate}` — Get this object properties
- `POST /domain/zone/{zoneName}/history/{creationDate}/restore` — Restore the DNS zone
- `POST /domain/zone/{zoneName}/import` — Import zone
- `GET /domain/zone/{zoneName}/option` — List zone options
- `GET /domain/zone/{zoneName}/option/{name}` — Get this object properties
- `GET /domain/zone/{zoneName}/option/{name}/serviceInfos` — Get this object properties
- `PUT /domain/zone/{zoneName}/option/{name}/serviceInfos` — Alter this object properties
- `GET /domain/zone/{zoneName}/record` — Records of the zone
- `POST /domain/zone/{zoneName}/record` — Create a new DNS record (Don't forget to refresh the zone)
- `GET /domain/zone/{zoneName}/record/{id}` — Get this object properties
- `PUT /domain/zone/{zoneName}/record/{id}` — Alter this object properties
- `DELETE /domain/zone/{zoneName}/record/{id}` — Delete a DNS record (Don't forget to refresh the zone)
- `GET /domain/zone/{zoneName}/redirection` — Redirections
- `POST /domain/zone/{zoneName}/redirection` — Create a new redirection (Don't forget to refresh the zone)
- `GET /domain/zone/{zoneName}/redirection/{id}` — Get this object properties
- `PUT /domain/zone/{zoneName}/redirection/{id}` — Alter this object properties
- `DELETE /domain/zone/{zoneName}/redirection/{id}` — Delete a redirection (Don't forget to refresh the zone)
- `POST /domain/zone/{zoneName}/refresh` — Apply zone modification on DNS servers
- `POST /domain/zone/{zoneName}/reset` — Reset the DNS zone
- `GET /domain/zone/{zoneName}/serviceInfos` — Get service information
- `PUT /domain/zone/{zoneName}/serviceInfos` — Update service information
- `GET /domain/zone/{zoneName}/soa` — Get this object properties
- `PUT /domain/zone/{zoneName}/soa` — Alter this object properties
- `GET /domain/zone/{zoneName}/status` — Zone status
- `GET /domain/zone/{zoneName}/task` — Domain pending tasks
- `GET /domain/zone/{zoneName}/task/{id}` — Get this object properties
- `POST /domain/zone/{zoneName}/task/{id}/accelerate` — Accelerate the task
- `POST /domain/zone/{zoneName}/task/{id}/cancel` — Cancel the task
- `POST /domain/zone/{zoneName}/task/{id}/relaunch` — Relaunch the task
- `POST /domain/zone/{zoneName}/terminate` — Request service termination

## List all domain name resources

`GET /v2/domain/name`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-name

**Status:** Beta version  
**IAM actions:** `domain:apiovh:name/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `additionalStates` | query | domain.resource.currentState.AdditionalStatesEnum[] |  | Filter the results having all these additional states |
| `contactAdministrator` | query | string[] |  | Filter the results by administrator contact id |
| `contactBilling` | query | string[] |  | Filter the results by billing contact id |
| `contactOwner` | query | string[] |  | Filter the results by owner contact id |
| `contactTechnical` | query | string[] |  | Filter the results by technical contact id |
| `iamTags` | query | object |  | Filter resources on IAM tags |
| `mainState` | query | domain.resource.currentState.MainStateEnum[] |  | Filter the results having all these main states |
| `searchValue` | query | string |  | Filter the results with the search value on resource id |
| `suspensionState` | query | domain.resource.currentState.SuspensionStateEnum[] |  | Filter the results having all these suspension states |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.DomainWithIAM[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string |  | Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. |
| `currentState` | domain.DomainCurrentState | read-only | Current state of the domain name |
| `currentState.additionalStates` | domain.resource.currentState.AdditionalStatesEnum[] | read-only | Additional states of your domain |
| `currentState.authInfoManagedByOVHcloud` | boolean | read-only | Whether OVHcloud manages your authinfo |
| `currentState.authInfoSupported` | boolean | read-only | Whether the registry uses authinfo to secure your domain name |
| `currentState.contactsConfiguration` | domain.resource.currentState.ContactsConfiguration | read-only | Configuration of your domain contacts |
| `currentState.contactsConfiguration.contactAdministrator` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the administrator contact |
| `currentState.contactsConfiguration.contactBilling` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the billing contact |
| `currentState.contactsConfiguration.contactOwner` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the owner contact |
| `currentState.contactsConfiguration.contactTechnical` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the technical contact |
| `currentState.createdAt` | string (date-time) | read-only | Date when your domain name was created |
| `currentState.designatedAgentAllowed` | boolean | read-only | Whether a Designated Agent may validate the trade operations (change of holder) for this domain |
| `currentState.dnsConfiguration` | domain.resource.currentState.DnsConfiguration | read-only | DNS configuration of your domain |
| `currentState.dnsConfiguration.configurationType` | domain.resource.currentState.dnsConfiguration.NameServerTypeEnum | read-only | Specifies the DNS configuration type for your domain — one of `ANYCAST`, `DEDICATED`, `EMPTY`, `EXTERNAL`, `HOLD`, `HOSTING`, `MIXED`, `PARKING` |
| `currentState.dnsConfiguration.dnssecSupported` | boolean | read-only | Deprecated. Use `dnssecSupported` from dnssecConfiguration node instead. |
| `currentState.dnsConfiguration.glueRecordIPv6Supported` | boolean | read-only | Deprecated. Use `ipv6Supported` from hostsConfiguration instead. |
| `currentState.dnsConfiguration.hostSupported` | boolean | read-only | Deprecated. Use `hostSupported` from hostsConfiguration instead. |
| `currentState.dnsConfiguration.maxDNS` | integer | read-only | Specifies the maximum number of name servers allowed by the registry |
| `currentState.dnsConfiguration.minDNS` | integer | read-only | Specifies the minimum number of name servers allowed by the registry |
| `currentState.dnsConfiguration.multipleIPsSupported` | boolean | read-only | Whether the registry accepts more than one address on a name server, IPv4 and IPv6 counted together: one of each already counts as several |
| `currentState.dnsConfiguration.nameServers` | domain.resource.currentState.dnsConfiguration.NameServer[] | read-only | Lists the name servers used by your domain |
| `currentState.dnssecConfiguration` | domain.resource.currentState.DnssecConfiguration | read-only | DNSSEC configuration of your domain |
| `currentState.dnssecConfiguration.dnssecSupported` | boolean | read-only | Whether the registry supports DNSSEC |
| `currentState.dnssecConfiguration.dsData` | domain.resource.currentState.dnssecConfiguration.DsData[] | read-only | Contains the registered DS data for your domain name |
| `currentState.dnssecConfiguration.supportedAlgorithms` | domain.resource.currentState.dnssecConfiguration.SupportedAlgorithm[] | read-only | Specifies all cryptographic algorithms that you can use to define DS data |
| `currentState.extension` | string | read-only | Extension of your domain name |
| `currentState.hostsConfiguration` | domain.resource.currentState.HostsConfiguration | read-only | Host configuration of your domain |
| `currentState.hostsConfiguration.hostSupported` | boolean | read-only | Whether the registry supports host management |
| `currentState.hostsConfiguration.hosts` | domain.resource.currentState.hostsConfiguration.Host[] | read-only | Contains the registered host configuration |
| `currentState.hostsConfiguration.ipv4Supported` | boolean | read-only | Whether the registry supports IPv4 |
| `currentState.hostsConfiguration.ipv6Supported` | boolean | read-only | Whether the registry supports IPv6 |
| `currentState.hostsConfiguration.multipleIPsSupported` | boolean | read-only | Whether the registry supports multiple IPs |
| `currentState.mainState` | domain.resource.currentState.MainStateEnum | read-only | Main state of your domain — one of `DELETED`, `EXPIRED`, `OK`, `PENDING_CREATE`, `PENDING_DELETE`, `PENDING_INTERNAL_TRANSFER`, `PENDING_OUTGOING_TRANSFER`, `RESTORABLE`, `TO_DELETE` |
| `currentState.name` | string | read-only | Your domain name |
| `currentState.protectionState` | domain.resource.ProtectionStateEnum | read-only | Protection state of your domain — one of `PROTECTED`, `UNPROTECTED` |
| `currentState.suspensionState` | domain.resource.currentState.SuspensionStateEnum | read-only | Suspension state of your domain — one of `NOT_SUSPENDED`, `SUSPENDED` |
| `currentState.transferAuthorizationMethod` | domain.resource.currentState.TransferAuthorizationMethodEnum | read-only | Method used to authorize domain transfer — one of `ASK_OVHCLOUD_SUPPORT`, `AUTH_CODE`, `NONE`, `TRANSFER_TAG` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the domain name resource |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `id` | string | read-only | Unique identifier of the resource. Here, the domain name itself is used as an identifier. |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the domain name resource. A new target specification request will be accepted only in `READY`, `UPDATING` or `ERROR` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | domain.DomainTargetSpec | yes | Latest target specification of the domain name resource |
| `targetSpec.contactsConfiguration` | domain.resource.targetSpec.ContactsConfiguration |  | Provides the configuration for your domain contacts |
| `targetSpec.contactsConfiguration.contactAdministrator` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the administrator contact |
| `targetSpec.contactsConfiguration.contactBilling` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the billing contact |
| `targetSpec.contactsConfiguration.contactOwner` | domain.resource.targetSpec.contactsConfiguration.OwnerConfiguration |  | Indicates the configuration of the owner contact |
| `targetSpec.contactsConfiguration.contactTechnical` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the technical contact |
| `targetSpec.dnsConfiguration` | domain.resource.targetSpec.DnsConfiguration |  | Provides the DNS configuration for your domain |
| `targetSpec.dnsConfiguration.nameServers` | domain.resource.targetSpec.dnsConfiguration.NameServer[] |  | The name servers to update |
| `targetSpec.dnssecConfiguration` | domain.resource.targetSpec.DnssecConfiguration |  | Provides the DNSSEC configuration for your domain |
| `targetSpec.dnssecConfiguration.dsData` | domain.resource.targetSpec.dnssecConfiguration.DsData[] |  | Contains the DS data to update |
| `targetSpec.hostsConfiguration` | domain.resource.targetSpec.HostsConfiguration |  | Provides the host configuration for your domain |
| `targetSpec.hostsConfiguration.hosts` | domain.resource.targetSpec.hostsConfiguration.Host[] |  | The hosts you update |
| `targetSpec.protectionState` | domain.resource.ProtectionStateEnum |  | Indicates the protection state of your domain — one of `PROTECTED`, `UNPROTECTED` |

```json
[
  {
    "checksum": "string",
    "currentState": {
      "additionalStates": [
        "DGCCRF_ABUSE"
      ],
      "authInfoManagedByOVHcloud": true,
      "authInfoSupported": true,
      "contactsConfiguration": {
        "contactAdministrator": {
          "disclosurePolicy": {
            "disclosedFields": [
              null
            ],
            "disclosureConfiguration": "DISCLOSED",
            "forcedDisclosureConfiguration": true,
            "visibleViaRdds": true
          },
          "id": "string"
        },
        "contactBilling": {
          "disclosurePolicy": {
            "disclosedFields": [
              null
            ],
            "disclosureConfiguration": "DISCLOSED",
            "forcedDisclosureConfiguration": true,
            "visibleViaRdds": true
          },
          "id": "string"
        },
        "contactOwner": {
          "disclosurePolicy": {
            "disclosedFields": [
              null
            ],
            "disclosureConfiguration": "DISCLOSED",
            "forcedDisclosureConfiguration": true,
            "visibleViaRdds": true
          },
          "id": "string"
        },
        "contactTechnical": {
          "disclosurePolicy": {
            "disclosedFields": [
              null
            ],
            "disclosureConfiguration": "DISCLOSED",
            "forcedDisclosureConfiguration": true,
            "visibleViaRdds": true
          },
          "id": "string"
        }
      },
      "createdAt": "2024-01-01T12:00:00Z",
      "designatedAgentAllowed": true,
      "dnsConfiguration": {
  …
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/domain/name" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/domain/name")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/domain/name");

print_r($result);
?>
```

## Get a domain name resource

`GET /v2/domain/name/{domainName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-name-domainname

**Status:** Beta version  
**IAM actions:** `domain:apiovh:name/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.DomainWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string |  | Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. |
| `currentState` | domain.DomainCurrentState | read-only | Current state of the domain name |
| `currentState.additionalStates` | domain.resource.currentState.AdditionalStatesEnum[] | read-only | Additional states of your domain |
| `currentState.authInfoManagedByOVHcloud` | boolean | read-only | Whether OVHcloud manages your authinfo |
| `currentState.authInfoSupported` | boolean | read-only | Whether the registry uses authinfo to secure your domain name |
| `currentState.contactsConfiguration` | domain.resource.currentState.ContactsConfiguration | read-only | Configuration of your domain contacts |
| `currentState.contactsConfiguration.contactAdministrator` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the administrator contact |
| `currentState.contactsConfiguration.contactBilling` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the billing contact |
| `currentState.contactsConfiguration.contactOwner` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the owner contact |
| `currentState.contactsConfiguration.contactTechnical` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the technical contact |
| `currentState.createdAt` | string (date-time) | read-only | Date when your domain name was created |
| `currentState.designatedAgentAllowed` | boolean | read-only | Whether a Designated Agent may validate the trade operations (change of holder) for this domain |
| `currentState.dnsConfiguration` | domain.resource.currentState.DnsConfiguration | read-only | DNS configuration of your domain |
| `currentState.dnsConfiguration.configurationType` | domain.resource.currentState.dnsConfiguration.NameServerTypeEnum | read-only | Specifies the DNS configuration type for your domain — one of `ANYCAST`, `DEDICATED`, `EMPTY`, `EXTERNAL`, `HOLD`, `HOSTING`, `MIXED`, `PARKING` |
| `currentState.dnsConfiguration.dnssecSupported` | boolean | read-only | Deprecated. Use `dnssecSupported` from dnssecConfiguration node instead. |
| `currentState.dnsConfiguration.glueRecordIPv6Supported` | boolean | read-only | Deprecated. Use `ipv6Supported` from hostsConfiguration instead. |
| `currentState.dnsConfiguration.hostSupported` | boolean | read-only | Deprecated. Use `hostSupported` from hostsConfiguration instead. |
| `currentState.dnsConfiguration.maxDNS` | integer | read-only | Specifies the maximum number of name servers allowed by the registry |
| `currentState.dnsConfiguration.minDNS` | integer | read-only | Specifies the minimum number of name servers allowed by the registry |
| `currentState.dnsConfiguration.multipleIPsSupported` | boolean | read-only | Whether the registry accepts more than one address on a name server, IPv4 and IPv6 counted together: one of each already counts as several |
| `currentState.dnsConfiguration.nameServers` | domain.resource.currentState.dnsConfiguration.NameServer[] | read-only | Lists the name servers used by your domain |
| `currentState.dnssecConfiguration` | domain.resource.currentState.DnssecConfiguration | read-only | DNSSEC configuration of your domain |
| `currentState.dnssecConfiguration.dnssecSupported` | boolean | read-only | Whether the registry supports DNSSEC |
| `currentState.dnssecConfiguration.dsData` | domain.resource.currentState.dnssecConfiguration.DsData[] | read-only | Contains the registered DS data for your domain name |
| `currentState.dnssecConfiguration.supportedAlgorithms` | domain.resource.currentState.dnssecConfiguration.SupportedAlgorithm[] | read-only | Specifies all cryptographic algorithms that you can use to define DS data |
| `currentState.extension` | string | read-only | Extension of your domain name |
| `currentState.hostsConfiguration` | domain.resource.currentState.HostsConfiguration | read-only | Host configuration of your domain |
| `currentState.hostsConfiguration.hostSupported` | boolean | read-only | Whether the registry supports host management |
| `currentState.hostsConfiguration.hosts` | domain.resource.currentState.hostsConfiguration.Host[] | read-only | Contains the registered host configuration |
| `currentState.hostsConfiguration.ipv4Supported` | boolean | read-only | Whether the registry supports IPv4 |
| `currentState.hostsConfiguration.ipv6Supported` | boolean | read-only | Whether the registry supports IPv6 |
| `currentState.hostsConfiguration.multipleIPsSupported` | boolean | read-only | Whether the registry supports multiple IPs |
| `currentState.mainState` | domain.resource.currentState.MainStateEnum | read-only | Main state of your domain — one of `DELETED`, `EXPIRED`, `OK`, `PENDING_CREATE`, `PENDING_DELETE`, `PENDING_INTERNAL_TRANSFER`, `PENDING_OUTGOING_TRANSFER`, `RESTORABLE`, `TO_DELETE` |
| `currentState.name` | string | read-only | Your domain name |
| `currentState.protectionState` | domain.resource.ProtectionStateEnum | read-only | Protection state of your domain — one of `PROTECTED`, `UNPROTECTED` |
| `currentState.suspensionState` | domain.resource.currentState.SuspensionStateEnum | read-only | Suspension state of your domain — one of `NOT_SUSPENDED`, `SUSPENDED` |
| `currentState.transferAuthorizationMethod` | domain.resource.currentState.TransferAuthorizationMethodEnum | read-only | Method used to authorize domain transfer — one of `ASK_OVHCLOUD_SUPPORT`, `AUTH_CODE`, `NONE`, `TRANSFER_TAG` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the domain name resource |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `id` | string | read-only | Unique identifier of the resource. Here, the domain name itself is used as an identifier. |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the domain name resource. A new target specification request will be accepted only in `READY`, `UPDATING` or `ERROR` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | domain.DomainTargetSpec | yes | Latest target specification of the domain name resource |
| `targetSpec.contactsConfiguration` | domain.resource.targetSpec.ContactsConfiguration |  | Provides the configuration for your domain contacts |
| `targetSpec.contactsConfiguration.contactAdministrator` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the administrator contact |
| `targetSpec.contactsConfiguration.contactBilling` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the billing contact |
| `targetSpec.contactsConfiguration.contactOwner` | domain.resource.targetSpec.contactsConfiguration.OwnerConfiguration |  | Indicates the configuration of the owner contact |
| `targetSpec.contactsConfiguration.contactTechnical` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the technical contact |
| `targetSpec.dnsConfiguration` | domain.resource.targetSpec.DnsConfiguration |  | Provides the DNS configuration for your domain |
| `targetSpec.dnsConfiguration.nameServers` | domain.resource.targetSpec.dnsConfiguration.NameServer[] |  | The name servers to update |
| `targetSpec.dnssecConfiguration` | domain.resource.targetSpec.DnssecConfiguration |  | Provides the DNSSEC configuration for your domain |
| `targetSpec.dnssecConfiguration.dsData` | domain.resource.targetSpec.dnssecConfiguration.DsData[] |  | Contains the DS data to update |
| `targetSpec.hostsConfiguration` | domain.resource.targetSpec.HostsConfiguration |  | Provides the host configuration for your domain |
| `targetSpec.hostsConfiguration.hosts` | domain.resource.targetSpec.hostsConfiguration.Host[] |  | The hosts you update |
| `targetSpec.protectionState` | domain.resource.ProtectionStateEnum |  | Indicates the protection state of your domain — one of `PROTECTED`, `UNPROTECTED` |

```json
{
  "checksum": "string",
  "currentState": {
    "additionalStates": [
      "DGCCRF_ABUSE"
    ],
    "authInfoManagedByOVHcloud": true,
    "authInfoSupported": true,
    "contactsConfiguration": {
      "contactAdministrator": {
        "disclosurePolicy": {
          "disclosedFields": [
            "ADDRESS"
          ],
          "disclosureConfiguration": "DISCLOSED",
          "forcedDisclosureConfiguration": true,
          "visibleViaRdds": true
        },
        "id": "string"
      },
      "contactBilling": {
        "disclosurePolicy": {
          "disclosedFields": [
            "ADDRESS"
          ],
          "disclosureConfiguration": "DISCLOSED",
          "forcedDisclosureConfiguration": true,
          "visibleViaRdds": true
        },
        "id": "string"
      },
      "contactOwner": {
        "disclosurePolicy": {
          "disclosedFields": [
            "ADDRESS"
          ],
          "disclosureConfiguration": "DISCLOSED",
          "forcedDisclosureConfiguration": true,
          "visibleViaRdds": true
        },
        "id": "string"
      },
      "contactTechnical": {
        "disclosurePolicy": {
          "disclosedFields": [
            "ADDRESS"
          ],
          "disclosureConfiguration": "DISCLOSED",
          "forcedDisclosureConfiguration": true,
          "visibleViaRdds": true
        },
        "id": "string"
      }
    },
    "createdAt": "2024-01-01T12:00:00Z",
    "designatedAgentAllowed": true,
    "dnsConfiguration": {
      "configurationType": "ANYCAST",
      "dnssecSupported": true,
  …
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/domain/name/{domainName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/domain/name/{domainName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/domain/name/{domainName}");

print_r($result);
?>
```

## Update an existing domain name by modifying various configurations through the targetSpec

`PUT /v2/domain/name/{domainName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#put-domain-name-domainname

**Status:** Beta version  
**IAM actions:** `domain:apiovh:name/edit`, `domain:apiovh:name/setProtection`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |

### Request body (required)

Type: `domain.Domain`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string |  | Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. |
| `currentState` | domain.DomainCurrentState | read-only | Current state of the domain name |
| `currentState.additionalStates` | domain.resource.currentState.AdditionalStatesEnum[] | read-only | Additional states of your domain |
| `currentState.authInfoManagedByOVHcloud` | boolean | read-only | Whether OVHcloud manages your authinfo |
| `currentState.authInfoSupported` | boolean | read-only | Whether the registry uses authinfo to secure your domain name |
| `currentState.contactsConfiguration` | domain.resource.currentState.ContactsConfiguration | read-only | Configuration of your domain contacts |
| `currentState.contactsConfiguration.contactAdministrator` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the administrator contact |
| `currentState.contactsConfiguration.contactBilling` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the billing contact |
| `currentState.contactsConfiguration.contactOwner` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the owner contact |
| `currentState.contactsConfiguration.contactTechnical` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the technical contact |
| `currentState.createdAt` | string (date-time) | read-only | Date when your domain name was created |
| `currentState.designatedAgentAllowed` | boolean | read-only | Whether a Designated Agent may validate the trade operations (change of holder) for this domain |
| `currentState.dnsConfiguration` | domain.resource.currentState.DnsConfiguration | read-only | DNS configuration of your domain |
| `currentState.dnsConfiguration.configurationType` | domain.resource.currentState.dnsConfiguration.NameServerTypeEnum | read-only | Specifies the DNS configuration type for your domain — one of `ANYCAST`, `DEDICATED`, `EMPTY`, `EXTERNAL`, `HOLD`, `HOSTING`, `MIXED`, `PARKING` |
| `currentState.dnsConfiguration.dnssecSupported` | boolean | read-only | Deprecated. Use `dnssecSupported` from dnssecConfiguration node instead. |
| `currentState.dnsConfiguration.glueRecordIPv6Supported` | boolean | read-only | Deprecated. Use `ipv6Supported` from hostsConfiguration instead. |
| `currentState.dnsConfiguration.hostSupported` | boolean | read-only | Deprecated. Use `hostSupported` from hostsConfiguration instead. |
| `currentState.dnsConfiguration.maxDNS` | integer | read-only | Specifies the maximum number of name servers allowed by the registry |
| `currentState.dnsConfiguration.minDNS` | integer | read-only | Specifies the minimum number of name servers allowed by the registry |
| `currentState.dnsConfiguration.multipleIPsSupported` | boolean | read-only | Whether the registry accepts more than one address on a name server, IPv4 and IPv6 counted together: one of each already counts as several |
| `currentState.dnsConfiguration.nameServers` | domain.resource.currentState.dnsConfiguration.NameServer[] | read-only | Lists the name servers used by your domain |
| `currentState.dnssecConfiguration` | domain.resource.currentState.DnssecConfiguration | read-only | DNSSEC configuration of your domain |
| `currentState.dnssecConfiguration.dnssecSupported` | boolean | read-only | Whether the registry supports DNSSEC |
| `currentState.dnssecConfiguration.dsData` | domain.resource.currentState.dnssecConfiguration.DsData[] | read-only | Contains the registered DS data for your domain name |
| `currentState.dnssecConfiguration.supportedAlgorithms` | domain.resource.currentState.dnssecConfiguration.SupportedAlgorithm[] | read-only | Specifies all cryptographic algorithms that you can use to define DS data |
| `currentState.extension` | string | read-only | Extension of your domain name |
| `currentState.hostsConfiguration` | domain.resource.currentState.HostsConfiguration | read-only | Host configuration of your domain |
| `currentState.hostsConfiguration.hostSupported` | boolean | read-only | Whether the registry supports host management |
| `currentState.hostsConfiguration.hosts` | domain.resource.currentState.hostsConfiguration.Host[] | read-only | Contains the registered host configuration |
| `currentState.hostsConfiguration.ipv4Supported` | boolean | read-only | Whether the registry supports IPv4 |
| `currentState.hostsConfiguration.ipv6Supported` | boolean | read-only | Whether the registry supports IPv6 |
| `currentState.hostsConfiguration.multipleIPsSupported` | boolean | read-only | Whether the registry supports multiple IPs |
| `currentState.mainState` | domain.resource.currentState.MainStateEnum | read-only | Main state of your domain — one of `DELETED`, `EXPIRED`, `OK`, `PENDING_CREATE`, `PENDING_DELETE`, `PENDING_INTERNAL_TRANSFER`, `PENDING_OUTGOING_TRANSFER`, `RESTORABLE`, `TO_DELETE` |
| `currentState.name` | string | read-only | Your domain name |
| `currentState.protectionState` | domain.resource.ProtectionStateEnum | read-only | Protection state of your domain — one of `PROTECTED`, `UNPROTECTED` |
| `currentState.suspensionState` | domain.resource.currentState.SuspensionStateEnum | read-only | Suspension state of your domain — one of `NOT_SUSPENDED`, `SUSPENDED` |
| `currentState.transferAuthorizationMethod` | domain.resource.currentState.TransferAuthorizationMethodEnum | read-only | Method used to authorize domain transfer — one of `ASK_OVHCLOUD_SUPPORT`, `AUTH_CODE`, `NONE`, `TRANSFER_TAG` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the domain name resource |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string | read-only | Unique identifier of the resource. Here, the domain name itself is used as an identifier. |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the domain name resource. A new target specification request will be accepted only in `READY`, `UPDATING` or `ERROR` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | domain.DomainTargetSpec | yes | Latest target specification of the domain name resource |
| `targetSpec.contactsConfiguration` | domain.resource.targetSpec.ContactsConfiguration |  | Provides the configuration for your domain contacts |
| `targetSpec.contactsConfiguration.contactAdministrator` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the administrator contact |
| `targetSpec.contactsConfiguration.contactBilling` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the billing contact |
| `targetSpec.contactsConfiguration.contactOwner` | domain.resource.targetSpec.contactsConfiguration.OwnerConfiguration |  | Indicates the configuration of the owner contact |
| `targetSpec.contactsConfiguration.contactTechnical` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the technical contact |
| `targetSpec.dnsConfiguration` | domain.resource.targetSpec.DnsConfiguration |  | Provides the DNS configuration for your domain |
| `targetSpec.dnsConfiguration.nameServers` | domain.resource.targetSpec.dnsConfiguration.NameServer[] |  | The name servers to update |
| `targetSpec.dnssecConfiguration` | domain.resource.targetSpec.DnssecConfiguration |  | Provides the DNSSEC configuration for your domain |
| `targetSpec.dnssecConfiguration.dsData` | domain.resource.targetSpec.dnssecConfiguration.DsData[] |  | Contains the DS data to update |
| `targetSpec.hostsConfiguration` | domain.resource.targetSpec.HostsConfiguration |  | Provides the host configuration for your domain |
| `targetSpec.hostsConfiguration.hosts` | domain.resource.targetSpec.hostsConfiguration.Host[] |  | The hosts you update |
| `targetSpec.protectionState` | domain.resource.ProtectionStateEnum |  | Indicates the protection state of your domain — one of `PROTECTED`, `UNPROTECTED` |

```json
{
  "checksum": "string",
  "targetSpec": {
    "contactsConfiguration": {
      "contactAdministrator": {
        "disclosurePolicy": {
          "disclosureConfiguration": "DISCLOSED"
        }
      },
      "contactBilling": {
        "disclosurePolicy": {
          "disclosureConfiguration": "DISCLOSED"
        }
      },
      "contactOwner": {
        "disclosurePolicy": {
          "disclosureConfiguration": "DISCLOSED"
        },
        "id": "string"
      },
      "contactTechnical": {
        "disclosurePolicy": {
          "disclosureConfiguration": "DISCLOSED"
        }
      }
    },
    "dnsConfiguration": {
      "nameServers": [
        {
          "ips": [
            "192.0.2.0"
          ],
          "ipv4": "192.0.2.0",
          "ipv6": "2001:41d0:1:1994::1",
          "nameServer": "string"
        }
      ]
    },
    "dnssecConfiguration": {
      "dsData": [
        {
          "algorithm": 0,
          "flags": 0,
          "keyTag": 0,
          "publicKey": "string"
        }
      ]
    },
    "hostsConfiguration": {
      "hosts": [
        {
          "host": "string",
          "ips": [
            "192.0.2.0"
          ]
        }
      ]
    },
    "protectionState": "PROTECTED"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.Domain | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string |  | Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. |
| `currentState` | domain.DomainCurrentState | read-only | Current state of the domain name |
| `currentState.additionalStates` | domain.resource.currentState.AdditionalStatesEnum[] | read-only | Additional states of your domain |
| `currentState.authInfoManagedByOVHcloud` | boolean | read-only | Whether OVHcloud manages your authinfo |
| `currentState.authInfoSupported` | boolean | read-only | Whether the registry uses authinfo to secure your domain name |
| `currentState.contactsConfiguration` | domain.resource.currentState.ContactsConfiguration | read-only | Configuration of your domain contacts |
| `currentState.contactsConfiguration.contactAdministrator` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the administrator contact |
| `currentState.contactsConfiguration.contactBilling` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the billing contact |
| `currentState.contactsConfiguration.contactOwner` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the owner contact |
| `currentState.contactsConfiguration.contactTechnical` | domain.resource.currentState.contactsConfiguration.ContactConfiguration | read-only | The configuration of the technical contact |
| `currentState.createdAt` | string (date-time) | read-only | Date when your domain name was created |
| `currentState.designatedAgentAllowed` | boolean | read-only | Whether a Designated Agent may validate the trade operations (change of holder) for this domain |
| `currentState.dnsConfiguration` | domain.resource.currentState.DnsConfiguration | read-only | DNS configuration of your domain |
| `currentState.dnsConfiguration.configurationType` | domain.resource.currentState.dnsConfiguration.NameServerTypeEnum | read-only | Specifies the DNS configuration type for your domain — one of `ANYCAST`, `DEDICATED`, `EMPTY`, `EXTERNAL`, `HOLD`, `HOSTING`, `MIXED`, `PARKING` |
| `currentState.dnsConfiguration.dnssecSupported` | boolean | read-only | Deprecated. Use `dnssecSupported` from dnssecConfiguration node instead. |
| `currentState.dnsConfiguration.glueRecordIPv6Supported` | boolean | read-only | Deprecated. Use `ipv6Supported` from hostsConfiguration instead. |
| `currentState.dnsConfiguration.hostSupported` | boolean | read-only | Deprecated. Use `hostSupported` from hostsConfiguration instead. |
| `currentState.dnsConfiguration.maxDNS` | integer | read-only | Specifies the maximum number of name servers allowed by the registry |
| `currentState.dnsConfiguration.minDNS` | integer | read-only | Specifies the minimum number of name servers allowed by the registry |
| `currentState.dnsConfiguration.multipleIPsSupported` | boolean | read-only | Whether the registry accepts more than one address on a name server, IPv4 and IPv6 counted together: one of each already counts as several |
| `currentState.dnsConfiguration.nameServers` | domain.resource.currentState.dnsConfiguration.NameServer[] | read-only | Lists the name servers used by your domain |
| `currentState.dnssecConfiguration` | domain.resource.currentState.DnssecConfiguration | read-only | DNSSEC configuration of your domain |
| `currentState.dnssecConfiguration.dnssecSupported` | boolean | read-only | Whether the registry supports DNSSEC |
| `currentState.dnssecConfiguration.dsData` | domain.resource.currentState.dnssecConfiguration.DsData[] | read-only | Contains the registered DS data for your domain name |
| `currentState.dnssecConfiguration.supportedAlgorithms` | domain.resource.currentState.dnssecConfiguration.SupportedAlgorithm[] | read-only | Specifies all cryptographic algorithms that you can use to define DS data |
| `currentState.extension` | string | read-only | Extension of your domain name |
| `currentState.hostsConfiguration` | domain.resource.currentState.HostsConfiguration | read-only | Host configuration of your domain |
| `currentState.hostsConfiguration.hostSupported` | boolean | read-only | Whether the registry supports host management |
| `currentState.hostsConfiguration.hosts` | domain.resource.currentState.hostsConfiguration.Host[] | read-only | Contains the registered host configuration |
| `currentState.hostsConfiguration.ipv4Supported` | boolean | read-only | Whether the registry supports IPv4 |
| `currentState.hostsConfiguration.ipv6Supported` | boolean | read-only | Whether the registry supports IPv6 |
| `currentState.hostsConfiguration.multipleIPsSupported` | boolean | read-only | Whether the registry supports multiple IPs |
| `currentState.mainState` | domain.resource.currentState.MainStateEnum | read-only | Main state of your domain — one of `DELETED`, `EXPIRED`, `OK`, `PENDING_CREATE`, `PENDING_DELETE`, `PENDING_INTERNAL_TRANSFER`, `PENDING_OUTGOING_TRANSFER`, `RESTORABLE`, `TO_DELETE` |
| `currentState.name` | string | read-only | Your domain name |
| `currentState.protectionState` | domain.resource.ProtectionStateEnum | read-only | Protection state of your domain — one of `PROTECTED`, `UNPROTECTED` |
| `currentState.suspensionState` | domain.resource.currentState.SuspensionStateEnum | read-only | Suspension state of your domain — one of `NOT_SUSPENDED`, `SUSPENDED` |
| `currentState.transferAuthorizationMethod` | domain.resource.currentState.TransferAuthorizationMethodEnum | read-only | Method used to authorize domain transfer — one of `ASK_OVHCLOUD_SUPPORT`, `AUTH_CODE`, `NONE`, `TRANSFER_TAG` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the domain name resource |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string | read-only | Unique identifier of the resource. Here, the domain name itself is used as an identifier. |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the domain name resource. A new target specification request will be accepted only in `READY`, `UPDATING` or `ERROR` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | domain.DomainTargetSpec | yes | Latest target specification of the domain name resource |
| `targetSpec.contactsConfiguration` | domain.resource.targetSpec.ContactsConfiguration |  | Provides the configuration for your domain contacts |
| `targetSpec.contactsConfiguration.contactAdministrator` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the administrator contact |
| `targetSpec.contactsConfiguration.contactBilling` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the billing contact |
| `targetSpec.contactsConfiguration.contactOwner` | domain.resource.targetSpec.contactsConfiguration.OwnerConfiguration |  | Indicates the configuration of the owner contact |
| `targetSpec.contactsConfiguration.contactTechnical` | domain.resource.targetSpec.contactsConfiguration.ContactConfiguration |  | Indicates the configuration of the technical contact |
| `targetSpec.dnsConfiguration` | domain.resource.targetSpec.DnsConfiguration |  | Provides the DNS configuration for your domain |
| `targetSpec.dnsConfiguration.nameServers` | domain.resource.targetSpec.dnsConfiguration.NameServer[] |  | The name servers to update |
| `targetSpec.dnssecConfiguration` | domain.resource.targetSpec.DnssecConfiguration |  | Provides the DNSSEC configuration for your domain |
| `targetSpec.dnssecConfiguration.dsData` | domain.resource.targetSpec.dnssecConfiguration.DsData[] |  | Contains the DS data to update |
| `targetSpec.hostsConfiguration` | domain.resource.targetSpec.HostsConfiguration |  | Provides the host configuration for your domain |
| `targetSpec.hostsConfiguration.hosts` | domain.resource.targetSpec.hostsConfiguration.Host[] |  | The hosts you update |
| `targetSpec.protectionState` | domain.resource.ProtectionStateEnum |  | Indicates the protection state of your domain — one of `PROTECTED`, `UNPROTECTED` |

```json
{
  "checksum": "string",
  "currentState": {
    "additionalStates": [
      "DGCCRF_ABUSE"
    ],
    "authInfoManagedByOVHcloud": true,
    "authInfoSupported": true,
    "contactsConfiguration": {
      "contactAdministrator": {
        "disclosurePolicy": {
          "disclosedFields": [
            "ADDRESS"
          ],
          "disclosureConfiguration": "DISCLOSED",
          "forcedDisclosureConfiguration": true,
          "visibleViaRdds": true
        },
        "id": "string"
      },
      "contactBilling": {
        "disclosurePolicy": {
          "disclosedFields": [
            "ADDRESS"
          ],
          "disclosureConfiguration": "DISCLOSED",
          "forcedDisclosureConfiguration": true,
          "visibleViaRdds": true
        },
        "id": "string"
      },
      "contactOwner": {
        "disclosurePolicy": {
          "disclosedFields": [
            "ADDRESS"
          ],
          "disclosureConfiguration": "DISCLOSED",
          "forcedDisclosureConfiguration": true,
          "visibleViaRdds": true
        },
        "id": "string"
      },
      "contactTechnical": {
        "disclosurePolicy": {
          "disclosedFields": [
            "ADDRESS"
          ],
          "disclosureConfiguration": "DISCLOSED",
          "forcedDisclosureConfiguration": true,
          "visibleViaRdds": true
        },
        "id": "string"
      }
    },
    "createdAt": "2024-01-01T12:00:00Z",
    "designatedAgentAllowed": true,
    "dnsConfiguration": {
      "configurationType": "ANYCAST",
      "dnssecSupported": true,
  …
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/domain/name/{domainName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.Domain
result = client.put("/v2/domain/name/{domainName}",
	checksum = None, # Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. (type: string)
	targetSpec = None, # Latest target specification of the domain name resource (type: domain.DomainTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.Domain
$result = $ovh->put("/v2/domain/name/{domainName}", array(
	checksum => null, // Computed hash used to control concurrent modification requests. Here, it represents the current target specification value. (type: string)
	targetSpec => null, // Latest target specification of the domain name resource (type: domain.DomainTargetSpec)
));

print_r($result);
?>
```

## Get the list of managed domain names

`GET /1.0/domain`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#getDomains

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `iamTags` | query | object |  | Filter resources on IAM tags |
| `whoisOwner` | query | string |  | Filter domain names by owner ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain");

print_r($result);
?>
```

## Get domain name information

`GET /1.0/domain/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#getDomain

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.DomainServiceWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactAdmin` | domain.ContactSummary | read-only | Administrative contact data |
| `contactAdmin.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `contactBilling` | domain.ContactSummary | read-only | Billing contact data |
| `contactBilling.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `contactOwner` | domain.ContactSummary | read-only | Owner (registrant) contact data |
| `contactOwner.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `contactTech` | domain.ContactSummary | read-only | Technical contact data |
| `contactTech.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `dnssecState` | domain.DnssecStateEnum | read-only | Current DNSSEC state of the domain name — one of `disabled`, `enabled`, `not_supported` |
| `dnssecSupported` | boolean | read-only | Whether DNSSEC is activated for this domain name |
| `domain` | string | read-only | Domain name |
| `expirationDate` | string (date-time) | read-only | Date when the domain name will expire, if not renewed |
| `glueRecordIpv6Supported` | boolean | read-only | Whether the registry supports IPv6 glue records |
| `glueRecordMultiIpSupported` | boolean | read-only | Whether the registry supports multi-ip glue records |
| `hostSupported` | boolean | read-only | Whether the registry supports hosts as independent entities |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `nameServerType` | domain.nameServer.NameServerTypeEnum |  | Name servers type — one of `anycast`, `dedicated`, `empty`, `external`, `hold`, `hosted`, `hosting`, `mixed`, `parking` |
| `nameServers` | domain.nameServer.NameServer[] | read-only | Name servers list |
| `nameServers[].id` | integer | read-only | ID of the name server |
| `nameServers[].ipv4` | ipv4 | read-only | IPv4 adress of the name server |
| `nameServers[].ipv6` | ipv6 | read-only | IPv6 adress of the name server |
| `nameServers[].nameServer` | string | read-only | Name of the name server |
| `nameServers[].nameServerType` | domain.nameServer.NameServerTypeEnum | read-only | Type of the name server — one of `anycast`, `dedicated`, `empty`, `external`, `hold`, `hosted`, `hosting`, `mixed`, `parking` |
| `offer` | domain.OfferEnum | read-only | Offer associated with the domain name — one of `diamond`, `gold`, `platinum` |
| `owoSupported` | boolean | read-only | Whether Whois data obfuscation is supported for this domain name |
| `parentService` | domain.ParentService | read-only | Parent service |
| `parentService.name` | string | read-only | Name of the parent service |
| `parentService.type` | domain.ParentServiceTypeEnum | read-only | Type of the parent service — one of `/allDom` |
| `renewalDate` | string (date-time) | read-only | Date when the domain name should be renewed (relevant if renewalState is automatic_renew) |
| `renewalState` | domain.RenewalStateEnum | read-only | Current renewal state of the domain name — one of `automatic_renew`, `cancellation_complete`, `cancellation_requested`, `manual_renew`, `unpaid` |
| `serviceId` | integer | read-only | Technical service identifier |
| `state` | domain.DomainStateEnum | read-only | Current state of the domain name — one of `autorenew_in_progress`, `autorenew_registry_in_progress`, `deleted`, `dispute`, `expired`, `ok`, `outgoing_transfer`, `pending_create`, `pending_delete`, `pending_incoming_transfer`, `pending_installation`, `registry_suspended`, … |
| `suspensionState` | domain.SuspensionStateEnum | read-only | Current suspension state of the domain name — one of `not_suspended`, `suspended` |
| `transferLockStatus` | domain.LockStatusEnum |  | Current transfer lock status of the domain name — one of `locked`, `locking`, `unavailable`, `unlocked`, `unlocking` |
| `whoisOwner` | string | read-only | Owner (registrant) contact ID (contact data can be edited via /me/contact/<ID>) |

```json
{
  "contactAdmin": {
    "id": "string"
  },
  "contactBilling": {
    "id": "string"
  },
  "contactOwner": {
    "id": "string"
  },
  "contactTech": {
    "id": "string"
  },
  "dnssecState": "disabled",
  "dnssecSupported": true,
  "domain": "string",
  "expirationDate": "2024-01-01T12:00:00Z",
  "glueRecordIpv6Supported": true,
  "glueRecordMultiIpSupported": true,
  "hostSupported": true,
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "lastUpdate": "2024-01-01T12:00:00Z",
  "nameServerType": "anycast",
  "nameServers": [
    {
      "id": 0,
      "ipv4": "192.0.2.0",
      "ipv6": "2001:41d0:1:1994::1",
      "nameServer": "string",
      "nameServerType": "anycast"
    }
  ],
  "offer": "diamond",
  "owoSupported": true,
  "parentService": {
    "name": "string",
    "type": "/allDom"
  },
  "renewalDate": "2024-01-01T12:00:00Z",
  "renewalState": "automatic_renew",
  "serviceId": 0,
  "state": "autorenew_in_progress",
  "suspensionState": "not_suspended",
  "transferLockStatus": "locked",
  "whoisOwner": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}");

print_r($result);
?>
```

## Edit domain name properties

`PUT /1.0/domain/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#editDomain

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:edit`, `domain:apiovh:name/setProtection`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `domain.DomainService`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactAdmin` | domain.ContactSummary | read-only | Administrative contact data |
| `contactAdmin.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `contactBilling` | domain.ContactSummary | read-only | Billing contact data |
| `contactBilling.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `contactOwner` | domain.ContactSummary | read-only | Owner (registrant) contact data |
| `contactOwner.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `contactTech` | domain.ContactSummary | read-only | Technical contact data |
| `contactTech.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `dnssecState` | domain.DnssecStateEnum | read-only | Current DNSSEC state of the domain name — one of `disabled`, `enabled`, `not_supported` |
| `dnssecSupported` | boolean | read-only | Whether DNSSEC is activated for this domain name |
| `domain` | string | read-only | Domain name |
| `expirationDate` | string (date-time) | read-only | Date when the domain name will expire, if not renewed |
| `glueRecordIpv6Supported` | boolean | read-only | Whether the registry supports IPv6 glue records |
| `glueRecordMultiIpSupported` | boolean | read-only | Whether the registry supports multi-ip glue records |
| `hostSupported` | boolean | read-only | Whether the registry supports hosts as independent entities |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `nameServerType` | domain.nameServer.NameServerTypeEnum |  | Name servers type — one of `anycast`, `dedicated`, `empty`, `external`, `hold`, `hosted`, `hosting`, `mixed`, `parking` |
| `nameServers` | domain.nameServer.NameServer[] | read-only | Name servers list |
| `nameServers[].id` | integer | read-only | ID of the name server |
| `nameServers[].ipv4` | ipv4 | read-only | IPv4 adress of the name server |
| `nameServers[].ipv6` | ipv6 | read-only | IPv6 adress of the name server |
| `nameServers[].nameServer` | string | read-only | Name of the name server |
| `nameServers[].nameServerType` | domain.nameServer.NameServerTypeEnum | read-only | Type of the name server — one of `anycast`, `dedicated`, `empty`, `external`, `hold`, `hosted`, `hosting`, `mixed`, `parking` |
| `offer` | domain.OfferEnum | read-only | Offer associated with the domain name — one of `diamond`, `gold`, `platinum` |
| `owoSupported` | boolean | read-only | Whether Whois data obfuscation is supported for this domain name |
| `parentService` | domain.ParentService | read-only | Parent service |
| `parentService.name` | string | read-only | Name of the parent service |
| `parentService.type` | domain.ParentServiceTypeEnum | read-only | Type of the parent service — one of `/allDom` |
| `renewalDate` | string (date-time) | read-only | Date when the domain name should be renewed (relevant if renewalState is automatic_renew) |
| `renewalState` | domain.RenewalStateEnum | read-only | Current renewal state of the domain name — one of `automatic_renew`, `cancellation_complete`, `cancellation_requested`, `manual_renew`, `unpaid` |
| `serviceId` | integer | read-only | Technical service identifier |
| `state` | domain.DomainStateEnum | read-only | Current state of the domain name — one of `autorenew_in_progress`, `autorenew_registry_in_progress`, `deleted`, `dispute`, `expired`, `ok`, `outgoing_transfer`, `pending_create`, `pending_delete`, `pending_incoming_transfer`, `pending_installation`, `registry_suspended`, … |
| `suspensionState` | domain.SuspensionStateEnum | read-only | Current suspension state of the domain name — one of `not_suspended`, `suspended` |
| `transferLockStatus` | domain.LockStatusEnum |  | Current transfer lock status of the domain name — one of `locked`, `locking`, `unavailable`, `unlocked`, `unlocking` |
| `whoisOwner` | string | read-only | Owner (registrant) contact ID (contact data can be edited via /me/contact/<ID>) |

```json
{
  "nameServerType": "anycast",
  "transferLockStatus": "locked"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.DomainService | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactAdmin` | domain.ContactSummary | read-only | Administrative contact data |
| `contactAdmin.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `contactBilling` | domain.ContactSummary | read-only | Billing contact data |
| `contactBilling.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `contactOwner` | domain.ContactSummary | read-only | Owner (registrant) contact data |
| `contactOwner.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `contactTech` | domain.ContactSummary | read-only | Technical contact data |
| `contactTech.id` | string | read-only | Unique contact identifier (contact data can be edited via /me/contact/<ID>) |
| `dnssecState` | domain.DnssecStateEnum | read-only | Current DNSSEC state of the domain name — one of `disabled`, `enabled`, `not_supported` |
| `dnssecSupported` | boolean | read-only | Whether DNSSEC is activated for this domain name |
| `domain` | string | read-only | Domain name |
| `expirationDate` | string (date-time) | read-only | Date when the domain name will expire, if not renewed |
| `glueRecordIpv6Supported` | boolean | read-only | Whether the registry supports IPv6 glue records |
| `glueRecordMultiIpSupported` | boolean | read-only | Whether the registry supports multi-ip glue records |
| `hostSupported` | boolean | read-only | Whether the registry supports hosts as independent entities |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `nameServerType` | domain.nameServer.NameServerTypeEnum |  | Name servers type — one of `anycast`, `dedicated`, `empty`, `external`, `hold`, `hosted`, `hosting`, `mixed`, `parking` |
| `nameServers` | domain.nameServer.NameServer[] | read-only | Name servers list |
| `nameServers[].id` | integer | read-only | ID of the name server |
| `nameServers[].ipv4` | ipv4 | read-only | IPv4 adress of the name server |
| `nameServers[].ipv6` | ipv6 | read-only | IPv6 adress of the name server |
| `nameServers[].nameServer` | string | read-only | Name of the name server |
| `nameServers[].nameServerType` | domain.nameServer.NameServerTypeEnum | read-only | Type of the name server — one of `anycast`, `dedicated`, `empty`, `external`, `hold`, `hosted`, `hosting`, `mixed`, `parking` |
| `offer` | domain.OfferEnum | read-only | Offer associated with the domain name — one of `diamond`, `gold`, `platinum` |
| `owoSupported` | boolean | read-only | Whether Whois data obfuscation is supported for this domain name |
| `parentService` | domain.ParentService | read-only | Parent service |
| `parentService.name` | string | read-only | Name of the parent service |
| `parentService.type` | domain.ParentServiceTypeEnum | read-only | Type of the parent service — one of `/allDom` |
| `renewalDate` | string (date-time) | read-only | Date when the domain name should be renewed (relevant if renewalState is automatic_renew) |
| `renewalState` | domain.RenewalStateEnum | read-only | Current renewal state of the domain name — one of `automatic_renew`, `cancellation_complete`, `cancellation_requested`, `manual_renew`, `unpaid` |
| `serviceId` | integer | read-only | Technical service identifier |
| `state` | domain.DomainStateEnum | read-only | Current state of the domain name — one of `autorenew_in_progress`, `autorenew_registry_in_progress`, `deleted`, `dispute`, `expired`, `ok`, `outgoing_transfer`, `pending_create`, `pending_delete`, `pending_incoming_transfer`, `pending_installation`, `registry_suspended`, … |
| `suspensionState` | domain.SuspensionStateEnum | read-only | Current suspension state of the domain name — one of `not_suspended`, `suspended` |
| `transferLockStatus` | domain.LockStatusEnum |  | Current transfer lock status of the domain name — one of `locked`, `locking`, `unavailable`, `unlocked`, `unlocking` |
| `whoisOwner` | string | read-only | Owner (registrant) contact ID (contact data can be edited via /me/contact/<ID>) |

```json
{
  "contactAdmin": {
    "id": "string"
  },
  "contactBilling": {
    "id": "string"
  },
  "contactOwner": {
    "id": "string"
  },
  "contactTech": {
    "id": "string"
  },
  "dnssecState": "disabled",
  "dnssecSupported": true,
  "domain": "string",
  "expirationDate": "2024-01-01T12:00:00Z",
  "glueRecordIpv6Supported": true,
  "glueRecordMultiIpSupported": true,
  "hostSupported": true,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "nameServerType": "anycast",
  "nameServers": [
    {
      "id": 0,
      "ipv4": "192.0.2.0",
      "ipv6": "2001:41d0:1:1994::1",
      "nameServer": "string",
      "nameServerType": "anycast"
    }
  ],
  "offer": "diamond",
  "owoSupported": true,
  "parentService": {
    "name": "string",
    "type": "/allDom"
  },
  "renewalDate": "2024-01-01T12:00:00Z",
  "renewalState": "automatic_renew",
  "serviceId": 0,
  "state": "autorenew_in_progress",
  "suspensionState": "not_suspended",
  "transferLockStatus": "locked",
  "whoisOwner": "string"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.DomainService
result = client.put("/domain/{serviceName}",
	nameServerType = None, # Name servers type (type: domain.nameServer.NameServerTypeEnum)
	transferLockStatus = None, # Current transfer lock status of the domain name (type: domain.LockStatusEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.DomainService
$result = $ovh->put("/domain/{serviceName}", array(
	nameServerType => null, // Name servers type (type: domain.nameServer.NameServerTypeEnum)
	transferLockStatus => null, // Current transfer lock status of the domain name (type: domain.LockStatusEnum)
));

print_r($result);
?>
```

## Get service information

`GET /1.0/domain/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-serviceinfos

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:serviceInfos/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | services.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "canDeleteAtExpiration": true,
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string",
  "creation": "2024-01-01",
  "domain": "string",
  "engagedUpTo": "2024-01-01",
  "expiration": "2024-01-01",
  "possibleRenewPeriod": [
    0
  ],
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  },
  "renewalType": "automaticForcedProduct",
  "serviceId": 0,
  "status": "autorenewInProgress"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/serviceInfos" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/serviceInfos")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/domain/{serviceName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#put-domain-servicename-serviceinfos

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:serviceInfos/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `services.Service`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/serviceInfos" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: services.Service
result = client.put("/domain/{serviceName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: services.Service
$result = $ovh->put("/domain/{serviceName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## List of current name servers

`GET /1.0/domain/{serviceName}/nameServer`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-nameserver

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:nameServer/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/nameServer" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/nameServer")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/nameServer");

print_r($result);
?>
```

## Get this name server configuration

`GET /1.0/domain/{serviceName}/nameServer/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-nameserver-id

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:nameServer/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.nameServer.FullNameServer | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `host` | string | read-only | Host of the name server |
| `id` | integer | read-only | ID of the name server |
| `ip` | ip | read-only | IP address of the name server |
| `isUsed` | boolean | read-only | isUsed flag of the name server |
| `toDelete` | boolean | read-only | toDelete flag of the name server |

```json
{
  "host": "string",
  "id": 0,
  "ip": "192.0.2.0",
  "isUsed": true,
  "toDelete": true
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/nameServer/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/nameServer/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/nameServer/{id}");

print_r($result);
?>
```

## Add new name server

`POST /1.0/domain/{serviceName}/nameServer`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-servicename-nameserver

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:nameServer/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `domain.nameServer.CreatePayload`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `nameServer` | domain.nameServer.NameServerInput[] | yes | Name servers to create |
| `nameServer[].host` | string |  | Host |
| `nameServer[].ip` | ip |  | IP address |

```json
{
  "nameServer": [
    {
      "host": "string",
      "ip": "192.0.2.0"
    }
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `domain` | string | read-only | Domain of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |
| `type` | domain.OperationTypeEnum | read-only | type of the task — one of `alldom`, `domain` |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "domain": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "type": "alldom"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/nameServer" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.nameServer.CreatePayload
result = client.post("/domain/{serviceName}/nameServer",
	nameServer = None, # Name servers to create (type: array)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.nameServer.CreatePayload
$result = $ovh->post("/domain/{serviceName}/nameServer", array(
	nameServer => null, // Name servers to create (type: array)
));

print_r($result);
?>
```

## Delete a name server

`DELETE /1.0/domain/{serviceName}/nameServer/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#delete-domain-servicename-nameserver-id

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:nameServer/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `domain` | string | read-only | Domain of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |
| `type` | domain.OperationTypeEnum | read-only | type of the task — one of `alldom`, `domain` |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "domain": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "type": "alldom"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/nameServer/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/domain/{serviceName}/nameServer/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/domain/{serviceName}/nameServer/{id}");

print_r($result);
?>
```

## Get name server status

`GET /1.0/domain/{serviceName}/nameServer/{id}/status`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-nameserver-id-status

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:nameServer/status/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.nameServer.NameServerStatus | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `state` | domain.nameServer.NameServerStateEnum | read-only | Whether or not the DNS server is working — one of `ko`, `ok` |
| `type` | domain.nameServer.NameServerTypeEnum | read-only | Whether or not the DNS server is managed by OVHcloud — one of `anycast`, `dedicated`, `empty`, `external`, `hold`, `hosted`, `hosting`, `mixed`, `parking` |
| `usedSince` | string (date-time) | read-only | Date from which the DNS server is used by the domain |

```json
{
  "state": "ko",
  "type": "anycast",
  "usedSince": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/nameServer/{id}/status" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/nameServer/{id}/status")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/nameServer/{id}/status");

print_r($result);
?>
```

## Update DNS servers

`POST /1.0/domain/{serviceName}/nameServers/update`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-servicename-nameservers-update

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:nameServer/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `domain.nameServer.UpdatePayload`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `nameServers` | domain.nameServer.NameServerInput[] | yes | Name servers to update |
| `nameServers[].host` | string |  | Host |
| `nameServers[].ip` | ip |  | IP address |

```json
{
  "nameServers": [
    {
      "host": "string",
      "ip": "192.0.2.0"
    }
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `domain` | string | read-only | Domain of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |
| `type` | domain.OperationTypeEnum | read-only | type of the task — one of `alldom`, `domain` |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "domain": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "type": "alldom"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/nameServers/update" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.nameServer.UpdatePayload
result = client.post("/domain/{serviceName}/nameServers/update",
	nameServers = None, # Name servers to update (type: array)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.nameServer.UpdatePayload
$result = $ovh->post("/domain/{serviceName}/nameServers/update", array(
	nameServers => null, // Name servers to update (type: array)
));

print_r($result);
?>
```

## List of domain's DS Records

`GET /1.0/domain/{serviceName}/dsRecord`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-dsrecord

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:dsRecord/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `flags` | query | dnssec.KeyFlagEnum |  | Filter the value of flags property (=) — one of `256`, `257` |
| `serviceName` | path | string | yes | Service name |
| `status` | query | dnssec.KeyStatusEnum |  | Filter the value of status property (=) — one of `active`, `generated`, `published`, `removed`, `retired`, `revoked` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/dsRecord" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/dsRecord")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/dsRecord");

print_r($result);
?>
```

## Get details on this DS Record

`GET /1.0/domain/{serviceName}/dsRecord/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-dsrecord-id

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:dsRecord/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dnssec.Key | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `algorithm` | dnssec.KeyAlgorithmEnum |  | Algorithm number of the DNSSEC key — one of `3`, `5`, `6`, `7`, `8`, `10`, `12`, `13`, `14`, `15`, `16` |
| `flags` | dnssec.KeyFlagEnum |  | Flag of the DNSSEC key — one of `256`, `257` |
| `id` | integer | read-only | ID of the DNSSEC key |
| `publicKey` | string |  | Public key |
| `status` | dnssec.KeyStatusEnum | read-only | Key status of the DNSSEC key — one of `active`, `generated`, `published`, `removed`, `retired`, `revoked` |
| `tag` | integer |  | Tag of the DNSSEC key |

```json
{
  "algorithm": 3,
  "flags": 256,
  "id": 0,
  "publicKey": "string",
  "status": "active",
  "tag": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/dsRecord/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/dsRecord/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/dsRecord/{id}");

print_r($result);
?>
```

## Update DS records

`POST /1.0/domain/{serviceName}/dsRecord`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-servicename-dsrecord

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:dsRecord/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `dnssec.UpdatePayload`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `keys` | dnssec.Key[] | yes | New Keys |
| `keys[].algorithm` | dnssec.KeyAlgorithmEnum |  | Algorithm number of the DNSSEC key — one of `3`, `5`, `6`, `7`, `8`, `10`, `12`, `13`, `14`, `15`, `16` |
| `keys[].flags` | dnssec.KeyFlagEnum |  | Flag of the DNSSEC key — one of `256`, `257` |
| `keys[].id` | integer | read-only | ID of the DNSSEC key |
| `keys[].publicKey` | string |  | Public key |
| `keys[].status` | dnssec.KeyStatusEnum | read-only | Key status of the DNSSEC key — one of `active`, `generated`, `published`, `removed`, `retired`, `revoked` |
| `keys[].tag` | integer |  | Tag of the DNSSEC key |

```json
{
  "keys": [
    {
      "algorithm": 3,
      "flags": 256,
      "publicKey": "string",
      "tag": 0
    }
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `domain` | string | read-only | Domain of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |
| `type` | domain.OperationTypeEnum | read-only | type of the task — one of `alldom`, `domain` |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "domain": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "type": "alldom"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/dsRecord" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: dnssec.UpdatePayload
result = client.post("/domain/{serviceName}/dsRecord",
	keys = None, # New Keys (type: array)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: dnssec.UpdatePayload
$result = $ovh->post("/domain/{serviceName}/dsRecord", array(
	keys => null, // New Keys (type: array)
));

print_r($result);
?>
```

## List of glue records

`GET /1.0/domain/{serviceName}/glueRecord`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-gluerecord

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:glueRecord/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `host` | query | string |  | Filter the value of host property |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/glueRecord" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/glueRecord")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/glueRecord");

print_r($result);
?>
```

## Get this glue record

`GET /1.0/domain/{serviceName}/glueRecord/{host}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-gluerecord-host

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:glueRecord/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `host` | path | string | yes | Host |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.glueRecord.GlueRecord | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `host` | string | read-only | Host of the glue record |
| `ips` | ip[] | yes | IP address |

```json
{
  "host": "string",
  "ips": [
    "192.0.2.0"
  ]
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/glueRecord/{host}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/glueRecord/{host}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/glueRecord/{host}");

print_r($result);
?>
```

## Create a glue record

`POST /1.0/domain/{serviceName}/glueRecord`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-servicename-gluerecord

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:glueRecord/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `domain.glueRecord.CreatePayload`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `host` | string | yes | Host of the glue record |
| `ips` | ip[] | yes | IP addresses of the glue record |

```json
{
  "host": "string",
  "ips": [
    "192.0.2.0"
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `domain` | string | read-only | Domain of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |
| `type` | domain.OperationTypeEnum | read-only | type of the task — one of `alldom`, `domain` |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "domain": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "type": "alldom"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/glueRecord" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.glueRecord.CreatePayload
result = client.post("/domain/{serviceName}/glueRecord",
	host = None, # Host of the glue record (type: string)
	ips = None, # IP addresses of the glue record (type: array)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.glueRecord.CreatePayload
$result = $ovh->post("/domain/{serviceName}/glueRecord", array(
	host => null, // Host of the glue record (type: string)
	ips => null, // IP addresses of the glue record (type: array)
));

print_r($result);
?>
```

## Delete the glue record

`DELETE /1.0/domain/{serviceName}/glueRecord/{host}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#delete-domain-servicename-gluerecord-host

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:glueRecord/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `host` | path | string | yes | Host |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `domain` | string | read-only | Domain of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |
| `type` | domain.OperationTypeEnum | read-only | type of the task — one of `alldom`, `domain` |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "domain": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "type": "alldom"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/glueRecord/{host}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/domain/{serviceName}/glueRecord/{host}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/domain/{serviceName}/glueRecord/{host}");

print_r($result);
?>
```

## Update the glue record

`POST /1.0/domain/{serviceName}/glueRecord/{host}/update`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-servicename-gluerecord-host-update

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:glueRecord/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `host` | path | string | yes | Host |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `domain.glueRecord.GlueRecord`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `host` | string | read-only | Host of the glue record |
| `ips` | ip[] | yes | IP address |

```json
{
  "ips": [
    "192.0.2.0"
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `domain` | string | read-only | Domain of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |
| `type` | domain.OperationTypeEnum | read-only | type of the task — one of `alldom`, `domain` |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "domain": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "type": "alldom"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/glueRecord/{host}/update" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.glueRecord.GlueRecord
result = client.post("/domain/{serviceName}/glueRecord/{host}/update",
	ips = None, # IP address (type: array)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.glueRecord.GlueRecord
$result = $ovh->post("/domain/{serviceName}/glueRecord/{host}/update", array(
	ips => null, // IP address (type: array)
));

print_r($result);
?>
```

## List domain options

`GET /1.0/domain/{serviceName}/option`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-option

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:option/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.DomainOptionEnum[] | successful operation |

```json
[
  "dnsAnycast"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/option" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/option")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/option");

print_r($result);
?>
```

## Get details on this domain option

`GET /1.0/domain/{serviceName}/option/{option}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-option-option

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:option/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `option` | path | domain.DomainOptionEnum | yes | Option — one of `dnsAnycast` |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.Option | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expirationDate` | string (date-time) | read-only | Expiration date of the option |
| `option` | domain.DomainOptionEnum | read-only | The option name — one of `dnsAnycast` |
| `state` | domain.DomainOptionStateEnum | read-only | The state of the option — one of `released`, `subscribed` |

```json
{
  "expirationDate": "2024-01-01T12:00:00Z",
  "option": "dnsAnycast",
  "state": "released"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/option/{option}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/option/{option}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/option/{option}");

print_r($result);
?>
```

## Remove a given option

`DELETE /1.0/domain/{serviceName}/option/{option}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#delete-domain-servicename-option-option

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:option/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `option` | path | domain.DomainOptionEnum | yes | Option — one of `dnsAnycast` |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/option/{option}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/domain/{serviceName}/option/{option}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/domain/{serviceName}/option/{option}");

print_r($result);
?>
```

## Retrieve data about the options associated to a domain

`GET /1.0/domain/{serviceName}/options`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-servicename-options

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:options/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.ServiceOptions | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hosting` | domain.ServiceOption | read-only | Hosting option |
| `hosting.serviceName` | string | read-only | Service name of the option |
| `offer` | domain.ServiceOption | read-only | Offer option (Diamond, Platinum) |
| `offer.serviceName` | string | read-only | Service name of the option |
| `zone` | domain.ServiceOption | read-only | DNS zone option |
| `zone.serviceName` | string | read-only | Service name of the option |

```json
{
  "hosting": {
    "serviceName": "string"
  },
  "offer": {
    "serviceName": "string"
  },
  "zone": {
    "serviceName": "string"
  }
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/options" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/{serviceName}/options")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/{serviceName}/options");

print_r($result);
?>
```

## List available services

`GET /1.0/allDom`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-alldom

**Status:** Stable production version  
**IAM actions:** `alldom:apiovh:get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `iamTags` | query | object |  | Filter resources on IAM tags |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/allDom" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/allDom")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/allDom");

print_r($result);
?>
```

## Void

`GET /1.0/allDom/{serviceName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-alldom-servicename

**Status:** Stable production version  
**IAM actions:** `alldom:apiovh:get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your allDom |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/allDom/{serviceName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/allDom/{serviceName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/allDom/{serviceName}");

print_r($result);
?>
```

## List available services

`GET /1.0/domain/zone`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `iamTags` | query | object |  | Filter resources on IAM tags |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.ZoneWithIAM | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dnssecSupported` | boolean | read-only | Is DNSSEC supported by this zone |
| `hasDnsAnycast` | boolean | read-only | hasDnsAnycast flag of the DNS zone |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `lastUpdate` | string (date-time) | read-only | Last update date of the DNS zone |
| `name` | string | read-only | Zone name |
| `nameServers` | string[] | read-only | Name servers that host the DNS zone |

```json
{
  "dnssecSupported": true,
  "hasDnsAnycast": true,
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "lastUpdate": "2024-01-01T12:00:00Z",
  "name": "string",
  "nameServers": [
    "string"
  ]
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}");

print_r($result);
?>
```

## Zone capabilities

`GET /1.0/domain/zone/{zoneName}/capabilities`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-capabilities

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:capabilities/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | zone.Capabilities | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dynHost` | boolean |  | True if dynHost available for this zone |

```json
{
  "dynHost": true
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/capabilities" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/capabilities")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/capabilities");

print_r($result);
?>
```

## Change service contacts

`POST /1.0/domain/zone/{zoneName}/changeContact`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-changecontact

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:changeContact`

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contactAdmin` | string |  | The contact to set as admin contact |
| `contactBilling` | string |  | The contact to set as billing contact |
| `contactTech` | string |  | The contact to set as tech contact |

```json
{
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/changeContact" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: coreTypes.AccountId:string
result = client.post("/domain/zone/{zoneName}/changeContact",
	contactAdmin = None, # The contact to set as admin contact (type: coreTypes.AccountId:string, nullable)
	contactBilling = None, # The contact to set as billing contact (type: coreTypes.AccountId:string, nullable)
	contactTech = None, # The contact to set as tech contact (type: coreTypes.AccountId:string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: coreTypes.AccountId:string
$result = $ovh->post("/domain/zone/{zoneName}/changeContact", array(
	contactAdmin => null, // The contact to set as admin contact (type: coreTypes.AccountId:string, nullable)
	contactBilling => null, // The contact to set as billing contact (type: coreTypes.AccountId:string, nullable)
	contactTech => null, // The contact to set as tech contact (type: coreTypes.AccountId:string, nullable)
));

print_r($result);
?>
```

## Confirm service termination

`POST /1.0/domain/zone/{zoneName}/confirmTermination`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-confirmtermination

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:confirmTermination`

Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `commentary` | string |  | Commentary about your termination request |
| `futureUse` | service.TerminationFutureUseEnum |  | What next after your termination request — one of `NOT_REPLACING_SERVICE`, `OTHER`, `SUBSCRIBE_AN_OTHER_SERVICE`, `SUBSCRIBE_OTHER_KIND_OF_SERVICE_WITH_COMPETITOR`, `SUBSCRIBE_SIMILAR_SERVICE_WITH_COMPETITOR` |
| `reason` | service.TerminationReasonEnum |  | Reason of your termination request — one of `FEATURES_DONT_SUIT_ME`, `LACK_OF_PERFORMANCES`, `MIGRATED_TO_ANOTHER_OVH_PRODUCT`, `MIGRATED_TO_COMPETITOR`, `NOT_ENOUGH_RECOGNITION`, `NOT_NEEDED_ANYMORE`, `NOT_RELIABLE`, `NO_ANSWER`, `OTHER`, `PRODUCT_DIMENSION_DONT_SUIT_ME`, `PRODUCT_TOOLS_DONT_SUIT_ME`, `TOO_EXPENSIVE`, … |
| `token` | string | yes | The termination token sent by email to the admin contact |

```json
{
  "commentary": "string",
  "futureUse": "NOT_REPLACING_SERVICE",
  "reason": "FEATURES_DONT_SUIT_ME",
  "token": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string | successful operation |

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/confirmTermination" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/confirmTermination",
	commentary = None, # Commentary about your termination request (type: string, nullable)
	futureUse = None, # What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason = None, # Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token = None, # The termination token sent by email to the admin contact (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/confirmTermination", array(
	commentary => null, // Commentary about your termination request (type: string, nullable)
	futureUse => null, // What next after your termination request (type: service.TerminationFutureUseEnum, nullable)
	reason => null, // Reason of your termination request (type: service.TerminationReasonEnum, nullable)
	token => null, // The termination token sent by email to the admin contact (type: string)
));

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}/dnssec`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-dnssec

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dnssec/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.Dnssec | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | dnssec.DnssecStatusEnum | read-only | Dnssec Status — one of `disableInProgress`, `disabled`, `enableInProgress`, `enabled` |

```json
{
  "status": "disableInProgress"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dnssec" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/dnssec")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/dnssec");

print_r($result);
?>
```

## Enable Dnssec

`POST /1.0/domain/zone/{zoneName}/dnssec`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-dnssec

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dnssec/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dnssec" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/dnssec")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/dnssec");

print_r($result);
?>
```

## Disable Dnssec

`DELETE /1.0/domain/zone/{zoneName}/dnssec`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#delete-domain-zone-zonename-dnssec

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dnssec/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dnssec" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/domain/zone/{zoneName}/dnssec")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/domain/zone/{zoneName}/dnssec");

print_r($result);
?>
```

## DynHost' logins

`GET /1.0/domain/zone/{zoneName}/dynHost/login`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-dynhost-login

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/login/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | query | string |  | Filter the value of login property (like) |
| `subDomain` | query | string |  | Filter the value of subDomain property (like) |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/login" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/dynHost/login")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/dynHost/login");

print_r($result);
?>
```

## Create a new DynHost login

`POST /1.0/domain/zone/{zoneName}/dynHost/login`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-dynhost-login

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/login/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `loginSuffix` | string | yes | Suffix that will be concatenated to the zoneName to create the login |
| `password` | string (password) | yes | Password of the login |
| `subDomain` | string | yes | Subdomain that the login will be allowed to update (use * to allow all) |

```json
{
  "loginSuffix": "string",
  "password": "string",
  "subDomain": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.DynHostLogin | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `login` | string | read-only | Login |
| `subDomain` | string |  | Subdomain that the login will be allowed to update (* to allow all) |
| `zone` | string | read-only | Zone |

```json
{
  "login": "string",
  "subDomain": "string",
  "zone": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/login" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: string
result = client.post("/domain/zone/{zoneName}/dynHost/login",
	loginSuffix = None, # Suffix that will be concatenated to the zoneName to create the login (type: string)
	password = None, # Password of the login (type: password)
	subDomain = None, # Subdomain that the login will be allowed to update (use * to allow all) (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: string
$result = $ovh->post("/domain/zone/{zoneName}/dynHost/login", array(
	loginSuffix => null, // Suffix that will be concatenated to the zoneName to create the login (type: string)
	password => null, // Password of the login (type: password)
	subDomain => null, // Subdomain that the login will be allowed to update (use * to allow all) (type: string)
));

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}/dynHost/login/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-dynhost-login-login

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/login/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | Login |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.DynHostLogin | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `login` | string | read-only | Login |
| `subDomain` | string |  | Subdomain that the login will be allowed to update (* to allow all) |
| `zone` | string | read-only | Zone |

```json
{
  "login": "string",
  "subDomain": "string",
  "zone": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/login/{login}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/dynHost/login/{login}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/dynHost/login/{login}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/domain/zone/{zoneName}/dynHost/login/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#put-domain-zone-zonename-dynhost-login-login

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/login/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | Login |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `domain.zone.DynHostLogin`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `login` | string | read-only | Login |
| `subDomain` | string |  | Subdomain that the login will be allowed to update (* to allow all) |
| `zone` | string | read-only | Zone |

```json
{
  "subDomain": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/login/{login}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.zone.DynHostLogin
result = client.put("/domain/zone/{zoneName}/dynHost/login/{login}",
	subDomain = None, # Subdomain that the login will be allowed to update (* to allow all) (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.zone.DynHostLogin
$result = $ovh->put("/domain/zone/{zoneName}/dynHost/login/{login}", array(
	subDomain => null, // Subdomain that the login will be allowed to update (* to allow all) (type: string)
));

print_r($result);
?>
```

## Delete a DynHost login

`DELETE /1.0/domain/zone/{zoneName}/dynHost/login/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#delete-domain-zone-zonename-dynhost-login-login

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/login/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | Login |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/login/{login}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/domain/zone/{zoneName}/dynHost/login/{login}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/domain/zone/{zoneName}/dynHost/login/{login}");

print_r($result);
?>
```

## Change password of the DynHost login

`POST /1.0/domain/zone/{zoneName}/dynHost/login/{login}/changePassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-dynhost-login-login-changepassword

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/login/changePassword`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | Login |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) | yes | New password of the DynHost login |

```json
{
  "password": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/login/{login}/changePassword" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: password
result = client.post("/domain/zone/{zoneName}/dynHost/login/{login}/changePassword",
	password = None, # New password of the DynHost login (type: password)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: password
$result = $ovh->post("/domain/zone/{zoneName}/dynHost/login/{login}/changePassword", array(
	password => null, // New password of the DynHost login (type: password)
));

print_r($result);
?>
```

## DynHost' records

`GET /1.0/domain/zone/{zoneName}/dynHost/record`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-dynhost-record

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/record/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subDomain` | query | string |  | Filter the value of subDomain property (like) |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/record" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/dynHost/record")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/dynHost/record");

print_r($result);
?>
```

## Create a new DynHost record (Don't forget to refresh the zone)

`POST /1.0/domain/zone/{zoneName}/dynHost/record`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-dynhost-record

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/record/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ip` | ip | yes | Ip address of the DynHost record |
| `subDomain` | string |  | Subdomain of the DynHost record |

```json
{
  "ip": "192.0.2.0",
  "subDomain": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.DynHostRecord | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only | Id of the DynHost record |
| `ip` | ip |  | Ip address of the DynHost record |
| `subDomain` | string |  | Subdomain of the DynHost record |
| `ttl` | integer | read-only | DynHost record ttl |
| `zone` | string | read-only | Zone of the DynHost record |

```json
{
  "id": 0,
  "ip": "192.0.2.0",
  "subDomain": "string",
  "ttl": 0,
  "zone": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/record" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/dynHost/record",
	ip = None, # Ip address of the DynHost record (type: ip)
	subDomain = None, # Subdomain of the DynHost record (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/dynHost/record", array(
	ip => null, // Ip address of the DynHost record (type: ip)
	subDomain => null, // Subdomain of the DynHost record (type: string, nullable)
));

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}/dynHost/record/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-dynhost-record-id

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/record/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.DynHostRecord | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only | Id of the DynHost record |
| `ip` | ip |  | Ip address of the DynHost record |
| `subDomain` | string |  | Subdomain of the DynHost record |
| `ttl` | integer | read-only | DynHost record ttl |
| `zone` | string | read-only | Zone of the DynHost record |

```json
{
  "id": 0,
  "ip": "192.0.2.0",
  "subDomain": "string",
  "ttl": 0,
  "zone": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/record/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/dynHost/record/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/dynHost/record/{id}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/domain/zone/{zoneName}/dynHost/record/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#put-domain-zone-zonename-dynhost-record-id

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/record/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `domain.zone.DynHostRecord`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only | Id of the DynHost record |
| `ip` | ip |  | Ip address of the DynHost record |
| `subDomain` | string |  | Subdomain of the DynHost record |
| `ttl` | integer | read-only | DynHost record ttl |
| `zone` | string | read-only | Zone of the DynHost record |

```json
{
  "ip": "192.0.2.0",
  "subDomain": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/record/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.zone.DynHostRecord
result = client.put("/domain/zone/{zoneName}/dynHost/record/{id}",
	ip = None, # Ip address of the DynHost record (type: ip)
	subDomain = None, # Subdomain of the DynHost record (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.zone.DynHostRecord
$result = $ovh->put("/domain/zone/{zoneName}/dynHost/record/{id}", array(
	ip => null, // Ip address of the DynHost record (type: ip)
	subDomain => null, // Subdomain of the DynHost record (type: string, nullable)
));

print_r($result);
?>
```

## Delete a DynHost record (Don't forget to refresh the zone)

`DELETE /1.0/domain/zone/{zoneName}/dynHost/record/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#delete-domain-zone-zonename-dynhost-record-id

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:dynHost/record/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/dynHost/record/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/domain/zone/{zoneName}/dynHost/record/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/domain/zone/{zoneName}/dynHost/record/{id}");

print_r($result);
?>
```

## Export zone

`GET /1.0/domain/zone/{zoneName}/export`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-export

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:export/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string | successful operation |

```json
"string"
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/export" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/export")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/export");

print_r($result);
?>
```

## Zone restore points

`GET /1.0/domain/zone/{zoneName}/history`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-history

**Status:** Beta version  
**IAM actions:** `dnsZone:apiovh:history/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `creationDate.from` | query | string (date-time) |  | Filter the value of creationDate property (>=) |
| `creationDate.to` | query | string (date-time) |  | Filter the value of creationDate property (<=) |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string (date-time)[] | successful operation |

```json
[
  "2024-01-01T12:00:00Z"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/history" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/history")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/history");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}/history/{creationDate}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-history-creationdate

**Status:** Beta version  
**IAM actions:** `dnsZone:apiovh:history/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `creationDate` | path | string (date-time) | yes | Date of backup creation |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.ZoneRestorePoint | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Date of backup creation |
| `zoneFileUrl` | string | read-only | URL to get backup content |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "zoneFileUrl": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/history/{creationDate}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/history/{creationDate}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/history/{creationDate}");

print_r($result);
?>
```

## Restore the DNS zone

`POST /1.0/domain/zone/{zoneName}/history/{creationDate}/restore`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-history-creationdate-restore

**Status:** Beta version  
**IAM actions:** `dnsZone:apiovh:history/restore`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `creationDate` | path | string (date-time) | yes | Date of backup creation |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/history/{creationDate}/restore" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/history/{creationDate}/restore")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/history/{creationDate}/restore");

print_r($result);
?>
```

## Import zone

`POST /1.0/domain/zone/{zoneName}/import`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-import

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:import`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `zoneFile` | string | yes | Zone file that will be imported |

```json
{
  "zoneFile": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/import" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: text
result = client.post("/domain/zone/{zoneName}/import",
	zoneFile = None, # Zone file that will be imported (type: text)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: text
$result = $ovh->post("/domain/zone/{zoneName}/import", array(
	zoneFile => null, // Zone file that will be imported (type: text)
));

print_r($result);
?>
```

## List zone options

`GET /1.0/domain/zone/{zoneName}/option`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-option

**Status:** Beta version  
**IAM actions:** `dnsZone:apiovh:option/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/option" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/option")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/option");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}/option/{name}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-option-name

**Status:** Beta version  
**IAM actions:** `dnsZone:apiovh:option/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | path | string | yes | The option name |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.Option | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | read-only | The option name |

```json
{
  "name": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/option/{name}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/option/{name}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/option/{name}");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}/option/{name}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-option-name-serviceinfos

**Status:** Beta version  
**IAM actions:** `dnsZone:apiovh:option/serviceInfos/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | path | string | yes | The option name |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | services.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "canDeleteAtExpiration": true,
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string",
  "creation": "2024-01-01",
  "domain": "string",
  "engagedUpTo": "2024-01-01",
  "expiration": "2024-01-01",
  "possibleRenewPeriod": [
    0
  ],
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  },
  "renewalType": "automaticForcedProduct",
  "serviceId": 0,
  "status": "autorenewInProgress"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/option/{name}/serviceInfos" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/option/{name}/serviceInfos")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/option/{name}/serviceInfos");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/domain/zone/{zoneName}/option/{name}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#put-domain-zone-zonename-option-name-serviceinfos

**Status:** Beta version  
**IAM actions:** `dnsZone:apiovh:option/serviceInfos/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | path | string | yes | The option name |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `renew` | service.RenewType | yes | Renew type |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |

```json
{
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/option/{name}/serviceInfos" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: service.RenewType
result = client.put("/domain/zone/{zoneName}/option/{name}/serviceInfos",
	renew = None, # Renew type (type: service.RenewType)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: service.RenewType
$result = $ovh->put("/domain/zone/{zoneName}/option/{name}/serviceInfos", array(
	renew => null, // Renew type (type: service.RenewType)
));

print_r($result);
?>
```

## Records of the zone

`GET /1.0/domain/zone/{zoneName}/record`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-record

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:record/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `fieldType` | query | zone.NamedResolutionFieldTypeEnum |  | Filter the value of fieldType property (like) — one of `A`, `AAAA`, `CAA`, `CNAME`, `DKIM`, `DMARC`, `DNAME`, `LOC`, `MX`, `NAPTR`, `NS`, `PTR`, … |
| `subDomain` | query | string |  | Filter the value of subDomain property (ilike) |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/record" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/record")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/record");

print_r($result);
?>
```

## Create a new DNS record (Don't forget to refresh the zone)

`POST /1.0/domain/zone/{zoneName}/record`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-record

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:record/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fieldType` | zone.NamedResolutionFieldTypeEnum | yes | Resource record Name — one of `A`, `AAAA`, `CAA`, `CNAME`, `DKIM`, `DMARC`, `DNAME`, `LOC`, `MX`, `NAPTR`, `NS`, `PTR`, … |
| `subDomain` | string |  | Resource record subdomain |
| `target` | string | yes | Resource record target |
| `ttl` | integer |  | Resource record ttl |

```json
{
  "fieldType": "A",
  "subDomain": "string",
  "target": "string",
  "ttl": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.Record | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fieldType` | zone.NamedResolutionFieldTypeEnum | read-only | Resource record Name — one of `A`, `AAAA`, `CAA`, `CNAME`, `DKIM`, `DMARC`, `DNAME`, `LOC`, `MX`, `NAPTR`, `NS`, `PTR`, … |
| `id` | integer | read-only | Id of the zone resource record |
| `subDomain` | string |  | Resource record subdomain |
| `target` | string |  | Resource record target |
| `ttl` | integer |  | Resource record ttl |
| `zone` | string | read-only | Resource record zone |

```json
{
  "fieldType": "A",
  "id": 0,
  "subDomain": "string",
  "target": "string",
  "ttl": 0,
  "zone": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/record" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/record",
	fieldType = None, # Resource record Name (type: zone.NamedResolutionFieldTypeEnum)
	subDomain = None, # Resource record subdomain (type: string, nullable)
	target = None, # Resource record target (type: string)
	ttl = None, # Resource record ttl (type: long, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/record", array(
	fieldType => null, // Resource record Name (type: zone.NamedResolutionFieldTypeEnum)
	subDomain => null, // Resource record subdomain (type: string, nullable)
	target => null, // Resource record target (type: string)
	ttl => null, // Resource record ttl (type: long, nullable)
));

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}/record/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-record-id

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:record/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.Record | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fieldType` | zone.NamedResolutionFieldTypeEnum | read-only | Resource record Name — one of `A`, `AAAA`, `CAA`, `CNAME`, `DKIM`, `DMARC`, `DNAME`, `LOC`, `MX`, `NAPTR`, `NS`, `PTR`, … |
| `id` | integer | read-only | Id of the zone resource record |
| `subDomain` | string |  | Resource record subdomain |
| `target` | string |  | Resource record target |
| `ttl` | integer |  | Resource record ttl |
| `zone` | string | read-only | Resource record zone |

```json
{
  "fieldType": "A",
  "id": 0,
  "subDomain": "string",
  "target": "string",
  "ttl": 0,
  "zone": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/record/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/record/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/record/{id}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/domain/zone/{zoneName}/record/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#put-domain-zone-zonename-record-id

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:record/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `domain.zone.Record`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fieldType` | zone.NamedResolutionFieldTypeEnum | read-only | Resource record Name — one of `A`, `AAAA`, `CAA`, `CNAME`, `DKIM`, `DMARC`, `DNAME`, `LOC`, `MX`, `NAPTR`, `NS`, `PTR`, … |
| `id` | integer | read-only | Id of the zone resource record |
| `subDomain` | string |  | Resource record subdomain |
| `target` | string |  | Resource record target |
| `ttl` | integer |  | Resource record ttl |
| `zone` | string | read-only | Resource record zone |

```json
{
  "subDomain": "string",
  "target": "string",
  "ttl": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/record/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.zone.Record
result = client.put("/domain/zone/{zoneName}/record/{id}",
	subDomain = None, # Resource record subdomain (type: string, nullable)
	target = None, # Resource record target (type: string)
	ttl = None, # Resource record ttl (type: integer, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.zone.Record
$result = $ovh->put("/domain/zone/{zoneName}/record/{id}", array(
	subDomain => null, // Resource record subdomain (type: string, nullable)
	target => null, // Resource record target (type: string)
	ttl => null, // Resource record ttl (type: integer, nullable)
));

print_r($result);
?>
```

## Delete a DNS record (Don't forget to refresh the zone)

`DELETE /1.0/domain/zone/{zoneName}/record/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#delete-domain-zone-zonename-record-id

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:record/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/record/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/domain/zone/{zoneName}/record/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/domain/zone/{zoneName}/record/{id}");

print_r($result);
?>
```

## Redirections

`GET /1.0/domain/zone/{zoneName}/redirection`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-redirection

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:redirection/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subDomain` | query | string |  | Filter the value of subDomain property (like) |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/redirection" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/redirection")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/redirection");

print_r($result);
?>
```

## Create a new redirection (Don't forget to refresh the zone)

`POST /1.0/domain/zone/{zoneName}/redirection`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-redirection

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:redirection/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Desciption for invisible redirection |
| `keywords` | string |  | Keywords for invisible redirection |
| `subDomain` | string |  | subdomain to redirect |
| `target` | string | yes | Target of the redirection |
| `title` | string |  | Title for invisible redirection |
| `type` | zone.RedirectionTypeEnum | yes | Redirection type — one of `invisible`, `visible`, `visiblePermanent` |

```json
{
  "description": "string",
  "keywords": "string",
  "subDomain": "string",
  "target": "string",
  "title": "string",
  "type": "invisible"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.Redirection | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Desciption for invisible redirection |
| `id` | integer | read-only | Id of the redirection |
| `keywords` | string |  | Keywords for invisible redirection |
| `subDomain` | string | read-only | subdomain to redirect |
| `target` | string |  | Target of the redirection |
| `title` | string |  | Title for invisible redirection |
| `type` | zone.RedirectionTypeEnum |  | Redirection type — one of `invisible`, `visible`, `visiblePermanent` |
| `zone` | string | read-only | Redirection zone |

```json
{
  "description": "string",
  "id": 0,
  "keywords": "string",
  "subDomain": "string",
  "target": "string",
  "title": "string",
  "type": "invisible",
  "zone": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/redirection" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/redirection",
	description = None, # Desciption for invisible redirection (type: string, nullable)
	keywords = None, # Keywords for invisible redirection (type: string, nullable)
	subDomain = None, # subdomain to redirect (type: string, nullable)
	target = None, # Target of the redirection (type: string)
	title = None, # Title for invisible redirection (type: string, nullable)
	type = None, # Redirection type (type: zone.RedirectionTypeEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/redirection", array(
	description => null, // Desciption for invisible redirection (type: string, nullable)
	keywords => null, // Keywords for invisible redirection (type: string, nullable)
	subDomain => null, // subdomain to redirect (type: string, nullable)
	target => null, // Target of the redirection (type: string)
	title => null, // Title for invisible redirection (type: string, nullable)
	type => null, // Redirection type (type: zone.RedirectionTypeEnum)
));

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}/redirection/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-redirection-id

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:redirection/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.Redirection | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Desciption for invisible redirection |
| `id` | integer | read-only | Id of the redirection |
| `keywords` | string |  | Keywords for invisible redirection |
| `subDomain` | string | read-only | subdomain to redirect |
| `target` | string |  | Target of the redirection |
| `title` | string |  | Title for invisible redirection |
| `type` | zone.RedirectionTypeEnum |  | Redirection type — one of `invisible`, `visible`, `visiblePermanent` |
| `zone` | string | read-only | Redirection zone |

```json
{
  "description": "string",
  "id": 0,
  "keywords": "string",
  "subDomain": "string",
  "target": "string",
  "title": "string",
  "type": "invisible",
  "zone": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/redirection/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/redirection/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/redirection/{id}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/domain/zone/{zoneName}/redirection/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#put-domain-zone-zonename-redirection-id

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:redirection/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `domain.zone.Redirection`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Desciption for invisible redirection |
| `id` | integer | read-only | Id of the redirection |
| `keywords` | string |  | Keywords for invisible redirection |
| `subDomain` | string | read-only | subdomain to redirect |
| `target` | string |  | Target of the redirection |
| `title` | string |  | Title for invisible redirection |
| `type` | zone.RedirectionTypeEnum |  | Redirection type — one of `invisible`, `visible`, `visiblePermanent` |
| `zone` | string | read-only | Redirection zone |

```json
{
  "description": "string",
  "keywords": "string",
  "target": "string",
  "title": "string",
  "type": "invisible"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/redirection/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.zone.Redirection
result = client.put("/domain/zone/{zoneName}/redirection/{id}",
	description = None, # Desciption for invisible redirection (type: string, nullable)
	keywords = None, # Keywords for invisible redirection (type: string, nullable)
	target = None, # Target of the redirection (type: string)
	title = None, # Title for invisible redirection (type: string, nullable)
	type = None, # Redirection type (type: zone.RedirectionTypeEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.zone.Redirection
$result = $ovh->put("/domain/zone/{zoneName}/redirection/{id}", array(
	description => null, // Desciption for invisible redirection (type: string, nullable)
	keywords => null, // Keywords for invisible redirection (type: string, nullable)
	target => null, // Target of the redirection (type: string)
	title => null, // Title for invisible redirection (type: string, nullable)
	type => null, // Redirection type (type: zone.RedirectionTypeEnum)
));

print_r($result);
?>
```

## Delete a redirection (Don't forget to refresh the zone)

`DELETE /1.0/domain/zone/{zoneName}/redirection/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#delete-domain-zone-zonename-redirection-id

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:redirection/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/redirection/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/domain/zone/{zoneName}/redirection/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/domain/zone/{zoneName}/redirection/{id}");

print_r($result);
?>
```

## Apply zone modification on DNS servers

`POST /1.0/domain/zone/{zoneName}/refresh`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-refresh

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:refresh`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/refresh" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/refresh")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/refresh");

print_r($result);
?>
```

## Reset the DNS zone

`POST /1.0/domain/zone/{zoneName}/reset`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-reset

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:reset`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `DnsRecords` | zone.ResetRecord[] |  | Records that will be set after reset |
| `DnsRecords[].fieldType` | zone.ResettableNamedResolutionFieldTypeEnum |  | Resource record type — one of `A`, `MX` |
| `DnsRecords[].target` | string |  | Resource record target |
| `minimized` | boolean |  | Create only mandatory records |

```json
{
  "DnsRecords": [
    {
      "fieldType": "A",
      "target": "string"
    }
  ],
  "minimized": true
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/reset" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/reset",
	DnsRecords = None, # Records that will be set after reset (type: zone.ResetRecord[], nullable)
	minimized = None, # Create only mandatory records (type: boolean, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/reset", array(
	DnsRecords => null, // Records that will be set after reset (type: zone.ResetRecord[], nullable)
	minimized => null, // Create only mandatory records (type: boolean, nullable)
));

print_r($result);
?>
```

## Get service information

`GET /1.0/domain/zone/{zoneName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-serviceinfos

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:serviceInfos/get`

Get service information. Returns the status, creation and expiration dates, contacts and renewal settings of the service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | services.Service | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "canDeleteAtExpiration": true,
  "contactAdmin": "string",
  "contactBilling": "string",
  "contactTech": "string",
  "creation": "2024-01-01",
  "domain": "string",
  "engagedUpTo": "2024-01-01",
  "expiration": "2024-01-01",
  "possibleRenewPeriod": [
    0
  ],
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  },
  "renewalType": "automaticForcedProduct",
  "serviceId": 0,
  "status": "autorenewInProgress"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/serviceInfos" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/serviceInfos")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/serviceInfos");

print_r($result);
?>
```

## Update service information

`PUT /1.0/domain/zone/{zoneName}/serviceInfos`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#put-domain-zone-zonename-serviceinfos

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:serviceInfos/edit`

Update service information. Updates the renewal settings of the service: automatic renewal, period, or deletion at expiration.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `services.Service`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canDeleteAtExpiration` | boolean | read-only | Indicates that the service can be set up to be deleted at expiration |
| `contactAdmin` | string | read-only |  |
| `contactBilling` | string | read-only |  |
| `contactTech` | string | read-only |  |
| `creation` | string (date) | read-only |  |
| `domain` | string | read-only |  |
| `engagedUpTo` | string (date) | read-only |  |
| `expiration` | string (date) | read-only |  |
| `possibleRenewPeriod` | integer[] | read-only | All the possible renew period of your service in month |
| `renew` | service.RenewType |  | Way of handling the renew |
| `renew.automatic` | boolean |  | The service is automatically renewed |
| `renew.deleteAtExpiration` | boolean |  | The service will be deleted at expiration |
| `renew.forced` | boolean |  | The service forced to be renewed |
| `renew.manualPayment` | boolean |  | The service needs to be manually renewed and paid |
| `renew.period` | integer |  | period of renew in month |
| `renewalType` | service.RenewalTypeEnum | read-only | Detailed renewal type of a service — one of `automaticForcedProduct`, `automaticV2012`, `automaticV2014`, `automaticV2016`, `automaticV2024`, `manual`, `oneShot`, `option` |
| `serviceId` | integer | read-only |  |
| `status` | service.StateEnum | read-only | one of `autorenewInProgress`, `expired`, `inCreation`, `ok`, `pendingDebt`, `unPaid` |

```json
{
  "renew": {
    "automatic": true,
    "deleteAtExpiration": true,
    "forced": true,
    "manualPayment": true,
    "period": 0
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/serviceInfos" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: services.Service
result = client.put("/domain/zone/{zoneName}/serviceInfos",
	renew = None, # Way of handling the renew (type: service.RenewType, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: services.Service
$result = $ovh->put("/domain/zone/{zoneName}/serviceInfos", array(
	renew => null, // Way of handling the renew (type: service.RenewType, nullable)
));

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}/soa`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-soa

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:soa/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.Soa | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string |  | Email address of the DNS Administrator |
| `expire` | integer |  | When a zone transfer fails, a countdown clock begins. When the number of seconds set in the expire field elapses, the nameserver stops answering for that zone file |
| `nxDomainTtl` | integer |  | Non-Existent Domain TTL, if the name server returns a negative response, the remote server should wait the number of seconds set in the nxDomainTtl field before trying again |
| `refresh` | integer |  | The refresh value determines the interval in seconds between successful zone transfers of the entire zone file from a nameserver to another. |
| `serial` | integer |  | The serial number is used to indicate which copy of the zone file is the most current. When editing zone files, you must increment the serial number |
| `server` | string |  | Primary authoritative server |
| `ttl` | integer |  | Time To Live in seconds |

```json
{
  "email": "string",
  "expire": 0,
  "nxDomainTtl": 0,
  "refresh": 0,
  "serial": 0,
  "server": "string",
  "ttl": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/soa" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/soa")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/soa");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/domain/zone/{zoneName}/soa`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#put-domain-zone-zonename-soa

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:soa/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Request body (required)

Type: `domain.zone.Soa`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string |  | Email address of the DNS Administrator |
| `expire` | integer |  | When a zone transfer fails, a countdown clock begins. When the number of seconds set in the expire field elapses, the nameserver stops answering for that zone file |
| `nxDomainTtl` | integer |  | Non-Existent Domain TTL, if the name server returns a negative response, the remote server should wait the number of seconds set in the nxDomainTtl field before trying again |
| `refresh` | integer |  | The refresh value determines the interval in seconds between successful zone transfers of the entire zone file from a nameserver to another. |
| `serial` | integer |  | The serial number is used to indicate which copy of the zone file is the most current. When editing zone files, you must increment the serial number |
| `server` | string |  | Primary authoritative server |
| `ttl` | integer |  | Time To Live in seconds |

```json
{
  "email": "string",
  "expire": 0,
  "nxDomainTtl": 0,
  "refresh": 0,
  "serial": 0,
  "server": "string",
  "ttl": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/soa" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: domain.zone.Soa
result = client.put("/domain/zone/{zoneName}/soa",
	email = None, # Email address of the DNS Administrator (type: string)
	expire = None, # When a zone transfer fails, a countdown clock begins. When the number of seconds set in the expire field elapses, the nameserver stops answering for that zone file (type: integer)
	nxDomainTtl = None, # Non-Existent Domain TTL, if the name server returns a negative response, the remote server should wait the number of seconds set in the nxDomainTtl field before trying again (type: integer)
	refresh = None, # The refresh value determines the interval in seconds between successful zone transfers of the entire zone file from a nameserver to another. (type: integer)
	serial = None, # The serial number is used to indicate which copy of the zone file is the most current. When editing zone files, you must increment the serial number (type: integer)
	server = None, # Primary authoritative server (type: string)
	ttl = None, # Time To Live in seconds (type: integer)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: domain.zone.Soa
$result = $ovh->put("/domain/zone/{zoneName}/soa", array(
	email => null, // Email address of the DNS Administrator (type: string)
	expire => null, // When a zone transfer fails, a countdown clock begins. When the number of seconds set in the expire field elapses, the nameserver stops answering for that zone file (type: integer)
	nxDomainTtl => null, // Non-Existent Domain TTL, if the name server returns a negative response, the remote server should wait the number of seconds set in the nxDomainTtl field before trying again (type: integer)
	refresh => null, // The refresh value determines the interval in seconds between successful zone transfers of the entire zone file from a nameserver to another. (type: integer)
	serial => null, // The serial number is used to indicate which copy of the zone file is the most current. When editing zone files, you must increment the serial number (type: integer)
	server => null, // Primary authoritative server (type: string)
	ttl => null, // Time To Live in seconds (type: integer)
));

print_r($result);
?>
```

## Zone status

`GET /1.0/domain/zone/{zoneName}/status`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-status

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:status/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | zone.Status | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `errors` | string[] |  | Error list |
| `isDeployed` | boolean |  | True if the zone has successfully been deployed |
| `warnings` | string[] |  | Warning list |

```json
{
  "errors": [
    "string"
  ],
  "isDeployed": true,
  "warnings": [
    "string"
  ]
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/status" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/status")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/status");

print_r($result);
?>
```

## Domain pending tasks

`GET /1.0/domain/zone/{zoneName}/task`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-task

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `function` | query | string |  | Filter the value of function property (like) |
| `status` | query | domain.OperationStatusEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/task" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/task")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/task");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/domain/zone/{zoneName}/task/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#get-domain-zone-zonename-task-id

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.zone.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/task/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/domain/zone/{zoneName}/task/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/domain/zone/{zoneName}/task/{id}");

print_r($result);
?>
```

## Accelerate the task

`POST /1.0/domain/zone/{zoneName}/task/{id}/accelerate`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-task-id-accelerate

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:task/accelerate`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/task/{id}/accelerate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/task/{id}/accelerate")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/task/{id}/accelerate");

print_r($result);
?>
```

## Cancel the task

`POST /1.0/domain/zone/{zoneName}/task/{id}/cancel`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-task-id-cancel

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:task/cancel`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/task/{id}/cancel" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/task/{id}/cancel")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/task/{id}/cancel");

print_r($result);
?>
```

## Relaunch the task

`POST /1.0/domain/zone/{zoneName}/task/{id}/relaunch`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-task-id-relaunch

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:task/relaunch`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/task/{id}/relaunch" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/task/{id}/relaunch")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/task/{id}/relaunch");

print_r($result);
?>
```

## Request service termination

`POST /1.0/domain/zone/{zoneName}/terminate`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/#post-domain-zone-zonename-terminate

**Status:** Stable production version  
**IAM actions:** `dnsZone:apiovh:terminate`

Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the `confirmTermination` call.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneName` | path | string | yes | The internal name of your zone |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string | successful operation |

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/terminate" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/domain/zone/{zoneName}/terminate")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/domain/zone/{zoneName}/terminate");

print_r($result);
?>
```
