Skip to content

User

The current user, look up users, and list workspace members.

Endpoints

EndpointArgumentsReturns
v3.user.data.exportworkspaceIds: string[], options: { omitFileContents?: boolean, omitActivities?: boolean, omitDiscussions?: boolean, fileTypes?: string[] }unknown
v3.user.data.export.workspacesCredentials to use against the source serverobject[]
v3.user.data.importCredentials to use against the source server, optionsunknown
v3.user.entraUserusername: stringobject
v3.user.permissionsuserId?: string, workspaceId?: string, opts?: { details?: boolean, items?: { workflowIds?: string[], calendarIds?: string[], insightIds?: string[] } }object
v3.user.registerdata: { email: string, firstname: string, lastname: string, password?: string, acceptConditions: boolean, acceptMarketing?: boolean, language: string, preferredDomain?: string }object
v3.user.remove-boolean
v3.user.setBotdata: { 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):

FieldTypeRequiredDescription
omitFileContentsbooleannoIf set, export will not include file contents, only meta data
omitMessagesbooleannoIf set, messages will be skipped during export
omitLogsbooleannoIf set, logs will be skipped during export
omitProcessPrefixbooleannoIf set, process prefixes will be skipped during export
omitActivitiesbooleannoIf set, activities will be skipped during export
omitEventsbooleannoIf set, events will be skipped during export
omitFeedbooleannoIf set, feed posts will be skipped during export
omitFeedCommentbooleannoIf set, feed comments will be skipped during export
omitNotificationsbooleannoIf set, notifications will be skipped during export
omitInvitesbooleannoIf set, invites will be skipped during export
omitInsightsbooleannoIf set, insights will be skipped during export
omitAppsbooleannoIf 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):

FieldTypeRequiredDescription
hoststringyesServer to fetch data from, https://api.hailer.com for production environment.
usernamestringyesSource server username; must be Owner of imported workspaces.
passwordstringyesPassword 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:

FieldTypeRequiredDescription
_idstringyes
namestringyes

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):

FieldTypeRequiredDescription
hoststringyesServer to fetch data from, https://api.hailer.com for production environment.
usernamestringyesSource server username; must be Owner of imported workspaces.
passwordstringyesPassword to log into the remote server

Argument 2 (object, optional):

FieldTypeRequiredDescription
workspaceIdsWorkspaceId[]noWorkspace Ids to export, or uses the default Workspace for the given user if omitted
omitFileContentsbooleannoIf set, import will not download file contents, only meta data
omitMessagesbooleannoIf set, messages will be skipped during import
omitLogsbooleannoIf set, logs will be skipped during import
omitProcessPrefixbooleannoIf set, process prefixes will be skipped during import
omitActivitiesbooleannoIf set, activities will be skipped during import
omitEventsbooleannoIf set, events will be skipped during import
omitFeedbooleannoIf set, feed posts will be skipped during import
omitFeedCommentbooleannoIf set, feed comments will be skipped during import
omitNotificationsbooleannoIf set, notifications will be skipped during import
omitInvitesbooleannoIf set, invites will be skipped during import
omitInsightsbooleannoIf set, insights will be skipped during import
omitAppsbooleannoIf 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:

FieldTypeRequiredDescription
tenantIdstringnotenantId
clientIdstringnoclientId

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):

FieldTypeRequiredDescription
detailsbooleannoOne of: true.
itemsobjectnoExact 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):

FieldTypeRequiredDescription
emailstringyes
firstnamestringyes
lastnamestringyes
passwordstringyes

Argument 2 (object, optional):

FieldTypeRequiredDescription
copyNetworkIdWorkspaceIdnoworkspaceId (former networkId)
referralCodestringno
publicChatSessionIdstringno
viewedSlidesstringno

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

FieldTypeRequiredDescription
uidObjectIdyes
cidObjectIdyes

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 secret matching the backend MCP_BOT_SECRET to 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. When secret is 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):

FieldTypeRequiredDescription
uiduserIdyesUser to flag
isBotbooleanyesNew bot flag value; false clears it
secretstringnoShared 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

FieldTypeRequiredDescription
uidObjectIdyes
isBotbooleanyes

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.

Hailer Developer Documentation