Account Groups
Remove Account from Group
Detaches an account from an account group without deleting the account
DELETE
/
organizations
/
account-groups
/
{account_group_id}
/
accounts
/
{account_id}
Remove Account from Group
curl --request DELETE \
--url https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id} \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}"
headers = {
"PUBLIC-API-KEY": "<api-key>",
"PRIVATE-SECRET-KEY": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'PUBLIC-API-KEY': '<api-key>', 'PRIVATE-SECRET-KEY': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"PRIVATE-SECRET-KEY: <api-key>",
"PUBLIC-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("PUBLIC-API-KEY", "<api-key>")
req.Header.Add("PRIVATE-SECRET-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["PUBLIC-API-KEY"] = '<api-key>'
request["PRIVATE-SECRET-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "LAST_ACCOUNT_IN_GROUP",
"messages": [
"A group must contain at least one account"
]
}Detaches an account from an account group. The account is not deleted or disabled — it becomes a standalone account of your organization and can be attached to another group later. A group must always keep at least one account, so the last account cannot be removed this way — move it into another group or delete the account instead.
Authorizations
Path Parameters
Account group UUID.
UUID of the account to detach. It must currently belong to this group.
Response
No Content — the account was detached from the group.
Was this page helpful?
⌘I
Remove Account from Group
curl --request DELETE \
--url https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id} \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}"
headers = {
"PUBLIC-API-KEY": "<api-key>",
"PRIVATE-SECRET-KEY": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'PUBLIC-API-KEY': '<api-key>', 'PRIVATE-SECRET-KEY': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"PRIVATE-SECRET-KEY: <api-key>",
"PUBLIC-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("PUBLIC-API-KEY", "<api-key>")
req.Header.Add("PRIVATE-SECRET-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/organizations/account-groups/{account_group_id}/accounts/{account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["PUBLIC-API-KEY"] = '<api-key>'
request["PRIVATE-SECRET-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "LAST_ACCOUNT_IN_GROUP",
"messages": [
"A group must contain at least one account"
]
}