Entity accounts
curl --request GET \
--url http://api.gu1.ai/entities/{id}/accounts \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/entities/{id}/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/entities/{id}/accounts', 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 => "http://api.gu1.ai/entities/{id}/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://api.gu1.ai/entities/{id}/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/entities/{id}/accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/entities/{id}/accounts")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAPI Reference
Entity accounts
Register and manage financial accounts owned by a person or company entity.
GET
/
entities
/
{id}
/
accounts
Entity accounts
curl --request GET \
--url http://api.gu1.ai/entities/{id}/accounts \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/entities/{id}/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/entities/{id}/accounts', 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 => "http://api.gu1.ai/entities/{id}/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://api.gu1.ai/entities/{id}/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/entities/{id}/accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/entities/{id}/accounts")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyOverview
Accounts are child resources of person and company entities. Use them to register multiple accounts per customer, including accounts in different currencies. Every account has a client-definedexternalId, an ISO 4217 currency, and at least one payment identifier. Account data is isolated to the current organization.
Endpoints
| Method | Path | Purpose |
|---|---|---|
GET | /entities/{id}/accounts | List the entity accounts |
POST | /entities/{id}/accounts | Create an account |
PATCH | /entities/{id}/accounts/{accountId} | Update an account |
DELETE | /entities/{id}/accounts/{accountId} | Delete an account |
entities:read. Mutations require entities:edit with the legacy entities:write fallback.
Account fields
| Field | Type | Required | Description |
|---|---|---|---|
externalId | string | Yes | Account identifier in your system; unique within the organization |
currency | string | Yes | ISO 4217 code, such as USD, ARS, or BRL |
accountType | string | No | Client-defined type, such as checking, savings, or wallet |
status | string | No | active, inactive, frozen, or closed; default active |
countryCode | string | No | ISO 3166-1 alpha-2 country |
accountNumber | string | Conditional | Generic account number |
cbu | string | Conditional | 22-digit CBU |
cvu | string | Conditional | 22-digit CVU |
iban | string | Conditional | IBAN, up to 34 characters |
alias | string | Conditional | Account alias |
bankName | string | No | Bank or financial institution |
bankCode | string | No | Client-defined bank code |
isPrimary | boolean | No | Primary account for the entity and currency |
metadata | object | No | Client-specific additional data |
openedAt | string | No | ISO 8601 opening timestamp |
closedAt | string | No | ISO 8601 closing timestamp |
accountNumber, cbu, cvu, iban, or alias is required when creating an account.
Create example
curl -X POST "https://api.gu1.ai/entities/550e8400-e29b-41d4-a716-446655440000/accounts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalId": "account-usd-001",
"currency": "USD",
"accountType": "savings",
"accountNumber": "ACC-001",
"countryCode": "AR",
"isPrimary": true
}'
{
"success": true,
"account": {
"id": "77c2ca62-4528-4d2e-a424-ff7c0ee7ab18",
"entityId": "550e8400-e29b-41d4-a716-446655440000",
"externalId": "account-usd-001",
"currency": "USD",
"accountType": "savings",
"status": "active",
"accountNumber": "ACC-001",
"isPrimary": true
}
}
isPrimary: true removes the primary flag from other accounts of the same entity and currency.
Errors
| HTTP | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | Input is invalid or no payment identifier remains |
404 | NOT_FOUND | Entity or account does not exist in the current organization |
409 | CONFLICT | externalId already exists in the current organization |
Was this page helpful?