Appearance
Company (Workspace)
Workspace (company) management: accounts, users, teams, invites, custom property fields, and general options.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
company.add_property_field | unknown, options | object |
company.check_invite | InviteKey | object |
company.form_get_teams | options | any[] |
company.get_general_options | - | object |
company.leave | ObjectId | boolean |
company.load_team | String teamId | object |
company.new_account | options | unknown |
company.new_team | options | unknown |
company.remove_account | options | boolean |
company.remove_property_field | ObjectId, unknown | boolean |
company.remove_team | ObjectId | boolean |
company.remove_user | ObjectId | boolean |
company.set_account_data | unknown, options | unknown |
company.set_general_options | options | object |
company.set_property_value | ObjectId, unknown, options | boolean |
company.set_team_data | options | boolean |
company.set_user_data | options | boolean |
company.set_user_property_value | ObjectId, unknown | boolean |
company.update_property_field | unknown, ObjectId, options | object |
company.update_team_users | ObjectId, unknown | boolean |
company.add_property_field
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (users, required):
Argument 2 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
label | string | yes | |
type | text | date | phone | email | url | team | country | optionlist | yes | |
filledBy | user | admin | yes | |
enableMultiple | boolean | no | |
data | ObjectId[] | string[] | string | no |
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('company.add_property_field', [
'users', // argument 1 (required)
{
label: 'string',
type: 'text',
filledBy: 'user',
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | |
label | string | yes | |
type | text | date | phone | email | url | team | country | optionlist | yes | |
filledBy | user | admin | yes | |
enableMultiple | boolean | no | |
data | string[] | no | |
uid | userId | yes | field created by user uid |
created | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.check_invite
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (InviteKey, string, required):
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('company.check_invite', [
'string', // InviteKey (required)
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | |
invite_key | string | yes | |
invited_by | userId | yes | userId |
email | string | no | |
cid | WorkspaceId | yes | workspaceId (former networkId) |
user | object | no | See below. |
network | object | no | See below. |
user (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | userId | yes | userId |
firstname | string | no | |
lastname | string | no | |
default_profilepic | fileId | yes | fileId |
network (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | WorkspaceId | yes | workspaceId (former networkId) |
name | string | yes | |
description | string | no |
Auth: callable without authentication.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.form_get_teams
Description
Get teams in current company
Parameters
Argument 1 (object, 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('company.form_get_teams', [
{ /* ... */ },
]);
console.log(result);Returns
Array of any.
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.get_general_options
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('company.get_general_options', []);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | |
settings | object | no | See below. |
description | string | no | Network description |
settings (object):
| Field | Type | Required | Description |
|---|---|---|---|
color | string | no | Network theme color |
defaultView | wall | activities | calendar | files/fileset | no | Default: "wall". |
allowPublicCopy | boolean | no | |
functionFieldVersion | number | no | |
languages | (fi | en | sv)[] | no | |
disableVideoCalls | boolean | no | Whether activity video calls are disabled in this workspace |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.leave
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
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('company.leave', [
'507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.load_team
Description
Get team info by id
Parameters
Argument 1 (teamId, required): teamId
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('company.load_team', [
'507f1f77bcf86cd799439011', // teamId (required)
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | yes | |
name | string | yes | |
nameTranslations | object | no | See below. |
accounts | array | yes | |
members | array | yes | |
description | string | no |
nameTranslations (object):
| Field | Type | Required | Description |
|---|---|---|---|
fi | string | no | |
en | string | no | |
sv | string | no |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.new_account
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
team_id | ObjectId | yes |
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('company.new_account', [
{
name: 'string',
team_id: '507f1f77bcf86cd799439011',
},
]);
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?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.new_team
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
description | string | no |
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('company.new_team', [
{
name: 'string',
},
]);
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?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.remove_account
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
account_id | ObjectId | yes | |
team_id | ObjectId | yes |
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('company.remove_account', [
{
account_id: '507f1f77bcf86cd799439011',
team_id: '507f1f77bcf86cd799439011',
},
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.remove_property_field
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
Argument 2 (users, required):
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('company.remove_property_field', [
'507f1f77bcf86cd799439011', // ObjectId (required)
'users', // argument 2 (required)
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.remove_team
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
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('company.remove_team', [
'507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.remove_user
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
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('company.remove_user', [
'507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.set_account_data
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (name` \| `color, required):
Argument 2 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
account_id | ObjectId | yes | |
name | string | no | |
color | string | no |
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('company.set_account_data', [
'name', // argument 1 (required)
{
account_id: '507f1f77bcf86cd799439011',
},
]);
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?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.set_general_options
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | |
settings | object | no | See below. |
description | string | no | Network description |
settings (object):
| Field | Type | Required | Description |
|---|---|---|---|
color | string | no | Network theme color |
defaultView | wall | activities | calendar | files/fileset | no | Default: "wall". |
allowPublicCopy | boolean | no | |
functionFieldVersion | number | no | |
languages | (fi | en | sv)[] | no |
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('company.set_general_options', [
{
name: 'string',
settings: {
color: 'string', // Network theme color
defaultView: 'wall',
},
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | |
settings | object | no | See below. |
description | string | no | Network description |
settings (object):
| Field | Type | Required | Description |
|---|---|---|---|
color | string | no | Network theme color |
defaultView | wall | activities | calendar | files/fileset | no | Default: "wall". |
allowPublicCopy | boolean | no | |
functionFieldVersion | number | no | |
languages | (fi | en | sv)[] | no |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.set_property_value
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
Argument 2 (users, required):
Argument 3 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
data | ObjectId[] | string[] | string | no | |
uid | ObjectId | yes |
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('company.set_property_value', [
'507f1f77bcf86cd799439011', // ObjectId (required)
'users', // argument 2 (required)
{
uid: '507f1f77bcf86cd799439011',
},
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.set_team_data
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
team_id | ObjectId | yes | |
section | name | description | public | defaultView | yes | |
data | any | yes |
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('company.set_team_data', [
{
team_id: '507f1f77bcf86cd799439011',
section: 'name',
data: '...',
},
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.set_user_data
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
section | owner | admin | guest | inviter | feedAdmin | title | customRole | yes | |
uid | ObjectId | yes | |
value | string | yes | |
workspaceId | WorkspaceId | no | workspaceId (former networkId) |
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('company.set_user_data', [
{
section: 'owner',
uid: '507f1f77bcf86cd799439011',
value: 'string',
},
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.set_user_property_value
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required): fieldId
Argument 2 (ObjectId[] \| string[] \| 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('company.set_user_property_value', [
'507f1f77bcf86cd799439011', // ObjectId (required)
['507f1f77bcf86cd799439011'], // argument 2
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.update_property_field
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (users, required):
Argument 2 (ObjectId, required):
Argument 3 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
created | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
filledBy | user | admin | yes | |
label | string | yes | |
type | text | date | phone | email | url | team | country | optionlist | yes | |
uid | ObjectId | no | |
_id | ObjectId | no | |
enableMultiple | boolean | no |
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('company.update_property_field', [
'users', // argument 1 (required)
'507f1f77bcf86cd799439011', // ObjectId (required)
{
filledBy: 'user',
label: 'string',
type: 'text',
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | |
label | string | yes | |
type | text | date | phone | email | url | team | country | optionlist | yes | |
filledBy | user | admin | yes | |
uid | userId | yes | field created by user uid |
created | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
company.update_team_users
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required): teamId
Argument 2 (ObjectId[], required): userIds to set as team members
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('company.update_team_users', [
'507f1f77bcf86cd799439011', // ObjectId (required)
['507f1f77bcf86cd799439011'],
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.