Skip to main content

Accounts

Description

Accounts are used to represent users in Hautech AI

Methods

create

Creates an account

Props

NameTypeRequiredDescription
externalIdstringNoExternal 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

NameTypeRequiredDescription
idstringYesThe ID of the account to get
externalbooleanNoWhether 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

PropertyTypeDescription
balancestringThe balance associated with the account
idstringThe unique identifier for the account