Appearance
User
The current user, look up users, and list workspace members.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
v3.user.data.export | workspaceIds: string[], options: { omitFileContents?: boolean, omitActivities?: boolean, omitDiscussions?: boolean, fileTypes?: string[] } | unknown |
v3.user.data.export.workspaces | Credentials to use against the source server | object[] |
v3.user.data.import | Credentials to use against the source server, options | unknown |
v3.user.entraUser | username: string | object |
v3.user.permissions | userId?: string, workspaceId?: string, opts?: { details?: boolean, items?: { workflowIds?: string[], calendarIds?: string[], insightIds?: string[] } } | object |
v3.user.register | data: { email: string, firstname: string, lastname: string, password?: string, acceptConditions: boolean, acceptMarketing?: boolean, language: string, preferredDomain?: string } | object |
v3.user.remove | - | boolean |
v3.user.setBot | data: { uid: string, isBot: boolean, secret?: string } | object |
v3.user.data.export
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (WorkspaceId[], optional): WorkspaceIds to export
Argument 2 (Options to omit certain types of data from export, optional):
| Field | Type | Required | Description |
|---|---|---|---|
omitFileContents | boolean | no | If set, export will not include file contents, only meta data |
omitMessages | boolean | no | If set, messages will be skipped during export |
omitLogs | boolean | no | If set, logs will be skipped during export |
omitProcessPrefix | boolean | no | If set, process prefixes will be skipped during export |
omitActivities | boolean | no | If set, activities will be skipped during export |
omitEvents | boolean | no | If set, events will be skipped during export |
omitFeed | boolean | no | If set, feed posts will be skipped during export |
omitFeedComment | boolean | no | If set, feed comments will be skipped during export |
omitNotifications | boolean | no | If set, notifications will be skipped during export |
omitInvites | boolean | no | If set, invites will be skipped during export |
omitInsights | boolean | no | If set, insights will be skipped during export |
omitApps | boolean | no | If set, apps will be skipped during export |
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.user.data.export', [
['507f1f77bcf86cd799439011'],
{
omitFileContents: false, // If set, export will not include file contents, only meta data
omitMessages: false, // If set, messages will be skipped during export
},
]);
console.log(result);Returns
Undocumented
The return value is not described in the source yet.
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.user.data.export.workspaces
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (Credentials to use against the source server, required):
| Field | Type | Required | Description |
|---|---|---|---|
host | string | yes | Server to fetch data from, https://api.hailer.com for production environment. |
username | string | yes | Source server username; must be Owner of imported workspaces. |
password | string | yes | Password to log into the remote server |
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.user.data.export.workspaces', [
{
host: 'string', // Server to fetch data from, `https://api.hailer.com` for production environment.
username: 'string', // Source server username; must be Owner of imported workspaces.
password: 'string', // Password to log into the remote server
},
]);
console.log(result);Returns
Array of objects:
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | yes | |
name | string | yes |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.user.data.import
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (Credentials to use against the source server, required):
| Field | Type | Required | Description |
|---|---|---|---|
host | string | yes | Server to fetch data from, https://api.hailer.com for production environment. |
username | string | yes | Source server username; must be Owner of imported workspaces. |
password | string | yes | Password to log into the remote server |
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
workspaceIds | WorkspaceId[] | no | Workspace Ids to export, or uses the default Workspace for the given user if omitted |
omitFileContents | boolean | no | If set, import will not download file contents, only meta data |
omitMessages | boolean | no | If set, messages will be skipped during import |
omitLogs | boolean | no | If set, logs will be skipped during import |
omitProcessPrefix | boolean | no | If set, process prefixes will be skipped during import |
omitActivities | boolean | no | If set, activities will be skipped during import |
omitEvents | boolean | no | If set, events will be skipped during import |
omitFeed | boolean | no | If set, feed posts will be skipped during import |
omitFeedComment | boolean | no | If set, feed comments will be skipped during import |
omitNotifications | boolean | no | If set, notifications will be skipped during import |
omitInvites | boolean | no | If set, invites will be skipped during import |
omitInsights | boolean | no | If set, insights will be skipped during import |
omitApps | boolean | no | If set, apps will be skipped during import |
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.user.data.import', [
{
host: 'string', // Server to fetch data from, `https://api.hailer.com` for production environment.
username: 'string', // Source server username; must be Owner of imported workspaces.
password: 'string', // Password to log into the remote server
},
{
workspaceIds: ['507f1f77bcf86cd799439011'], // Workspace Ids to export, or uses the default Workspace for the given user if omitted
omitFileContents: false, // If set, import will not download file contents, only meta data
},
]);
console.log(result);Returns
Undocumented
The return value is not described in the source yet.
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.user.entraUser
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (string, required): username
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.user.entraUser', [
'string', // username (required)
]);
console.log(result);Returns
Result form 1:
| Field | Type | Required | Description |
|---|---|---|---|
tenantId | string | no | tenantId |
clientId | string | no | clientId |
Result form 2:
Undocumented
The return value is not described in the source yet.
Auth: callable without authentication.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.user.permissions
Description
Will return the permissions of the user in the specified network.
As an admin you can check the permissions of other users in your workspace.
If userId or workspaceId are not provided, defaults to the current session user and workspace.
Parameters
Argument 1 (userId, optional): userId
Argument 2 (WorkspaceId, optional): workspaceId (former networkId)
Argument 3 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
details | boolean | no | One of: true. |
items | object | no | Exact match on specific Ids for quicker permission lookup. |
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.user.permissions', [
'507f1f77bcf86cd799439011', // userId
'507f1f77bcf86cd799439011', // WorkspaceId
{
details: false,
items: {
workflowIds: ['507f1f77bcf86cd799439011'],
calendarIds: ['507f1f77bcf86cd799439011'],
}, // Exact match on specific Ids for quicker permission lookup.
},
]);
console.log(result);Returns
Record<userId, object>
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.user.register
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | |
firstname | string | yes | |
lastname | string | yes | |
password | string | yes |
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
copyNetworkId | WorkspaceId | no | workspaceId (former networkId) |
referralCode | string | no | |
publicChatSessionId | string | no | |
viewedSlides | string | no |
Argument 3 (string, optional):
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.user.register', [
{
email: 'string',
firstname: 'string',
lastname: 'string',
password: 'string',
},
{
copyNetworkId: '507f1f77bcf86cd799439011', // workspaceId (former networkId)
referralCode: 'string',
},
'string', // argument 3
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
uid | ObjectId | yes | |
cid | ObjectId | yes |
Auth: callable without authentication.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.user.remove
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.user.remove', []);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.user.setBot
Description
Flag a User as a bot account (or clear the flag).
Two authorization paths, both requiring an authenticated session:
- Admin/session: a whitelisted admin principal may flag any user.
- Service secret: pass
secretmatching the backendMCP_BOT_SECRETto authorize without admin privileges. Used by the MCP graduation flow, whose workspace principal marks provisioned "Hailer Helper" accounts after they are created via registration but is not a whitelisted admin. Whensecretis supplied it is the sole auth path for the call (a wrong secret is rejected; it does not fall back to the admin check).
There is intentionally no self-service path to set this; registration cannot set isBot.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
uid | userId | yes | User to flag |
isBot | boolean | yes | New bot flag value; false clears it |
secret | string | no | Shared service secret (matches backend MCP_BOT_SECRET) authorizing the call without an admin session; required when used as the auth path. |
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.user.setBot', [
{
uid: '507f1f77bcf86cd799439011', // User to flag
isBot: false, // New bot flag value; false clears it
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
uid | ObjectId | yes | |
isBot | boolean | yes |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.