Create a sub-account group
curl --request POST \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sales Team"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Sales Team'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts', 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"
payload = { "name": "Sales Team" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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"
payload := strings.NewReader("{\n \"name\": \"Sales Team\"\n}")
req, _ := http.NewRequest("POST", 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))
}{
"id": "<string>"
}Sub-accounts
Create a sub-account group
Create an optional group to organize end users under your business, for example by team, region, or customer segment. Returns the new group id. You can skip this step and use the default group created for your business.
POST
/
api
/
v1
/
sub-accounts
Create a sub-account group
curl --request POST \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sales Team"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Sales Team'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts', 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"
payload = { "name": "Sales Team" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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"
payload := strings.NewReader("{\n \"name\": \"Sales Team\"\n}")
req, _ := http.NewRequest("POST", 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))
}{
"id": "<string>"
}