# Misc › Support 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

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

Page: https://developers.eu.ovhcloud.com/reference/misc/support/

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

## Operations

- `GET /me/supportLevel` — Fetch the support level of the account
- `GET /support/tickets` — List support tickets identifiers for this service
- `POST /support/tickets/create` — Create a new ticket
- `GET /support/tickets/{ticketId}` — Get ticket
- `GET /support/tickets/{ticketId}/canBeScored` — Checks whether ticket can be scored
- `POST /support/tickets/{ticketId}/close` — Close ticket
- `GET /support/tickets/{ticketId}/messages` — Get ticket messages
- `POST /support/tickets/{ticketId}/reopen` — Reopen a ticket
- `POST /support/tickets/{ticketId}/reply` — Reply to ticket
- `POST /support/tickets/{ticketId}/score` — Set ticket score

## Fetch the support level of the account

`GET /1.0/me/supportLevel`

Link: https://developers.eu.ovhcloud.com/reference/misc/support/#get-me-supportlevel

**Status:** Beta version  
**IAM actions:** `account:apiovh:me/supportLevel/get`

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.SupportLevel.Level | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `level` | me.SupportLevel.LevelTypeEnum | read-only | Level of support — one of `business`, `enterprise`, `premium`, `premium-accredited`, `standard` |

```json
{
  "level": "business"
}
```

### Example

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

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

print_r($result);
?>
```

## List support tickets identifiers for this service

`GET /1.0/support/tickets`

Link: https://developers.eu.ovhcloud.com/reference/misc/support/#get-support-tickets

**Status:** Stable production version  
**IAM actions:** `account:apiovh:support/tickets/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `archived` | query | boolean |  | Search archived tickets |
| `category` | query | support.TicketCategoryEnum |  | Search by ticket category — one of `assistance`, `billing`, `incident` |
| `customerReplyNeeded` | query | boolean |  | Tickets pending a customer reply |
| `excludeAutogenerated` | query | boolean |  | Exclude auto-generated tickets |
| `maxCreationDate` | query | string (date-time) |  | Maximum creation date |
| `minCreationDate` | query | string (date-time) |  | Minimum creation date |
| `page` | query | integer |  | Page of tickets to fetch (only if pageSize is defined) |
| `pageSize` | query | integer |  | Number of ticket to fetch |
| `product` | query | support.TicketProductEnum |  | Search by ticket product — one of `adsl`, `cdn`, `dedicated`, `dedicated-billing`, `dedicated-other`, `dedicatedcloud`, `domain`, `exchange`, `fax`, `hosting`, `housing`, `iaas`, … |
| `serviceName` | query | string |  | Ticket message service name |
| `status` | query | support.TicketStatusEnum |  | Status of ticket — one of `closed`, `open`, `unknown` |
| `subject` | query | string |  | Search by ticket subject |
| `ticketNumber` | query | string |  | Search by ticket number |

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/support/tickets" \
  -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("/support/tickets")

# 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("/support/tickets");

