Methods

Objects

account/sub

Manage Sub Accounts.

Method Description
account/sub.archive Archive a disabled Sub Account. The method is asynchronous. You can us...
account/sub.create Create a Sub Account.
account/sub.disable Disable an enabled Sub Account.
account/sub.edit Edit a Sub Account.
account/sub.enable Enable a desactivated an not archived Sub Account.
account/sub.get Get informations on a Sub Account.
account/sub.get_quota Get quota informations from the Master Account.
account/sub.search Search through Sub Accounts.
account/sub.transfer_credit Tranfer credit from/to a Sub Account to another one or the Master Acco...
account/sub.transfer_dids Tranfer dids from/to a Sub Account to another one or the Master Accoun...
account/sub.unarchive Unarchive an archived Sub Account (and keep it disabled).

Methods

account/sub.archive

Description

Archive a disabled Sub Account. The method is asynchronous. You can use "jobs.get" to check the status of the job. Or use a Webhook on "job.status_update".

Signature

method: account/sub.archive

params: [string id, object options]

Parameters

Parameter Type Description NULL
id string Sub Account ID
Format: hash (Unique object identifier)
NO
options object Reserved for future use YES

Result

Type Description Format/Object
string Job ID Format: hid (Unique object identifier)

See Also

account/sub.create

Description

Create a Sub Account.

Signature

method: account/sub.create

params: [object properties, object options]

Parameters

Parameter Type Description NULL
properties object Object properties
Object: SubAccount.CreateProperties
NO
options object Object options
Object: SubAccount.CreateOptions
NO

Result

Type Description Format/Object
object SubAccount The created Sub Account Object: SubAccount

account/sub.disable

Description

Disable an enabled Sub Account.

Signature

method: account/sub.disable

params: [string id]

Parameters

Parameter Type Description NULL
id string Sub Account ID
Format: hash (Unique object identifier)
NO

Result

Type Description Format/Object
bool Always TRUE (throws an Exception otherwise).

account/sub.edit

Description

Edit a Sub Account.

Signature

method: account/sub.edit

params: [string id, object properties, object options]

Parameters

Parameter Type Description NULL
id string Sub Account ID
Format: hash (Unique object identifier)
NO
properties object Object properties
Object: SubAccount.EditProperties
NO
options object Object options
Object: SubAccount.EditOptions
NO

Result

Type Description Format/Object
object SubAccount Object Object: SubAccount

account/sub.enable

Description

Enable a desactivated an not archived Sub Account.

Signature

method: account/sub.enable

params: [string id]

Parameters

Parameter Type Description NULL
id string Sub Account ID
Format: hash (Unique object identifier)
NO

Result

Type Description Format/Object
bool Always TRUE (throws an Exception otherwise).

account/sub.get

Description

Get informations on a Sub Account.

Signature

method: account/sub.get

params: [string id]

Parameters

Parameter Type Description NULL
id string Sub Account ID
Format: hash (Unique object identifier)
NO

Result

Type Description Format/Object
object SubAccount Object Object: SubAccount

account/sub.get_quota

Description

Get quota informations from the Master Account.

Signature

method: account/sub.get_quota

params: []

Parameters

No parameters.

Result

Type Description Format/Object
object Quota informations Object: SubAccount.Quota

account/sub.search

Description

Search through Sub Accounts.

Signature

method: account/sub.search

params: [object filters, object options]

Parameters

Parameter Type Description NULL
filters object Search filters
Object: SubAccount.SearchFilters
NO
options object Search options
Object: Search.Options
NO

Result

Type Description Format/Object
object Search results Object: Search.Results

account/sub.transfer_credit

Description

Tranfer credit from/to a Sub Account to another one or the Master Account.

Signature

method: account/sub.transfer_credit

params: [string from_id, string to_id, string amount, object options]

Parameters

Parameter Type Description NULL
from_id string From Account ID
Format: hash (Unique object identifier)
NO
to_id string To another Account ID
Format: hash (Unique object identifier)
NO
amount string The amount of credit
Format: amount (amount in cents with 2 decimals. Example : "1000.00" for 10 USD or EUR)
NO
options object Object options
Object: SubAccount.TransferOptions
NO

Result

Type Description Format/Object
bool Always TRUE (throws an Exception otherwise).

account/sub.transfer_dids

Description

Tranfer dids from/to a Sub Account to another one or the Master Account.

Signature

method: account/sub.transfer_dids

params: [string from_id, string to_id, array dids]

Parameters

Parameter Type Description NULL
from_id string From Account ID
Format: hash (Unique object identifier)
NO
to_id string To another Account ID
Format: hash (Unique object identifier)
NO
dids array Multiple DIDs to transfer
Format: hash (Unique object identifier)
NO

Result

Type Description Format/Object
bool Always TRUE (throws an Exception otherwise).

account/sub.unarchive

Description

Unarchive an archived Sub Account (and keep it disabled).

Signature

method: account/sub.unarchive

params: [string id]

Parameters

Parameter Type Description NULL
id string Sub Account ID
Format: hash (Unique object identifier)
NO

Result

Type Description Format/Object
bool Always TRUE (throws an Exception otherwise).