Delete a sub-account
curl --request DELETE \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deleteUsers": false,
"subAccountId": "<string>"
}
'const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({deleteUsers: false, subAccountId: '<string>'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}"
payload = {
"deleteUsers": False,
"subAccountId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}"
payload := strings.NewReader("{\n \"deleteUsers\": false,\n \"subAccountId\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Sub-accounts
Delete a sub-account
Remove a sub-account group from your business. The default sub-account cannot be deleted. By default, users in the group are moved to the default sub-account. Pass subAccountId to move them elsewhere instead. Set deleteUsers to true to soft-delete all users in the group.
DELETE
/
api
/
v1
/
sub-accounts
/
{id}
Delete a sub-account
curl --request DELETE \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deleteUsers": false,
"subAccountId": "<string>"
}
'const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({deleteUsers: false, subAccountId: '<string>'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}"
payload = {
"deleteUsers": False,
"subAccountId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}"
payload := strings.NewReader("{\n \"deleteUsers\": false,\n \"subAccountId\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Authorizations
Bearer JWT issued to your business account during onboarding
Path Parameters
Body
application/json
Response
200
Sub-account deleted successfully