print_r($result);
?>
```

## Create a new ticket

`POST /1.0/support/tickets/create`

Link: https://developers.eu.ovhcloud.com/reference/misc/support/#post-support-tickets-create

**Status:** Stable production version  
**IAM actions:** `account:apiovh:support/tickets/create`

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `body` | string | yes | Ticket message body |
| `category` | support.TicketCategoryEnum |  | Ticket message category — one of `assistance`, `billing`, `incident` |
| `impact` | support.TicketImpactUrgencyEnum |  | Ticket impact (reserved for Business or Enterprise support level accounts) — one of `high`, `low`, `medium` |
| `product` | support.TicketProductEnum |  | Ticket message product — one of `adsl`, `cdn`, `dedicated`, `dedicated-billing`, `dedicated-other`, `dedicatedcloud`, `domain`, `exchange`, `fax`, `hosting`, `housing`, `iaas`, … |
| `serviceName` | string |  | Ticket message service name |
| `subcategory` | support.TicketSubCategoryEnum |  | Ticket message subcategory — one of `alerts`, `autorenew`, `bill`, `down`, `inProgress`, `new`, `other`, `perfs`, `start`, `usage` |
| `subject` | string | yes | Ticket message subject |
| `type` | support.TicketTypeEnum |  | DEPRECATED - Ticket type (criticalIntervention requires VIP support level) — one of `criticalIntervention`, `genericRequest` |
| `urgency` | support.TicketImpactUrgencyEnum |  | Ticket urgency (reserved for Business or Enterprise support level accounts) — one of `high`, `low`, `medium` |
| `watchers` | string[] |  | List of e-mail addresses to notify on ticket updates (max. 10) |

```json
{
  "body": "string",
  "category": "assistance",
  "impact": "high",
  "product": "adsl",
  "serviceName": "string",
  "subcategory": "alerts",
  "subject": "string",
  "type": "criticalIntervention",
  "urgency": "high",
  "watchers": [
    "string"
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | support.NewMessageInfo | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalNotice` | string |  | Notice or warning |
| `messageId` | integer |  | Message identifier |
| `ticketId` | integer |  | Ticket identifier |
| `ticketNumber` | integer |  | Ticket external number |

```json
{
  "additionalNotice": "string",
  "messageId": 0,
  "ticketId": 0,
  "ticketNumber": 0
}
```

### Example

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

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

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

result = client.post("/support/tickets/create",
	body = None, # Ticket message body (type: text)
	category = None, # Ticket message category (type: support.TicketCategoryEnum, nullable)
	impact = None, # Ticket impact (reserved for Business or Enterprise support level accounts) (type: support.TicketImpactUrgencyEnum, nullable)
	product = None, # Ticket message product (type: support.TicketProductEnum, nullable)
	serviceName = None, # Ticket message service name (type: string, nullable)
	subcategory = None, # Ticket message subcategory (type: support.TicketSubCategoryEnum, nullable)
	subject = None, # Ticket message subject (type: string)
	type = None, # DEPRECATED - Ticket type (criticalIntervention requires VIP support level) (type: support.TicketTypeEnum, nullable)
	urgency = None, # Ticket urgency (reserved for Business or Enterprise support level accounts) (type: support.TicketImpactUrgencyEnum, nullable)
	watchers = None, # List of e-mail addresses to notify on ticket updates (max. 10) (type: string[], nullable)
)

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

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

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

$result = $ovh->post("/support/tickets/create", array(
	body => null, // Ticket message body (type: text)
	category => null, // Ticket message category (type: support.TicketCategoryEnum, nullable)
	impact => null, // Ticket impact (reserved for Business or Enterprise support level accounts) (type: support.TicketImpactUrgencyEnum, nullable)
	product => null, // Ticket message product (type: support.TicketProductEnum, nullable)
	serviceName => null, // Ticket message service name (type: string, nullable)
	subcategory => null, // Ticket message subcategory (type: support.TicketSubCategoryEnum, nullable)
	subject => null, // Ticket message subject (type: string)
	type => null, // DEPRECATED - Ticket type (criticalIntervention requires VIP support level) (type: support.TicketTypeEnum, nullable)
	urgency => null, // Ticket urgency (reserved for Business or Enterprise support level accounts) (type: support.TicketImpactUrgencyEnum, nullable)
	watchers => null, // List of e-mail addresses to notify on ticket updates (max. 10) (type: string[], nullable)
));

print_r($result);
?>
```

## Get ticket

`GET /1.0/support/tickets/{ticketId}`

Link: https://developers.eu.ovhcloud.com/reference/misc/support/#get-support-tickets-ticketid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:support/tickets/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ticketId` | path | integer | yes | internal identifier ticket |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | support.Ticket | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accountId` | string |  | Customer account identifier |
| `canBeClosed` | boolean |  | Can this ticket be closed or not |
| `category` | support.TicketCategoryEnum |  | Ticket request category — one of `assistance`, `billing`, `incident` |
| `creationDate` | string (date-time) |  | Ticket creation date |
| `lastMessageFrom` | support.MessageSenderEnum |  | Sender type of last message — one of `customer`, `support` |
| `product` | support.TicketProductEnum |  | Product service concerned by ticket — one of `adsl`, `cdn`, `dedicated`, `dedicated-billing`, `dedicated-other`, `dedicatedcloud`, `domain`, `exchange`, `fax`, `hosting`, `housing`, `iaas`, … |
| `score` | string |  | Ticket score |
| `serviceName` | string |  | Name of service concerned by ticket |
| `state` | support.TicketStatusEnum |  | State of ticket — one of `closed`, `open`, `unknown` |
| `subject` | string |  | Ticket subject |
| `ticketId` | integer |  | Ticket identifier |
| `ticketNumber` | integer |  | Ticket external number |
| `type` | support.TicketTypeEnum |  | Ticket type — one of `criticalIntervention`, `genericRequest` |
| `updateDate` | string (date-time) |  | Ticket last update date |

```json
{
  "accountId": "string",
  "canBeClosed": true,
  "category": "assistance",
  "creationDate": "2024-01-01T12:00:00Z",
  "lastMessageFrom": "customer",
  "product": "adsl",
  "score": "string",
  "serviceName": "string",
  "state": "closed",
  "subject": "string",
  "ticketId": 0,
  "ticketNumber": 0,
  "type": "criticalIntervention",
  "updateDate": "2024-01-01T12:00:00Z"
}
```

### Example

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

# 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("/support/tickets/{ticketId}");

print_r($result);
?>
```

## Checks whether ticket can be scored

`GET /1.0/support/tickets/{ticketId}/canBeScored`

Link: https://developers.eu.ovhcloud.com/reference/misc/support/#get-support-tickets-ticketid-canbescored

**Status:** Stable production version  
**IAM actions:** `account:apiovh:support/tickets/canBeScored/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ticketId` | path | integer | yes | internal ticket identifier |

### Responses

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

```json
true
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/support/tickets/{ticketId}/canBeScored" \
  -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("/support/tickets/{ticketId}/canBeScored")

# 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("/support/tickets/{ticketId}/canBeScored");

print_r($result);
?>
```

## Close ticket

`POST /1.0/support/tickets/{ticketId}/close`

Link: https://developers.eu.ovhcloud.com/reference/misc/support/#post-support-tickets-ticketid-close

**Status:** Stable production version  
**IAM actions:** `account:apiovh:support/tickets/close`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ticketId` | path | integer | yes | internal ticket identifier |

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/support/tickets/{ticketId}/close" \
  -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("/support/tickets/{ticketId}/close")

# 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("/support/tickets/{ticketId}/close");

print_r($result);
?>
```

## Get ticket messages

`GET /1.0/support/tickets/{ticketId}/messages`

Link: https://developers.eu.ovhcloud.com/reference/misc/support/#get-support-tickets-ticketid-messages

**Status:** Stable production version  
**IAM actions:** `account:apiovh:support/tickets/messages/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ticketId` | path | integer | yes | internal ticket identifier |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | support.Message[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `body` | string |  | Message body |
| `creationDate` | string (date-time) |  | Message creation date |
| `from` | support.MessageSenderEnum |  | Message sender type — one of `customer`, `support` |
| `messageId` | integer |  | Message identifier |
| `ticketId` | integer |  | Ticket identifier |
| `updateDate` | string (date-time) |  | Message last update date |

```json
[
  {
    "body": "string",
    "creationDate": "2024-01-01T12:00:00Z",
    "from": "customer",
    "messageId": 0,
    "ticketId": 0,
    "updateDate": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/support/tickets/{ticketId}/messages" \
  -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("/support/tickets/{ticketId}/messages")

# 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("/support/tickets/{ticketId}/messages");

print_r($result);
?>
```

## Reopen a ticket

`POST /1.0/support/tickets/{ticketId}/reopen`

Link: https://developers.eu.ovhcloud.com/reference/misc/support/#post-support-tickets-ticketid-reopen

**Status:** Stable production version  
**IAM actions:** `account:apiovh:support/tickets/reopen`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ticketId` | path | integer | yes | internal ticket identifier |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `body` | string | yes | ticket reopen reason |

```json
{
  "body": "string"
}
```

### Responses

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

### Example

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

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

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

# Request body type: text
result = client.post("/support/tickets/{ticketId}/reopen",
	body = None, # ticket reopen reason (type: text)
)

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

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

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

// Request body type: text
$result = $ovh->post("/support/tickets/{ticketId}/reopen", array(
	body => null, // ticket reopen reason (type: text)
));

print_r($result);
?>
```

## Reply to ticket

`POST /1.0/support/tickets/{ticketId}/reply`

Link: https://developers.eu.ovhcloud.com/reference/misc/support/#post-support-tickets-ticketid-reply

**Status:** Stable production version  
**IAM actions:** `account:apiovh:support/tickets/reply`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ticketId` | path | integer | yes | internal ticket identifier |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `body` | string | yes | text body of ticket response |

```json
{
  "body": "string"
}
```

### Responses

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

### Example

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

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

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

# Request body type: text
result = client.post("/support/tickets/{ticketId}/reply",
	body = None, # text body of ticket response (type: text)
)

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

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

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

// Request body type: text
$result = $ovh->post("/support/tickets/{ticketId}/reply", array(
	body => null, // text body of ticket response (type: text)
));

print_r($result);
?>
```

## Set ticket score

`POST /1.0/support/tickets/{ticketId}/score`

Link: https://developers.eu.ovhcloud.com/reference/misc/support/#post-support-tickets-ticketid-score

**Status:** Stable production version  
**IAM actions:** `account:apiovh:support/tickets/score`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ticketId` | path | integer | yes | internal ticket identifier |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `score` | string | yes | ticket score |
| `scoreComment` | string |  | ticket comment about the score |

```json
{
  "score": "string",
  "scoreComment": "string"
}
```

### Responses

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

### Example

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

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

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

result = client.post("/support/tickets/{ticketId}/score",
	score = None, # ticket score (type: string)
	scoreComment = None, # ticket comment about the score (type: text, nullable)
)

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

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

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

$result = $ovh->post("/support/tickets/{ticketId}/score", array(
	score => null, // ticket score (type: string)
	scoreComment => null, // ticket comment about the score (type: text, nullable)
));

print_r($result);
?>
```
