For the complete documentation index, see llms.txt. This page is also available as Markdown.

Manage Sub-account Credits

This request is used to create a sub-account.

Add credits

From your account, you can add credits to your sub-accounts. The credits will be debited from your main account.

URL

POST https://api.voicepartner.fr/v1/subaccount/credit/add

Rate limit: 30 requests / 60 seconds (see Rate limiting))

Required Parameters

Name
Value

credit

Amount of credit in euros to add to the sub-account

tokenSubaccount

Sub-account identifier

Requests

<?php
        // Prepare data for POST request
        $fields = array(
            'apiKey'=> 'YOUR API KEY',
            'credit'=> '100',
            'tokenSubaccount'=>'sub-account identifier'
            );
 
 
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL,'https://api.voicepartner.fr/v1/subaccount/credit/add');
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_TIMEOUT, 10);
        curl_setopt($curl, CURLOPT_POST, 1);
        curl_setopt($curl, CURLOPT_POSTFIELDS,json_encode($fields));
 
        $result = curl_exec($curl);
        curl_close($curl);
 
        // Process your response here
        echo $result;
?>

Response

Errors

Error Codes

Response Code
Message

1

The API key is required

2

The credit is required

3

The sub-account identifier is required

4

You do not have permission

5

The credit to assign must be greater than 0

6

The balance must be greater than 0

7

The sub-account does not exist

8

Insufficient credit

10

Invalid API key

200

Everything went fine!

Remove credits

From your account, you can remove credits from your sub-accounts. The credits will be added to your main account.

URL

POST https://api.voicepartner.fr/v1/subaccount/credit/remove

Required Parameters

Name
Value

credit

Amount of credit in euros to remove from the sub-account

tokenSubaccount

Sub-account identifier

Requests

Response

Errors

Error Codes

Response Code
Message

1

The API key is required

2

The credit is required

3

The sub-account identifier is required

4

You do not have permission

5

The credit to assign must be greater than 0

6

The balance must be greater than 0

7

The sub-account does not exist

8

Insufficient credit

10

Invalid API key

200

Everything went fine!

Last updated