# Misc › Notifications API

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

> 21 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/misc/notifications/

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

## Operations

- `GET /me/notification/email/history` — Retrieve every email sent to you
- `GET /me/notification/email/history/{id}` — Retrieve information about an email
- `GET /notification/contactMean` — Retrieve every contact mean
- `POST /notification/contactMean` — Create a contact mean
- `GET /notification/contactMean/{contactMeanId}` — Retrieve information about a contact mean
- `PUT /notification/contactMean/{contactMeanId}` — Update a contact mean
- `DELETE /notification/contactMean/{contactMeanId}` — Delete the contact mean
- `POST /notification/contactMean/{contactMeanId}/restartValidation` — Restart the validation process for this contact mean, if you did not receive the OTP
- `GET /notification/contactMean/{contactMeanId}/task` — Get the list of tasks on a contact mean
- `GET /notification/contactMean/{contactMeanId}/task/{taskId}` — Get a task on a contact mean
- `PUT /notification/contactMean/{contactMeanId}/task/{taskId}` — Update a task on a contact mean
- `POST /notification/contactMean/{contactMeanId}/validate` — Validate this contact mean
- `GET /notification/history` — Retrieve every notification sent to you
- `GET /notification/history/{notificationId}` — Retrieve information about a notification sent to you
- `GET /notification/history/{notificationId}/attachment/{attachmentName}` — Get a notification attachment
- `GET /notification/reference` — Retrieve data referential for /notification endpoints
- `GET /notification/routing` — Retrieve every routing
- `POST /notification/routing` — Create a routing
- `GET /notification/routing/{routingId}` — Retrieve information about a routing
- `PUT /notification/routing/{routingId}` — Update a routing
- `DELETE /notification/routing/{routingId}` — Delete the routing

## Retrieve every email sent to you

`GET /1.0/me/notification/email/history`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-me-notification-email-history

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/notification/email/history/get`

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/notification/email/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("/me/notification/email/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("/me/notification/email/history");

print_r($result);
?>
```

## Retrieve information about an email

