Accounts
Description
Accounts are used to represent users in Hautech AI
Methods
create
Creates an account
Props
Name | Type | Required | Description |
---|---|---|---|
externalId | string | No | External identifier to associate with the created account |
Returns
Promise<Account>
Example
const account = await client.accounts.create({ externalId: '123' });
get
Gets an account by ID
Props
Name | Type | Required | Description |
---|---|---|---|
id | string | Yes | The ID of the account to get |
external | boolean | No | Whether provided ID is external or not |
Returns
Promise<Account | undefined>
Example
const account = await client.accounts.get({ id: '123' });
// or
const account = await client.accounts.get({ id: '123', external: true });
Types
Account
Property | Type | Description |
---|---|---|
balance | string | The balance associated with the account |
id | string | The unique identifier for the account |