# Problem api post renew domain

**URL:** https://community.ovhcloud.com/t/problem-api-post-renew-domain/26265
**Category:** Breves de comptoir
**Created:** [Novembre 4, 2020, 12:52 UTC](https://community.ovhcloud.com/t/problem-api-post-renew-domain/26265 "2020-11-04T12:52:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ClaudioS](https://community.ovhcloud.com/letter_avatar/claudios/32/5_5575768a8748004e209b776fc1b2916d.png) [@ClaudioS](https://community.ovhcloud.com/u/ClaudioS)
#### Post date: [Novembre 4, 2020, 12:52 UTC](https://community.ovhcloud.com/t/problem-api-post-renew-domain/26265/1 "2020-11-04T12:52:12Z")

</div>

Hello, I have a problem with the ovh api, I would like to integrate in our CRM the possibility of renewing domains directly using the API, following the guides I am trying this script to renew the service linked to a domain but I receive an error.  
  
{"message":"[services] ServiceId Data is not an array for an array type"}  
  
require **DIR**. '/vendor/autoload.php';  
use \Ovh\Api;  
  
 $ovh = new Api( $applicationKey,  
 $applicationSecret,  
 $endpoint,  
 $consumer\_key);  
  
 //$result = $ovh-\>get('/service/14991863/renew', array(  
 // 'includeOptions' =\> false, // Include service's option(s) (type: boolean)  
 //));  
  
 try {  
 $result = $ovh-\>post('/service/14991863/renew', array(  
 'dryRun' =\> false, // Indicates if renew order is generated (type: boolean)  
 'duration' =\> 'P1Y', // Renew duration (type: string)  
 'services' =\> '[14991863]', // List of services to renew (type: long)  
 ));  
 } catch (GuzzleHttp\Exception\ClientException $e) {  
 $response = $e-\>getResponse();  
 $responseBodyAsString = $response-\>getBody()-\>getContents();  
 echo $responseBodyAsString;  
 }