`GET /1.0/me/notification/email/history/{id}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-me-notification-email-history-id

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/notification/email/history/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | nichandle.EmailNotification | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `body` | string | read-only | Content of the email |
| `date` | string (date-time) | read-only | Date at which the email was sent |
| `id` | integer | read-only | ID of the email notification |
| `subject` | string | read-only | Subject of the email |

```json
{
  "body": "string",
  "date": "2024-01-01T12:00:00Z",
  "id": 0,
  "subject": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/notification/email/history/{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("/me/notification/email/history/{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("/me/notification/email/history/{id}");

print_r($result);
?>
```

## Retrieve every contact mean

`GET /v2/notification/contactMean`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-notification-contactmean

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/contactMean/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.contactMean.ContactMean[] | successful operation |
| 400 | object | Error 400 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date at which the contact mean was created |
| `currentTasks` | common.CurrentTask[] | read-only | Task to do on this contact mean |
| `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 |
| `default` | boolean | read-only | Is this the default contact mean |
| `description` | string |  | Arbitrary description for this contact mean |
| `email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `error` | string | read-only | When status is ERROR, details about the error |
| `id` | string (uuid) | read-only | Unique identifier of the contact mean |
| `status` | notification.contactMean.StatusEnum |  | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "default": true,
    "description": "string",
    "email": "string",
    "error": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "status": "DISABLED",
    "type": "EMAIL"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/notification/contactMean" \
  -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/notification/contactMean")

# 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/notification/contactMean");

print_r($result);
?>
```

## Create a contact mean

`POST /v2/notification/contactMean`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#post-notification-contactmean

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/contactMean/create`

### Request body (required)

Type: `notification.contactMean.PostInput`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Arbitrary description for this contact mean |
| `email` | string |  | When type is EMAIL, the email address that will be used |
| `type` | notification.contactMean.TypeEnum | yes | Type of the contact mean to create — one of `EMAIL` |

```json
{
  "description": "string",
  "email": "string",
  "type": "EMAIL"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.contactMean.ContactMean | successful operation |
| 400 | object | Error 400 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date at which the contact mean was created |
| `currentTasks` | common.CurrentTask[] | read-only | Task to do on this contact mean |
| `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 |
| `default` | boolean | read-only | Is this the default contact mean |
| `description` | string |  | Arbitrary description for this contact mean |
| `email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `error` | string | read-only | When status is ERROR, details about the error |
| `id` | string (uuid) | read-only | Unique identifier of the contact mean |
| `status` | notification.contactMean.StatusEnum |  | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "default": true,
  "description": "string",
  "email": "string",
  "error": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "DISABLED",
  "type": "EMAIL"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/notification/contactMean" \
  -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: notification.contactMean.PostInput
result = client.post("/v2/notification/contactMean",
	description = None, # Arbitrary description for this contact mean (type: string, nullable)
	email = None, # When type is EMAIL, the email address that will be used (type: string)
	type = None, # Type of the contact mean to create (type: notification.contactMean.TypeEnum)
)

# 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: notification.contactMean.PostInput
$result = $ovh->post("/v2/notification/contactMean", array(
	description => null, // Arbitrary description for this contact mean (type: string, nullable)
	email => null, // When type is EMAIL, the email address that will be used (type: string)
	type => null, // Type of the contact mean to create (type: notification.contactMean.TypeEnum)
));

print_r($result);
?>
```

## Retrieve information about a contact mean

`GET /v2/notification/contactMean/{contactMeanId}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-notification-contactmean-contactmeanid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/contactMean/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `contactMeanId` | path | string (uuid) | yes | Contact mean ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.contactMean.ContactMean | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date at which the contact mean was created |
| `currentTasks` | common.CurrentTask[] | read-only | Task to do on this contact mean |
| `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 |
| `default` | boolean | read-only | Is this the default contact mean |
| `description` | string |  | Arbitrary description for this contact mean |
| `email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `error` | string | read-only | When status is ERROR, details about the error |
| `id` | string (uuid) | read-only | Unique identifier of the contact mean |
| `status` | notification.contactMean.StatusEnum |  | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "default": true,
  "description": "string",
  "email": "string",
  "error": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "DISABLED",
  "type": "EMAIL"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/notification/contactMean/{contactMeanId}" \
  -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/notification/contactMean/{contactMeanId}")

# 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/notification/contactMean/{contactMeanId}");

print_r($result);
?>
```

## Update a contact mean

`PUT /v2/notification/contactMean/{contactMeanId}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#put-notification-contactmean-contactmeanid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/contactMean/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `contactMeanId` | path | string (uuid) | yes | Contact mean ID |

### Request body (required)

Type: `notification.contactMean.ContactMean`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date at which the contact mean was created |
| `currentTasks` | common.CurrentTask[] | read-only | Task to do on this contact mean |
| `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 |
| `default` | boolean | read-only | Is this the default contact mean |
| `description` | string |  | Arbitrary description for this contact mean |
| `email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `error` | string | read-only | When status is ERROR, details about the error |
| `id` | string (uuid) | read-only | Unique identifier of the contact mean |
| `status` | notification.contactMean.StatusEnum |  | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |

```json
{
  "description": "string",
  "status": "DISABLED"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.contactMean.ContactMean | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date at which the contact mean was created |
| `currentTasks` | common.CurrentTask[] | read-only | Task to do on this contact mean |
| `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 |
| `default` | boolean | read-only | Is this the default contact mean |
| `description` | string |  | Arbitrary description for this contact mean |
| `email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `error` | string | read-only | When status is ERROR, details about the error |
| `id` | string (uuid) | read-only | Unique identifier of the contact mean |
| `status` | notification.contactMean.StatusEnum |  | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "default": true,
  "description": "string",
  "email": "string",
  "error": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "DISABLED",
  "type": "EMAIL"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/notification/contactMean/{contactMeanId}" \
  -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: notification.contactMean.ContactMean
result = client.put("/v2/notification/contactMean/{contactMeanId}",
	description = None, # Arbitrary description for this contact mean (type: string, nullable)
	status = None, # Status of the contact mean (type: notification.contactMean.StatusEnum)
)

# 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: notification.contactMean.ContactMean
$result = $ovh->put("/v2/notification/contactMean/{contactMeanId}", array(
	description => null, // Arbitrary description for this contact mean (type: string, nullable)
	status => null, // Status of the contact mean (type: notification.contactMean.StatusEnum)
));

print_r($result);
?>
```

## Delete the contact mean

`DELETE /v2/notification/contactMean/{contactMeanId}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#delete-notification-contactmean-contactmeanid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/contactMean/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `contactMeanId` | path | string (uuid) | yes | Contact mean ID |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/notification/contactMean/{contactMeanId}" \
  -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("/v2/notification/contactMean/{contactMeanId}")

# 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("/v2/notification/contactMean/{contactMeanId}");

print_r($result);
?>
```

## Restart the validation process for this contact mean, if you did not receive the OTP

`POST /v2/notification/contactMean/{contactMeanId}/restartValidation`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#post-notification-contactmean-contactmeanid-restartvalidation

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/contactMean/restartValidation`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `contactMeanId` | path | string (uuid) | yes | Contact mean ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.contactMean.ContactMean | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date at which the contact mean was created |
| `currentTasks` | common.CurrentTask[] | read-only | Task to do on this contact mean |
| `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 |
| `default` | boolean | read-only | Is this the default contact mean |
| `description` | string |  | Arbitrary description for this contact mean |
| `email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `error` | string | read-only | When status is ERROR, details about the error |
| `id` | string (uuid) | read-only | Unique identifier of the contact mean |
| `status` | notification.contactMean.StatusEnum |  | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "default": true,
  "description": "string",
  "email": "string",
  "error": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "DISABLED",
  "type": "EMAIL"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/notification/contactMean/{contactMeanId}/restartValidation" \
  -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("/v2/notification/contactMean/{contactMeanId}/restartValidation")

# 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("/v2/notification/contactMean/{contactMeanId}/restartValidation");

print_r($result);
?>
```

## Get the list of tasks on a contact mean

`GET /v2/notification/contactMean/{contactMeanId}/task`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-notification-contactmean-contactmeanid-task

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/contactMean/task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `contactMeanId` | path | string (uuid) | yes | Contact mean ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Task[] | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "errors": [
      {
        "message": "string"
      }
    ],
    "finishedAt": "2024-01-01T12:00:00Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "link": "string",
    "message": "string",
    "progress": [
      {
        "name": "string",
        "status": "DONE"
      }
    ],
    "startedAt": "2024-01-01T12:00:00Z",
    "status": "DONE",
    "type": "string",
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/notification/contactMean/{contactMeanId}/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("/v2/notification/contactMean/{contactMeanId}/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("/v2/notification/contactMean/{contactMeanId}/task");

print_r($result);
?>
```

## Get a task on a contact mean

`GET /v2/notification/contactMean/{contactMeanId}/task/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-notification-contactmean-contactmeanid-task-taskid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/contactMean/task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `contactMeanId` | path | string (uuid) | yes | Contact mean ID |
| `taskId` | path | string (uuid) | yes | Task ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Task | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "message": "string"
    }
  ],
  "finishedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "message": "string",
  "progress": [
    {
      "name": "string",
      "status": "DONE"
    }
  ],
  "startedAt": "2024-01-01T12:00:00Z",
  "status": "DONE",
  "type": "string",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/notification/contactMean/{contactMeanId}/task/{taskId}" \
  -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/notification/contactMean/{contactMeanId}/task/{taskId}")

# 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/notification/contactMean/{contactMeanId}/task/{taskId}");

print_r($result);
?>
```

## Update a task on a contact mean

`PUT /v2/notification/contactMean/{contactMeanId}/task/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#put-notification-contactmean-contactmeanid-task-taskid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/contactMean/task/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `contactMeanId` | path | string (uuid) | yes | Contact mean ID |
| `taskId` | path | string (uuid) | yes | Task ID |

### Request body (required)

Type: `common.TaskWithInputs_notification.contactMean.TaskInputs`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `inputs` | notification.contactMean.TaskInputs | yes | Contact mean task input |
| `inputs.otp` | string |  | The OTP received by your contact mean to validate it |
| `inputs.resendOTP` | string (date-time) |  | Specify a new date in order to request a new OTP (for terraform compatibility) |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
{
  "inputs": {
    "otp": "string",
    "resendOTP": "2024-01-01T12:00:00Z"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Task | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "message": "string"
    }
  ],
  "finishedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "message": "string",
  "progress": [
    {
      "name": "string",
      "status": "DONE"
    }
  ],
  "startedAt": "2024-01-01T12:00:00Z",
  "status": "DONE",
  "type": "string",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/notification/contactMean/{contactMeanId}/task/{taskId}" \
  -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: common.TaskWithInputs<notification.contactMean.TaskInputs>
result = client.put("/v2/notification/contactMean/{contactMeanId}/task/{taskId}",
	data = None, # (type: common.TaskWithInputs<notification.contactMean.TaskInputs>)
)

# 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: common.TaskWithInputs<notification.contactMean.TaskInputs>
$result = $ovh->put("/v2/notification/contactMean/{contactMeanId}/task/{taskId}", array(
	data => null, // (type: common.TaskWithInputs<notification.contactMean.TaskInputs>)
));

print_r($result);
?>
```

## Validate this contact mean

`POST /v2/notification/contactMean/{contactMeanId}/validate`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#post-notification-contactmean-contactmeanid-validate

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/contactMean/validate`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `contactMeanId` | path | string (uuid) | yes | Contact mean ID |

### Request body (required)

Type: `notification.contactMean.ValidateInput`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `otp` | string | yes | The OTP received by your contact mean to validate it |

```json
{
  "otp": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.contactMean.ContactMean | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date at which the contact mean was created |
| `currentTasks` | common.CurrentTask[] | read-only | Task to do on this contact mean |
| `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 |
| `default` | boolean | read-only | Is this the default contact mean |
| `description` | string |  | Arbitrary description for this contact mean |
| `email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `error` | string | read-only | When status is ERROR, details about the error |
| `id` | string (uuid) | read-only | Unique identifier of the contact mean |
| `status` | notification.contactMean.StatusEnum |  | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "default": true,
  "description": "string",
  "email": "string",
  "error": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "DISABLED",
  "type": "EMAIL"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/notification/contactMean/{contactMeanId}/validate" \
  -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: notification.contactMean.ValidateInput
result = client.post("/v2/notification/contactMean/{contactMeanId}/validate",
	otp = None, # The OTP received by your contact mean to validate it (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: notification.contactMean.ValidateInput
$result = $ovh->post("/v2/notification/contactMean/{contactMeanId}/validate", array(
	otp => null, // The OTP received by your contact mean to validate it (type: string)
));

print_r($result);
?>
```

## Retrieve every notification sent to you

`GET /v2/notification/history`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-notification-history

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/history/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `category` | query | string[] |  | Select notifications belonging to one of these categories |
| `createdAfter` | query | string (date-time) |  | Select notifications created after this date |
| `createdBefore` | query | string (date-time) |  | Select notifications created before this date |
| `priority` | query | notification.history.NotificationPriorityEnum[] |  | Select notifications matching one of these priorities |
| `sortCreatedAt` | query | notification.SortOrderEnum |  | Sort by createdAt field. Defaults to DESC. — one of `ASC`, `DESC` |
| `tags` | query | object |  | Filter notifications using tag filters |
| `titleContains` | query | string |  | Select notifications which title contains this text |
| `withSummary` | query | boolean |  | Add summary field to response |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.history.Notification[] | successful operation |
| 400 | object | Error 400 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `attachments` | notification.history.Attachment[] | read-only | Attachments linked to this notification |
| `attachments[].contentType` | string | read-only | Content type of the attachment |
| `attachments[].name` | string | read-only | Name of the attachment |
| `attachments[].sizeBytes` | integer | read-only | Size of the attachment in bytes |
| `attachments[].url` | string | read-only | URL to use to download the attachment |
| `categories` | string[] | read-only | Categories of the notification |
| `contacts` | notification.history.Contact[] | read-only | Contact attempts made for this notification |
| `contacts[].error` | string | read-only | Error encountered when attempting this contact |
| `contacts[].id` | string (uuid) | read-only | Unique identifier of the contact |
| `contacts[].sentAt` | string (date-time) | read-only | Date at which this contact happened |
| `contacts[].status` | notification.history.ContactStatusEnum | read-only | Status of the contact — one of `BOUNCED`, `DELIVERED`, `DROPPED`, `QUEUED`, `SENT` |
| `contacts[].to` | string | read-only | Destination of this contact attempt |
| `contacts[].type` | notification.contactMean.ContactMeanTypeEnum | read-only | Type of the contact mean used — one of `EMAIL` |
| `createdAt` | string (date-time) | read-only | Date at which the notification was sent |
| `html` | string | read-only | HTML text of the notification |
| `id` | string (uuid) | read-only | Unique identifier of the notification |
| `priority` | notification.history.NotificationPriorityEnum | read-only | Priority of the notification — one of `HIGH`, `LOW`, `MEDIUM` |
| `summary` | string | read-only | Summary of the notification |
| `tags` | object | read-only | Tags of the notification |
| `text` | string | read-only | Raw text of the notification |
| `title` | string | read-only | Title of the notification |

```json
[
  {
    "attachments": [
      {
        "contentType": "string",
        "name": "string",
        "sizeBytes": 0,
        "url": "string"
      }
    ],
    "categories": [
      "string"
    ],
    "contacts": [
      {
        "error": "string",
        "id": "00000000-0000-0000-0000-000000000000",
        "sentAt": "2024-01-01T12:00:00Z",
        "status": "BOUNCED",
        "to": "string",
        "type": "EMAIL"
      }
    ],
    "createdAt": "2024-01-01T12:00:00Z",
    "html": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "priority": "HIGH",
    "summary": "string",
    "tags": {
      "key": "string"
    },
    "text": "string",
    "title": "string"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/notification/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("/v2/notification/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("/v2/notification/history");

print_r($result);
?>
```

## Retrieve information about a notification sent to you

`GET /v2/notification/history/{notificationId}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-notification-history-notificationid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/history/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `notificationId` | path | string (uuid) | yes | Notification ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.history.Notification | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `attachments` | notification.history.Attachment[] | read-only | Attachments linked to this notification |
| `attachments[].contentType` | string | read-only | Content type of the attachment |
| `attachments[].name` | string | read-only | Name of the attachment |
| `attachments[].sizeBytes` | integer | read-only | Size of the attachment in bytes |
| `attachments[].url` | string | read-only | URL to use to download the attachment |
| `categories` | string[] | read-only | Categories of the notification |
| `contacts` | notification.history.Contact[] | read-only | Contact attempts made for this notification |
| `contacts[].error` | string | read-only | Error encountered when attempting this contact |
| `contacts[].id` | string (uuid) | read-only | Unique identifier of the contact |
| `contacts[].sentAt` | string (date-time) | read-only | Date at which this contact happened |
| `contacts[].status` | notification.history.ContactStatusEnum | read-only | Status of the contact — one of `BOUNCED`, `DELIVERED`, `DROPPED`, `QUEUED`, `SENT` |
| `contacts[].to` | string | read-only | Destination of this contact attempt |
| `contacts[].type` | notification.contactMean.ContactMeanTypeEnum | read-only | Type of the contact mean used — one of `EMAIL` |
| `createdAt` | string (date-time) | read-only | Date at which the notification was sent |
| `html` | string | read-only | HTML text of the notification |
| `id` | string (uuid) | read-only | Unique identifier of the notification |
| `priority` | notification.history.NotificationPriorityEnum | read-only | Priority of the notification — one of `HIGH`, `LOW`, `MEDIUM` |
| `summary` | string | read-only | Summary of the notification |
| `tags` | object | read-only | Tags of the notification |
| `text` | string | read-only | Raw text of the notification |
| `title` | string | read-only | Title of the notification |

```json
{
  "attachments": [
    {
      "contentType": "string",
      "name": "string",
      "sizeBytes": 0,
      "url": "string"
    }
  ],
  "categories": [
    "string"
  ],
  "contacts": [
    {
      "error": "string",
      "id": "00000000-0000-0000-0000-000000000000",
      "sentAt": "2024-01-01T12:00:00Z",
      "status": "BOUNCED",
      "to": "string",
      "type": "EMAIL"
    }
  ],
  "createdAt": "2024-01-01T12:00:00Z",
  "html": "string",
  "id": "00000000-0000-0000-0000-000000000000",
  "priority": "HIGH",
  "summary": "string",
  "tags": {
    "key": "string"
  },
  "text": "string",
  "title": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/notification/history/{notificationId}" \
  -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/notification/history/{notificationId}")

# 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/notification/history/{notificationId}");

print_r($result);
?>
```

## Get a notification attachment

`GET /v2/notification/history/{notificationId}/attachment/{attachmentName}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-notification-history-notificationid-attachment-attachmentname

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/history/attachment/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `attachmentName` | path | string | yes | Attachment name |
| `notificationId` | path | string (uuid) | yes | Notification ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.history.Attachment | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contentType` | string | read-only | Content type of the attachment |
| `name` | string | read-only | Name of the attachment |
| `sizeBytes` | integer | read-only | Size of the attachment in bytes |
| `url` | string | read-only | URL to use to download the attachment |

```json
{
  "contentType": "string",
  "name": "string",
  "sizeBytes": 0,
  "url": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/notification/history/{notificationId}/attachment/{attachmentName}" \
  -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/notification/history/{notificationId}/attachment/{attachmentName}")

# 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/notification/history/{notificationId}/attachment/{attachmentName}");

print_r($result);
?>
```

## Retrieve data referential for /notification endpoints

`GET /v2/notification/reference`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-notification-reference

**Status:** Stable production version

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.reference.Reference | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `categories` | notification.reference.ReferenceCategory[] | read-only | Available notification categories |
| `categories[].description` | string | read-only | Category description |
| `categories[].name` | string | read-only | Category name |
| `priorities` | notification.reference.ReferencePriority[] | read-only | Available notification priorities |
| `priorities[].description` | string | read-only | Priority description |
| `priorities[].name` | notification.history.NotificationPriorityEnum | read-only | Priority name — one of `HIGH`, `LOW`, `MEDIUM` |

```json
{
  "categories": [
    {
      "description": "string",
      "name": "string"
    }
  ],
  "priorities": [
    {
      "description": "string",
      "name": "HIGH"
    }
  ]
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/notification/reference" \
  -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/notification/reference")

# 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/notification/reference");

print_r($result);
?>
```

## Retrieve every routing

`GET /v2/notification/routing`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-notification-routing

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/routing/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.routing.Routing[] | successful operation |
| 400 | object | Error 400 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `active` | boolean |  | Whether this routing is currently active |
| `createdAt` | string (date-time) | read-only | Date at which the routing was created |
| `id` | string (uuid) | read-only | Unique identifier of the routing |
| `name` | string |  | Name of the routing |
| `rules` | notification.routing.Rule[] |  | Type of the contact mean |
| `rules[].condition` | notification.routing.RuleCondition | yes | Condition for the route to match |
| `rules[].condition.category` | string[] |  | Notification categories, the rule will be valid if one of the categories matches, if not empty |
| `rules[].condition.priority` | string[] |  | Notification priorities, the rule will be valid if one of the priorities matches, if not empty |
| `rules[].contactMeans` | notification.routing.RuleContactMean[] | yes | Contact means to route the nofitications to |
| `rules[].contactMeans[].email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `rules[].contactMeans[].error` | string | read-only | When status is ERROR, details about the error |
| `rules[].contactMeans[].id` | string (uuid) | yes | Identifier of the contact mean |
| `rules[].contactMeans[].status` | notification.contactMean.StatusEnum | read-only | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `rules[].contactMeans[].type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |
| `rules[].continue` | boolean | yes | Wheter the processing stops at this rule, if it matches |

```json
[
  {
    "active": true,
    "createdAt": "2024-01-01T12:00:00Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "string",
    "rules": [
      {
        "condition": {
          "category": [
            "string"
          ],
          "priority": [
            "string"
          ]
        },
        "contactMeans": [
          {
            "email": "string",
            "error": "string",
            "id": "00000000-0000-0000-0000-000000000000",
            "status": "DISABLED",
            "type": "EMAIL"
          }
        ],
        "continue": true
      }
    ]
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/notification/routing" \
  -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/notification/routing")

# 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/notification/routing");

print_r($result);
?>
```

## Create a routing

`POST /v2/notification/routing`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#post-notification-routing

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/routing/create`

### Request body (required)

Type: `notification.routing.PostInput`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `active` | boolean | yes | Whether this routing is currently active |
| `name` | string | yes | Name of the routing |
| `rules` | notification.routing.Rule[] | yes | Type of the contact mean |
| `rules[].condition` | notification.routing.RuleCondition | yes | Condition for the route to match |
| `rules[].condition.category` | string[] |  | Notification categories, the rule will be valid if one of the categories matches, if not empty |
| `rules[].condition.priority` | string[] |  | Notification priorities, the rule will be valid if one of the priorities matches, if not empty |
| `rules[].contactMeans` | notification.routing.RuleContactMean[] | yes | Contact means to route the nofitications to |
| `rules[].contactMeans[].email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `rules[].contactMeans[].error` | string | read-only | When status is ERROR, details about the error |
| `rules[].contactMeans[].id` | string (uuid) | yes | Identifier of the contact mean |
| `rules[].contactMeans[].status` | notification.contactMean.StatusEnum | read-only | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `rules[].contactMeans[].type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |
| `rules[].continue` | boolean | yes | Wheter the processing stops at this rule, if it matches |

```json
{
  "active": true,
  "name": "string",
  "rules": [
    {
      "condition": {
        "category": [
          "string"
        ],
        "priority": [
          "string"
        ]
      },
      "contactMeans": [
        {
          "id": "00000000-0000-0000-0000-000000000000"
        }
      ],
      "continue": true
    }
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.routing.Routing | successful operation |
| 400 | object | Error 400 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `active` | boolean |  | Whether this routing is currently active |
| `createdAt` | string (date-time) | read-only | Date at which the routing was created |
| `id` | string (uuid) | read-only | Unique identifier of the routing |
| `name` | string |  | Name of the routing |
| `rules` | notification.routing.Rule[] |  | Type of the contact mean |
| `rules[].condition` | notification.routing.RuleCondition | yes | Condition for the route to match |
| `rules[].condition.category` | string[] |  | Notification categories, the rule will be valid if one of the categories matches, if not empty |
| `rules[].condition.priority` | string[] |  | Notification priorities, the rule will be valid if one of the priorities matches, if not empty |
| `rules[].contactMeans` | notification.routing.RuleContactMean[] | yes | Contact means to route the nofitications to |
| `rules[].contactMeans[].email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `rules[].contactMeans[].error` | string | read-only | When status is ERROR, details about the error |
| `rules[].contactMeans[].id` | string (uuid) | yes | Identifier of the contact mean |
| `rules[].contactMeans[].status` | notification.contactMean.StatusEnum | read-only | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `rules[].contactMeans[].type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |
| `rules[].continue` | boolean | yes | Wheter the processing stops at this rule, if it matches |

```json
{
  "active": true,
  "createdAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "rules": [
    {
      "condition": {
        "category": [
          "string"
        ],
        "priority": [
          "string"
        ]
      },
      "contactMeans": [
        {
          "email": "string",
          "error": "string",
          "id": "00000000-0000-0000-0000-000000000000",
          "status": "DISABLED",
          "type": "EMAIL"
        }
      ],
      "continue": true
    }
  ]
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/notification/routing" \
  -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: notification.routing.PostInput
result = client.post("/v2/notification/routing",
	active = None, # Whether this routing is currently active (type: boolean)
	name = None, # Name of the routing (type: string)
	rules = None, # Type of the contact mean (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: notification.routing.PostInput
$result = $ovh->post("/v2/notification/routing", array(
	active => null, // Whether this routing is currently active (type: boolean)
	name => null, // Name of the routing (type: string)
	rules => null, // Type of the contact mean (type: array)
));

print_r($result);
?>
```

## Retrieve information about a routing

`GET /v2/notification/routing/{routingId}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#get-notification-routing-routingid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/routing/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routingId` | path | string (uuid) | yes | Routing ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.routing.Routing | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `active` | boolean |  | Whether this routing is currently active |
| `createdAt` | string (date-time) | read-only | Date at which the routing was created |
| `id` | string (uuid) | read-only | Unique identifier of the routing |
| `name` | string |  | Name of the routing |
| `rules` | notification.routing.Rule[] |  | Type of the contact mean |
| `rules[].condition` | notification.routing.RuleCondition | yes | Condition for the route to match |
| `rules[].condition.category` | string[] |  | Notification categories, the rule will be valid if one of the categories matches, if not empty |
| `rules[].condition.priority` | string[] |  | Notification priorities, the rule will be valid if one of the priorities matches, if not empty |
| `rules[].contactMeans` | notification.routing.RuleContactMean[] | yes | Contact means to route the nofitications to |
| `rules[].contactMeans[].email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `rules[].contactMeans[].error` | string | read-only | When status is ERROR, details about the error |
| `rules[].contactMeans[].id` | string (uuid) | yes | Identifier of the contact mean |
| `rules[].contactMeans[].status` | notification.contactMean.StatusEnum | read-only | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `rules[].contactMeans[].type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |
| `rules[].continue` | boolean | yes | Wheter the processing stops at this rule, if it matches |

```json
{
  "active": true,
  "createdAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "rules": [
    {
      "condition": {
        "category": [
          "string"
        ],
        "priority": [
          "string"
        ]
      },
      "contactMeans": [
        {
          "email": "string",
          "error": "string",
          "id": "00000000-0000-0000-0000-000000000000",
          "status": "DISABLED",
          "type": "EMAIL"
        }
      ],
      "continue": true
    }
  ]
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/notification/routing/{routingId}" \
  -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/notification/routing/{routingId}")

# 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/notification/routing/{routingId}");

print_r($result);
?>
```

## Update a routing

`PUT /v2/notification/routing/{routingId}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#put-notification-routing-routingid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/routing/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routingId` | path | string (uuid) | yes | Routing ID |

### Request body (required)

Type: `notification.routing.Routing`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `active` | boolean |  | Whether this routing is currently active |
| `createdAt` | string (date-time) | read-only | Date at which the routing was created |
| `id` | string (uuid) | read-only | Unique identifier of the routing |
| `name` | string |  | Name of the routing |
| `rules` | notification.routing.Rule[] |  | Type of the contact mean |
| `rules[].condition` | notification.routing.RuleCondition | yes | Condition for the route to match |
| `rules[].condition.category` | string[] |  | Notification categories, the rule will be valid if one of the categories matches, if not empty |
| `rules[].condition.priority` | string[] |  | Notification priorities, the rule will be valid if one of the priorities matches, if not empty |
| `rules[].contactMeans` | notification.routing.RuleContactMean[] | yes | Contact means to route the nofitications to |
| `rules[].contactMeans[].email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `rules[].contactMeans[].error` | string | read-only | When status is ERROR, details about the error |
| `rules[].contactMeans[].id` | string (uuid) | yes | Identifier of the contact mean |
| `rules[].contactMeans[].status` | notification.contactMean.StatusEnum | read-only | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `rules[].contactMeans[].type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |
| `rules[].continue` | boolean | yes | Wheter the processing stops at this rule, if it matches |

```json
{
  "active": true,
  "name": "string",
  "rules": [
    {
      "condition": {
        "category": [
          "string"
        ],
        "priority": [
          "string"
        ]
      },
      "contactMeans": [
        {
          "id": "00000000-0000-0000-0000-000000000000"
        }
      ],
      "continue": true
    }
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | notification.routing.Routing | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `active` | boolean |  | Whether this routing is currently active |
| `createdAt` | string (date-time) | read-only | Date at which the routing was created |
| `id` | string (uuid) | read-only | Unique identifier of the routing |
| `name` | string |  | Name of the routing |
| `rules` | notification.routing.Rule[] |  | Type of the contact mean |
| `rules[].condition` | notification.routing.RuleCondition | yes | Condition for the route to match |
| `rules[].condition.category` | string[] |  | Notification categories, the rule will be valid if one of the categories matches, if not empty |
| `rules[].condition.priority` | string[] |  | Notification priorities, the rule will be valid if one of the priorities matches, if not empty |
| `rules[].contactMeans` | notification.routing.RuleContactMean[] | yes | Contact means to route the nofitications to |
| `rules[].contactMeans[].email` | string | read-only | When type is EMAIL, the email address this contact mean uses |
| `rules[].contactMeans[].error` | string | read-only | When status is ERROR, details about the error |
| `rules[].contactMeans[].id` | string (uuid) | yes | Identifier of the contact mean |
| `rules[].contactMeans[].status` | notification.contactMean.StatusEnum | read-only | Status of the contact mean — one of `DISABLED`, `ERROR`, `TO_VALIDATE`, `VALID` |
| `rules[].contactMeans[].type` | notification.contactMean.TypeEnum | read-only | Type of the contact mean — one of `EMAIL` |
| `rules[].continue` | boolean | yes | Wheter the processing stops at this rule, if it matches |

```json
{
  "active": true,
  "createdAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "rules": [
    {
      "condition": {
        "category": [
          "string"
        ],
        "priority": [
          "string"
        ]
      },
      "contactMeans": [
        {
          "email": "string",
          "error": "string",
          "id": "00000000-0000-0000-0000-000000000000",
          "status": "DISABLED",
          "type": "EMAIL"
        }
      ],
      "continue": true
    }
  ]
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/notification/routing/{routingId}" \
  -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: notification.routing.Routing
result = client.put("/v2/notification/routing/{routingId}",
	active = None, # Whether this routing is currently active (type: boolean)
	name = None, # Name of the routing (type: string)
	rules = None, # Type of the contact mean (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: notification.routing.Routing
$result = $ovh->put("/v2/notification/routing/{routingId}", array(
	active => null, // Whether this routing is currently active (type: boolean)
	name => null, // Name of the routing (type: string)
	rules => null, // Type of the contact mean (type: array)
));

print_r($result);
?>
```

## Delete the routing

`DELETE /v2/notification/routing/{routingId}`

Link: https://developers.eu.ovhcloud.com/reference/misc/notifications/#delete-notification-routing-routingid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:notification/routing/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routingId` | path | string (uuid) | yes | Routing ID |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/notification/routing/{routingId}" \
  -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("/v2/notification/routing/{routingId}")

# 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("/v2/notification/routing/{routingId}");

print_r($result);
?>
```
