Skip to content

Calendar ​

Calendars and events: create, update and load calendars and events, invites, repeat series, and iCal links.

Endpoints ​

EndpointArgumentsReturns
calendar.calendar_permissionoptionsobject
calendar.create_calendaroptionsunknown
calendar.create_eventoptionsany[]
calendar.create_own_ical-object
calendar.generate_ical_linkObjectIdobject
calendar.invite_respondEvent , ObjectIdobject[]
calendar.list_alloptionsobject
calendar.list_ical_links-object
calendar.load_calendars-any[]
calendar.load_eventunknownany | any[]
calendar.load_eventsoptionsany[]
calendar.load_repeat_seriesObjectIdobject
calendar.remove_calendarObjectIdboolean
calendar.remove_eventObjectId, optionsHailerResult
calendar.remove_ical_linkObjectId, unknownboolean
calendar.remove_inviteObjectId, userIdboolean
calendar.remove_own_ical-boolean
calendar.save_selected_calendarsunknownboolean
calendar.upcoming_eventsunknownany[]
calendar.update_calendaroptionsunknown
calendar.update_eventoptions, optionsany | Record<string, boolean>

calendar.calendar_permission ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (object, required):

FieldTypeRequiredDescription
calendar_idObjectIdyescalendarId
cidWorkspaceIdyesworkspaceId (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('calendar.calendar_permission', [
  {
    calendar_id: '507f1f77bcf86cd799439011', // calendarId
    cid: '507f1f77bcf86cd799439011', // workspaceId (former networkId)
  },
]);
console.log(result);

Returns

FieldTypeRequiredDescription
usersRecord<string, boolean>yes
teamsRecord<string, object>yes```javascript
{ teams: {
[teamId: string]: {
  name: string,
  users: { [userId: string]: true } } }
See
| `public` | boolean | yes |  |

**`teams.*`** (object):

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string | no | Team name |
| `users` | Record<string, boolean> | yes |  |

**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.

## `calendar.create_calendar`

**Description**

::: warning Undocumented
This endpoint has no description in the source yet.
:::

**Parameters**

**Argument 1 (object, required):**

| Field | Type | Required | Description |
|---|---|---|---|
| `color` | string | yes |  |
| `desc` | string | no |  |
| `name` | string | yes |  |
| `timezone` | string | no | Timezone for correctly determining daylight saving times for repeating events One of 597 values, e.g. `Africa/Abidjan`, `Africa/Accra`, `Africa/Addis_Ababa`, `Africa/Algiers`, `Africa/Asmara`. |

**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('calendar.create_calendar', [
  {
    color: 'string',
    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.

calendar.create_event ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (object, required):

FieldTypeRequiredDescription
cidObjectIdno
allDaybooleanno
attendeesRecord<string, boolean>no
calendar_idObjectIdyes
endnumberyes
locationstringno
notesstringno
repeatingbooleanno
repeatanyno
starttimestampyesTime (milliseconds since 1970-01-01 UTC)
titlestringyes

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('calendar.create_event', [
  {
    calendar_id: '507f1f77bcf86cd799439011',
    end: 0,
    start: Date.now(), // Time (milliseconds since 1970-01-01 UTC)
    title: 'string',
  },
]);
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.

calendar.create_own_ical ​

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('calendar.create_own_ical', []);
console.log(result);

Returns

FieldTypeRequiredDescription
_idObjectIdyes
uiduserIdyesuserId
urlstringyes
createdtimestampnoTime (milliseconds since 1970-01-01 UTC)
updatedtimestampnoTime (milliseconds since 1970-01-01 UTC)
personalICalbooleanno

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.

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId, required): calendarId

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('calendar.generate_ical_link', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);

Returns

FieldTypeRequiredDescription
_idObjectIdyes
uiduserIdyesuserId
cidWorkspaceIdyesworkspaceId (former networkId)
urlstringyes
calendarObjectIdyescalendarId
personalICalbooleanyes
createdtimestampnoTime (milliseconds since 1970-01-01 UTC)
updatedtimestampnoTime (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.

calendar.invite_respond ​

Description

Change attending status for event

Parameters

Argument 1 (Record<string, boolean>, required): Event { [event: string]: boolean \| null }

Argument 2 (ObjectId, optional): UserId, defaults to userId from current session

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('calendar.invite_respond', [
  {
    '507f1f77bcf86cd799439012': false, // fieldId: value
  },
  '507f1f77bcf86cd799439011', // ObjectId
]);
console.log(result);

Returns

Array of objects:

FieldTypeRequiredDescription
resultbooleanyes
eventanyno

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.

calendar.list_all ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (object, optional):

FieldTypeRequiredDescription
calendar_idObjectIdnocalendarId
cidWorkspaceIdnoworkspaceId (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('calendar.list_all', [
  {
    calendar_id: '507f1f77bcf86cd799439011', // calendarId
    cid: '507f1f77bcf86cd799439011', // workspaceId (former networkId)
  },
]);
console.log(result);

Returns

Record<string, 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.

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('calendar.list_ical_links', []);
console.log(result);

Returns

Record<string, 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.

calendar.load_calendars ​

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('calendar.load_calendars', []);
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.

calendar.load_event ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId \| 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('calendar.load_event', [
  '507f1f77bcf86cd799439011', // argument 1 (required)
]);
console.log(result);

Returns

any \| 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.

calendar.load_events ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (object, required):

FieldTypeRequiredDescription
calendarsObjectId[]yes
starttimestampyesTime (milliseconds since 1970-01-01 UTC)
endtimestampyesTime (milliseconds since 1970-01-01 UTC)
userObjectId[]no
showUnassignedbooleanno
eventIdsObjectId[]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('calendar.load_events', [
  {
    calendars: ['507f1f77bcf86cd799439011'],
    start: Date.now(), // Time (milliseconds since 1970-01-01 UTC)
    end: Date.now(), // Time (milliseconds since 1970-01-01 UTC)
  },
]);
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.

calendar.load_repeat_series ​

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('calendar.load_repeat_series', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);

Returns

Record<string, 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.

calendar.remove_calendar ​

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('calendar.remove_calendar', [
  '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.

calendar.remove_event ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId, required):

Argument 2 (object, optional):

FieldTypeRequiredDescription
repeat_idObjectIdno
removefuture | all | singleno

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('calendar.remove_event', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  {
    repeat_id: '507f1f77bcf86cd799439011',
    remove: 'future',
  },
]);
console.log(result);

Returns

HailerResult

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.

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId, required):

Argument 2 (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('calendar.remove_ical_link', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  'string', // 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.

calendar.remove_invite ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId, required): Event id

Argument 2 (userId, required): User id

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('calendar.remove_invite', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  '507f1f77bcf86cd799439011', // userId (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.

calendar.remove_own_ical ​

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('calendar.remove_own_ical', []);
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.

calendar.save_selected_calendars ​

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('calendar.save_selected_calendars', [
  ['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.

calendar.upcoming_events ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId \| ObjectId[], 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('calendar.upcoming_events', [
  '507f1f77bcf86cd799439011', // argument 1
]);
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.

calendar.update_calendar ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (object, required):

FieldTypeRequiredDescription
_idObjectIdyes
namestringyes
descriptionstringno
colorstringyes
timezonestringnoOne of 597 values, e.g. Africa/Abidjan, Africa/Accra, Africa/Addis_Ababa, Africa/Algiers, Africa/Asmara.
updatedtimestampnoTime (milliseconds since 1970-01-01 UTC)
allowGuestsbooleanno

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('calendar.update_calendar', [
  {
    _id: '507f1f77bcf86cd799439011',
    name: 'string',
    color: '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.

calendar.update_event ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (object, required):

FieldTypeRequiredDescription
_idObjectIdyes
allDaybooleanno
attendeesRecord<string, boolean>no
calendar_idObjectIdyes
endnumber | timestampyes
locationstringno
notesstringno
repeat_idObjectIdno
startnumber | timestampyes
titlestringyes
cidObjectIdno

Argument 2 (object, optional):

FieldTypeRequiredDescription
repeat_idObjectIdno
updatefuture | all | singleno

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('calendar.update_event', [
  {
    _id: '507f1f77bcf86cd799439011',
    calendar_id: '507f1f77bcf86cd799439011',
    end: 0,
    start: 0,
    title: 'string',
  },
  {
    repeat_id: '507f1f77bcf86cd799439011',
    update: 'future',
  },
]);
console.log(result);

Returns

any \| Record<string, 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.

Hailer Developer Documentation · v1.8.0