You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+147-1Lines changed: 147 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ need a Vonage account. Sign up [for free at vonage.com][signup].
20
20
-[Verify V1 API](#verify-v1-api)
21
21
-[Number Insight API](#number-insight-api)
22
22
-[Account API](#account-api)
23
+
-[Subaccounts API](#subaccounts-api)
23
24
-[Number Management API](#number-management-api)
24
25
-[Pricing API](#pricing-api)
25
26
-[Managing Secrets](#managing-secrets)
@@ -408,7 +409,7 @@ When using the `connect` action, use the parameter `from_` to specify the recipi
408
409
409
410
## Verify V2 API
410
411
411
-
V2 of the Vonage Verify API lets you send verification codes via SMS, WhatsApp, Voice and Email
412
+
V2 of the Vonage Verify API lets you send verification codes via SMS, WhatsApp, Voice and Email.
412
413
413
414
You can also verify a user by WhatsApp Interactive Message or by Silent Authentication on their mobile device.
414
415
@@ -618,6 +619,150 @@ This feature is only enabled when you enable auto-reload for your account in the
618
619
client.account.topup(trx=transaction_reference)
619
620
```
620
621
622
+
## Subaccounts API
623
+
624
+
This API is used to create and configure subaccounts related to your primary account and transfer credit, balances and bought numbers between accounts.
625
+
626
+
The subaccounts API is disabled by default. If you want to use subaccounts, [contact support](https://api.support.vonage.com) to have the API enabled on your account.
All fields are optional. If `start_date` or `end_date` are used, the dates must be specified in UTC ISO 8601 format, e.g. `1970-01-01T00:00:00Z`. Don't use milliseconds.
667
+
668
+
```python
669
+
client.subaccounts.list_credit_transfers(
670
+
start_date='2022-03-29T14:16:56Z',
671
+
end_date='2023-06-12T17:20:01Z',
672
+
subaccount=SUBACCOUNT_API_KEY, # Use to show only the results that contain this key
673
+
)
674
+
```
675
+
676
+
### Transfer credit between accounts
677
+
678
+
Transferring credit is only possible for postpaid accounts, i.e. accounts that can have a negative balance. For prepaid and self-serve customers, account balances can be transferred between accounts (see below).
679
+
680
+
```python
681
+
client.subaccounts.transfer_credit(
682
+
from_=FROM_ACCOUNT,
683
+
to=TO_ACCOUNT,
684
+
amount=0.50,
685
+
reference='test credit transfer',
686
+
)
687
+
```
688
+
689
+
### List balance transfers between accounts
690
+
691
+
All fields are optional. If `start_date` or `end_date` are used, the dates must be specified in UTC ISO 8601 format, e.g. `1970-01-01T00:00:00Z`. Don't use milliseconds.
692
+
693
+
```python
694
+
client.subaccounts.list_balance_transfers(
695
+
start_date='2022-03-29T14:16:56Z',
696
+
end_date='2023-06-12T17:20:01Z',
697
+
subaccount=SUBACCOUNT_API_KEY, # Use to show only the results that contain this key
698
+
)
699
+
```
700
+
701
+
### Transfer account balances between accounts
702
+
703
+
```python
704
+
client.subaccounts.transfer_balance(
705
+
from_=FROM_ACCOUNT,
706
+
to=TO_ACCOUNT,
707
+
amount=0.50,
708
+
reference='test balance transfer',
709
+
)
710
+
```
711
+
712
+
### Transfer bought phone numbers between accounts
0 commit comments