# Web Cloud › Web Hosting › FTP-SSH 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

> 10 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/web-hosting/ftp-ssh/

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

## Operations

- `GET /hosting/web/{serviceName}/indy` — List independent users
- `GET /hosting/web/{serviceName}/indy/{login}` — Get an independent user
- `GET /hosting/web/{serviceName}/key/ssh` — Get the SSH public key
- `GET /hosting/web/{serviceName}/user` — List users
- `GET /hosting/web/{serviceName}/user/{login}` — Get a user
- `POST /hosting/web/{serviceName}/key/ssh` — Generate an SSH key pair
- `POST /hosting/web/{serviceName}/user` — Create a user
- `POST /hosting/web/{serviceName}/user/{login}/changePassword` — Change a user password
- `DELETE /hosting/web/{serviceName}/user/{login}` — Delete a user
- `PUT /hosting/web/{serviceName}/user/{login}` — Update a user

## List independent users

`GET /1.0/hosting/web/{serviceName}/indy`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ftp-ssh/#get-hosting-web-servicename-indy

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:indy/get`

List independent users. Returns the logins of the independent multidomain users of the hosting. Filter them by login.

### Parameters

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

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/indy" \
  -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("/hosting/web/{serviceName}/indy")

# 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("/hosting/web/{serviceName}/indy");

print_r($result);
?>
```

## Get an independent user

`GET /1.0/hosting/web/{serviceName}/indy/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ftp-ssh/#get-hosting-web-servicename-indy-login

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:indy/get`

Get an independent user. Returns the home directory, state and attached domains of the independent multidomain user.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | Login of the multidomain independent user |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.indy | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `attachedDomains` | string[] | read-only | AttachedDomain IDs linked to this multidomain |
| `home` | string | read-only | Home directory |
| `login` | string | read-only | Login of the multidomain independent user |
| `state` | hosting.web.user.StateEnum | read-only | User status — one of `off`, `rw` |

```json
{
  "attachedDomains": [
    "string"
  ],
  "home": "string",
  "login": "string",
  "state": "off"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/indy/{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("/hosting/web/{serviceName}/indy/{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("/hosting/web/{serviceName}/indy/{login}");

print_r($result);
?>
```

## Get the SSH public key

