> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Demio plugin

> Webinar and event data from Demio - list events and their dates, register attendees, and read who attended each session.

Use **Demio** through Corsair: one client, typed API calls.

Demio issues two credentials and every request carries both, so connect with the key and the secret together. An account Owner generates the pair under **Account Settings > API**; there is no other credential and no token exchange.

* **One registration operation.** Demio accepts both `PUT` and `POST` on `/event/register` with identical behaviour. The plugin exposes one operation, `registrations.create`, sent as `POST`.
* **Filtering events.** `events.list` takes `type`, one of `upcoming`, `past` or `automated`. Omit it to receive every event with its nearest date, ordered by date, ascending.
* **Identifying the event.** `registrations.create` takes either `id` or `ref_url`, the event's public registration page link. Omit `date_id` to put the registrant on the event's next date, and pass one to choose a date.
* **Registration is the only write.** It adds a person to an event and sends them a join link. Every other operation reads.
* **On-demand dates.** Inside `events.get`, an on-demand date reports `status: 'on-demand'` with `timestamp`, `datetime` and `zone` all null. `events.getDate` describes the same date as `status: 'running'` with the current time as its `timestamp`.
* **The participant status has two spellings.** Filter with `did-not-attend` and `left-early`; each participant comes back with `did not attend` and `left early`. Demio itself ignores a `status` it does not recognise and returns every registrant, but the plugin only accepts the five hyphenated values and rejects anything else before the request, so a misspelled filter fails validation instead of widening the list.
* **Rate limits answer 417, not 429.** Each endpoint accepts 180 requests a minute, and accounts also carry a daily call allowance. A per-minute limit is retried up to twice: a `Retry-After` from Demio sets the wait, and without one the plugin waits the documented minute, because a shorter delay would retry inside the same window. A spent daily allowance fails immediately, since no retry restores it.
* **No paging.** The events and participants operations return the whole set with no page parameters and no cursor, so a large account receives every record in one answer.
* **Registration needs a verified account email.** A live registration against an account whose owner has not confirmed their address answers 400 `{"errors":["Your email is not verified. Please, verify your email address."]}`. Verify the address Demio sent to the account owner before relying on `registrations.create`.
* **A bad event or date id answers 403, not 404.** Demio returns `{"errors":["You haven't access to this Event"]}` for an id that does not exist, a date that is not on the event, and a report on an unknown date, so a missing resource and a forbidden one look the same. The plugin does not retry either.
* **An unidentified registration answers 422.** Omitting both `id` and `ref_url` gets `{"errors":["Not enough params."]}` with status 422, which the published specification does not list. The plugin rejects that body before sending, so the 422 only appears if the provider changes.
* **Webhooks.** The plugin does not receive webhooks; the Demio API offers no delivery or registration call.

**What you get:**

* 6 typed API operations

## Setup

**1. Install**

```bash npm theme={null}
npm install corsair @corsair-dev/demio better-sqlite3
npm install --save-dev @types/better-sqlite3
```

```bash yarn theme={null}
yarn add corsair @corsair-dev/demio better-sqlite3
yarn add --dev @types/better-sqlite3
```

```bash pnpm theme={null}
pnpm install corsair @corsair-dev/demio better-sqlite3
pnpm install --save-dev @types/better-sqlite3
```

```bash bun theme={null}
bun add corsair @corsair-dev/demio better-sqlite3
bun add --dev @types/better-sqlite3
```

**2. Add the plugin**

```ts corsair.ts theme={null}
import Database from 'better-sqlite3';
import { createCorsair } from 'corsair';
import { demio } from '@corsair-dev/demio';

export const corsair = createCorsair({
	plugins: [
		demio(),
	],
	database: new Database('corsair.db'),
	kek: process.env.CORSAIR_KEK!,
	multiTenancy: true,
	hub: {
		projectApiKey: process.env.CORSAIR_API_KEY!,
		signingSecret: process.env.CORSAIR_SIGNING_SECRET!,
	},
});
```

With `multiTenancy: true`, scope calls with `corsair.withTenant(id)`. See [Quick start](https://docs.corsair.dev/quick-start.md) for KEK + Hub keys, and [Multi-tenancy](https://docs.corsair.dev/concepts/multi-tenancy.md) for account isolation.

**3. Choose authentication**

> [tab] API Key (Recommended)
>
> No setup required yet. When you make your first request as a tenant, Corsair prompts for the API key.
>
> ```ts theme={null}
> demio()
> ```
>
> More: [API Key](https://docs.corsair.dev/concepts/api-key)

**4. Connect a tenant**

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see [Connect / OAuth](https://docs.corsair.dev/management/connect).

```ts theme={null}
const { connectUrl } = await corsair.manage.connect.createLink({
	plugin: 'demio',
	tenantId: 'acme',
});
// redirect the user's browser to connectUrl
```

## Example API calls

**Check the credential pair**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.demio.api.ping.check({});
```

**Register an attendee for the next date of an event**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.demio.api.registrations.create({ id: 86, name: 'Jane Doe', email: 'jane.doe@example.com' });
```

See the full list on the [API](https://docs.corsair.dev/plugins/demio/api.md) page.

## What's next

> [card] [API reference](https://docs.corsair.dev/plugins/demio/api.md)
>
> Every `demio.api.*` operation with input and output types.

> [card] [Connect / OAuth](https://docs.corsair.dev/management/connect)
>
> createLink, Hub delivery, and tenant connect flows.

> [card] [Use with agents](https://docs.corsair.dev/mcp-adapters/mcp-adapters)
>
> Expose this plugin's operations as MCP tools.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.