`GET /1.0/hosting/web/{serviceName}/key/ssh`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ftp-ssh/#get-hosting-web-servicename-key-ssh

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:key/ssh/get`

Returns the SSH public key of the hosting.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.Key | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `publicKey` | string | read-only | Public key |

```json
{
  "publicKey": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/key/ssh" \
  -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("/hosting/web/{serviceName}/key/ssh")

# 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("/hosting/web/{serviceName}/key/ssh");

print_r($result);
?>
```

## List users

`GET /1.0/hosting/web/{serviceName}/user`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ftp-ssh/#get-hosting-web-servicename-user

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:user/get`

List users. Returns the logins of the FTP and SSH users of the hosting. Filter them by home or login.

### Parameters

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

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/user" \
  -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("/hosting/web/{serviceName}/user")

# 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("/hosting/web/{serviceName}/user");

print_r($result);
?>
```

## Get a user

`GET /1.0/hosting/web/{serviceName}/user/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ftp-ssh/#get-hosting-web-servicename-user-login

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:user/get`

Get a user. Returns the home directory, SSH state, state and status of the user, and whether it is the primary account.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | Login used to connect on FTP and SSH |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.user | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `home` | string |  | Home directory |
| `isPrimaryAccount` | boolean | read-only | Is this user primary |
| `login` | string | read-only | Login used to connect on FTP and SSH |
| `serviceManagementCredentials` | hosting.web.user.ServiceCredentials | read-only | Credentials to manage your webhosting |
| `serviceManagementCredentials.ftp` | hosting.web.user.Credentials |  | Credentials to manage files by ftp |
| `serviceManagementCredentials.ftp.port` | integer |  | Port to use to access to the service |
| `serviceManagementCredentials.ftp.url` | string |  | Url to contact the service |
| `serviceManagementCredentials.ftp.user` | string |  | Login to authentificate you on the service |
| `serviceManagementCredentials.ssh` | hosting.web.user.Credentials |  | Credentials to manage webhosting by ssh |
| `serviceManagementCredentials.ssh.port` | integer |  | Port to use to access to the service |
| `serviceManagementCredentials.ssh.url` | string |  | Url to contact the service |
| `serviceManagementCredentials.ssh.user` | string |  | Login to authentificate you on the service |
| `sshState` | hosting.web.user.SshStateEnum |  | User ssh status — one of `active`, `none`, `sftponly` |
| `state` | hosting.web.user.StateEnum |  | User state — one of `off`, `rw` |
| `status` | hosting.web.user.StatusEnum | read-only | The user status — one of `created`, `creating`, `deleting`, `updating` |
| `taskId` | integer | read-only | The task ID working on this user |

```json
{
  "home": "string",
  "isPrimaryAccount": true,
  "login": "string",
  "serviceManagementCredentials": {
    "ftp": {
      "port": 0,
      "url": "string",
      "user": "string"
    },
    "ssh": {
      "port": 0,
      "url": "string",
      "user": "string"
    }
  },
  "sshState": "active",
  "state": "off",
  "status": "created",
  "taskId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/user/{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("/hosting/web/{serviceName}/user/{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("/hosting/web/{serviceName}/user/{login}");

print_r($result);
?>
```

## Generate an SSH key pair

`POST /1.0/hosting/web/{serviceName}/key/ssh`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ftp-ssh/#post-hosting-web-servicename-key-ssh

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:key/ssh/create`

Generates an SSH key pair for the hosting and returns its public key.

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.Key | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `publicKey` | string | read-only | Public key |

```json
{
  "publicKey": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/key/ssh" \
  -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("/hosting/web/{serviceName}/key/ssh")

# 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("/hosting/web/{serviceName}/key/ssh");

print_r($result);
?>
```

## Create a user

`POST /1.0/hosting/web/{serviceName}/user`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ftp-ssh/#post-hosting-web-servicename-user

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:user/create`

Create a user. Creates an FTP and SSH user with a login, a password and a home directory, and returns the task. sshState is none by default.

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `home` | string | yes | Home directory |
| `login` | string | yes | Login use for your new user |
| `password` | string (password) | yes | Password |
| `sshState` | hosting.web.user.SshStateEnum |  | Ssh state for this user. Default: none — one of `active`, `none`, `sftponly` |

```json
{
  "home": "string",
  "login": "string",
  "password": "string",
  "sshState": "active"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | string | read-only | Function name |
| `id` | integer | read-only | the id of the task |
| `lastUpdate` | string (date-time) | read-only | last update |
| `objectId` | string | read-only | Task related object ID |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/user" \
  -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("/hosting/web/{serviceName}/user",
	home = None, # Home directory (type: string)
	login = None, # Login use for your new user (type: string)
	password = None, # Password (type: password)
	sshState = None, # Ssh state for this user. Default: none (type: hosting.web.user.SshStateEnum, 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("/hosting/web/{serviceName}/user", array(
	home => null, // Home directory (type: string)
	login => null, // Login use for your new user (type: string)
	password => null, // Password (type: password)
	sshState => null, // Ssh state for this user. Default: none (type: hosting.web.user.SshStateEnum, nullable)
));

print_r($result);
?>
```

## Change a user password

`POST /1.0/hosting/web/{serviceName}/user/{login}/changePassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ftp-ssh/#post-hosting-web-servicename-user-login-changepassword

**Status:** Deprecated, will be removed  
**Deprecated** since 2026-09-01, removed on 2026-11-01; use `/hosting/web/{serviceName}/user/{login}` instead.  
**IAM actions:** `webHosting:apiovh:user/changePassword`

Change a user password. Changes the password of the user and returns the task. The password is used for both FTP and SSH access.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | Login used to connect on FTP and SSH |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) | yes | The user's new password |

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | string | read-only | Function name |
| `id` | integer | read-only | the id of the task |
| `lastUpdate` | string (date-time) | read-only | last update |
| `objectId` | string | read-only | Task related object ID |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/user/{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("/hosting/web/{serviceName}/user/{login}/changePassword",
	password = None, # The user's new password (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("/hosting/web/{serviceName}/user/{login}/changePassword", array(
	password => null, // The user's new password (type: password)
));

print_r($result);
?>
```

## Delete a user

`DELETE /1.0/hosting/web/{serviceName}/user/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ftp-ssh/#delete-hosting-web-servicename-user-login

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:user/delete`

Delete a user. Permanently deletes the user and returns the task. The files in its home folder are kept.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | Login used to connect on FTP and SSH |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | string | read-only | Function name |
| `id` | integer | read-only | the id of the task |
| `lastUpdate` | string (date-time) | read-only | last update |
| `objectId` | string | read-only | Task related object ID |
| `objectType` | hosting.web.task.ObjectTypeEnum | read-only | Task object type — one of `Abuse`, `AttachedDomain`, `BlockedIp`, `Cdn`, `Cron`, `Database`, `Dump`, `EnvVar`, `Filerz`, `Hostedssl`, `Hosting`, `Indy`, … |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | hosting.web.task.StatusEnum | read-only | Task status — one of `cancelled`, `doing`, `done`, `error`, `init`, `todo` |

```json
{
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "objectId": "string",
  "objectType": "Abuse",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/user/{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("/hosting/web/{serviceName}/user/{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("/hosting/web/{serviceName}/user/{login}");

print_r($result);
?>
```

## Update a user

`PUT /1.0/hosting/web/{serviceName}/user/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/ftp-ssh/#put-hosting-web-servicename-user-login

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:user/edit`

Update a user. Updates the home directory, SSH state or state of the user. Set state to off to disable the FTP and SSH access of the user.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | Login used to connect on FTP and SSH |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `hosting.web.user`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `home` | string |  | Home directory |
| `isPrimaryAccount` | boolean | read-only | Is this user primary |
| `login` | string | read-only | Login used to connect on FTP and SSH |
| `serviceManagementCredentials` | hosting.web.user.ServiceCredentials | read-only | Credentials to manage your webhosting |
| `serviceManagementCredentials.ftp` | hosting.web.user.Credentials |  | Credentials to manage files by ftp |
| `serviceManagementCredentials.ftp.port` | integer |  | Port to use to access to the service |
| `serviceManagementCredentials.ftp.url` | string |  | Url to contact the service |
| `serviceManagementCredentials.ftp.user` | string |  | Login to authentificate you on the service |
| `serviceManagementCredentials.ssh` | hosting.web.user.Credentials |  | Credentials to manage webhosting by ssh |
| `serviceManagementCredentials.ssh.port` | integer |  | Port to use to access to the service |
| `serviceManagementCredentials.ssh.url` | string |  | Url to contact the service |
| `serviceManagementCredentials.ssh.user` | string |  | Login to authentificate you on the service |
| `sshState` | hosting.web.user.SshStateEnum |  | User ssh status — one of `active`, `none`, `sftponly` |
| `state` | hosting.web.user.StateEnum |  | User state — one of `off`, `rw` |
| `status` | hosting.web.user.StatusEnum | read-only | The user status — one of `created`, `creating`, `deleting`, `updating` |
| `taskId` | integer | read-only | The task ID working on this user |

```json
{
  "home": "string",
  "sshState": "active",
  "state": "off"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/user/{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: hosting.web.user
result = client.put("/hosting/web/{serviceName}/user/{login}",
	home = None, # Home directory (type: string)
	sshState = None, # User ssh status (type: hosting.web.user.SshStateEnum)
	state = None, # User state (type: hosting.web.user.StateEnum)
)

# 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: hosting.web.user
$result = $ovh->put("/hosting/web/{serviceName}/user/{login}", array(
	home => null, // Home directory (type: string)
	sshState => null, // User ssh status (type: hosting.web.user.SshStateEnum)
	state => null, // User state (type: hosting.web.user.StateEnum)
));

print_r($result);
?>
```
