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

# Node SDK

Official Node.js and TypeScript SDK for Kavenio social posting and scheduling.

## Install

<CodeGroup>
  ```bash npm theme={null}
  npm install @kavenio/sdk
  ```

  ```bash yarn theme={null}
  yarn add @kavenio/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @kavenio/sdk
  ```

  ```bash bun theme={null}
  bun add @kavenio/sdk
  ```
</CodeGroup>

## Get an API key

Create a Kavenio account from the [dashboard](https://app.kavenio.com), then
create an API key from [API Keys](https://app.kavenio.com/api-keys).

```bash theme={null}
export KAVENIO_API_KEY="<your-api-key>"
```

## Quickstart

```ts theme={null}
import { Kavenio } from "@kavenio/sdk";

const kavenio = new Kavenio({
  apiKey: process.env.KAVENIO_API_KEY,
});

await kavenio.posts.create({
  profileId: "proflinkedinlive",
  content: "Launching today",
  platforms: [
    {
      platform: "linkedin",
      accountId: "acctlinkedinpage",
    },
  ],
});
```

## Methods

### Analytics

Read unified post analytics from live provider fetches and stored snapshots.

| Method                           | Description                |
| -------------------------------- | -------------------------- |
| `kavenio.analytics.get({ ... })` | Get unified post analytics |

### Posts

Create, schedule, update, retry, unpublish, and edit social posts.

| Method                                          | Description             |
| ----------------------------------------------- | ----------------------- |
| `kavenio.posts.list({ ... })`                   | List posts              |
| `kavenio.posts.create({ ... })`                 | Create a post           |
| `kavenio.posts.bulkUpload({ ... })`             | Bulk upload posts       |
| `kavenio.posts.get({ postId })`                 | Get a post              |
| `kavenio.posts.replace({ postId, ... })`        | Replace post fields     |
| `kavenio.posts.update({ postId, ... })`         | Update a post           |
| `kavenio.posts.delete({ postId })`              | Delete a post           |
| `kavenio.posts.retry({ postId, ... })`          | Retry post publishing   |
| `kavenio.posts.unpublish({ postId, ... })`      | Unpublish a post        |
| `kavenio.posts.editPublished({ postId, ... })`  | Edit a published post   |
| `kavenio.posts.analytics({ postId, ... })`      | Get post analytics      |
| `kavenio.posts.comments({ postId, ... })`       | List post comments      |
| `kavenio.posts.deleteComment({ postId, ... })`  | Delete a post comment   |
| `kavenio.posts.replyToComment({ postId, ... })` | Reply to a post comment |
| `kavenio.posts.likeComment({ postId, ... })`    | Like a post comment     |
| `kavenio.posts.unlikeComment({ postId, ... })`  | Unlike a post comment   |

### Queue

Manage reusable publishing schedules and preview upcoming queue slots.

| Method                                      | Description             |
| ------------------------------------------- | ----------------------- |
| `kavenio.queue.listSlots({ ... })`          | List queue schedules    |
| `kavenio.queue.createSlotSchedule({ ... })` | Create a queue schedule |
| `kavenio.queue.updateSlotSchedule({ ... })` | Update a queue schedule |
| `kavenio.queue.deleteSlotSchedule({ ... })` | Delete a queue schedule |
| `kavenio.queue.previewSlots({ ... })`       | Preview queue slots     |
| `kavenio.queue.getNextSlot({ ... })`        | Get next queue slot     |

### Validation

Validate post content, post length, and media before publishing.

| Method                                   | Description          |
| ---------------------------------------- | -------------------- |
| `kavenio.validation.post({ ... })`       | Validate a post      |
| `kavenio.validation.postLength({ ... })` | Validate post length |

### Connect

Start and complete account connection flows for supported platforms.

| Method                                                     | Description                                        |
| ---------------------------------------------------------- | -------------------------------------------------- |
| `kavenio.connect.completeHostedCallback({ ... })`          | Complete hosted OAuth callback                     |
| `kavenio.connect.listProviders()`                          | List connect providers                             |
| `kavenio.connect.begin({ ... })`                           | Begin OAuth connect                                |
| `kavenio.connect.complete({ ... })`                        | Complete OAuth connect                             |
| `kavenio.connect.connectBlueskyCredentials({ ... })`       | Connect Bluesky credentials                        |
| `kavenio.connect.claimTelegramBusinessConnection({ ... })` | Claim a Telegram Business profile connection code  |
| `kavenio.connect.telegramBusinessPairing({ ... })`         | Create an automatic Telegram Business pairing link |
| `kavenio.connect.telegramBusinessPairingStatus(sessionId)` | Poll automatic Telegram Business pairing status    |
| `kavenio.connect.listFacebookPages({ ... })`               | List Facebook Pages                                |
| `kavenio.connect.selectFacebookPage({ ... })`              | Select Facebook Page                               |
| `kavenio.connect.listInstagramAccounts({ ... })`           | List Instagram accounts                            |
| `kavenio.connect.selectInstagramAccount({ ... })`          | Select Instagram account                           |
| `kavenio.connect.listLinkedInOrganizations({ ... })`       | LinkedIn organization discovery (unavailable)      |
| `kavenio.connect.selectLinkedInOrganization({ ... })`      | LinkedIn organization selection (unavailable)      |
| `kavenio.connect.listPinterestBoards({ ... })`             | List Pinterest boards                              |
| `kavenio.connect.selectPinterestBoard({ ... })`            | Select Pinterest board                             |
| `kavenio.connect.listYouTubeChannels({ ... })`             | List YouTube channels                              |
| `kavenio.connect.selectYouTubeChannel({ ... })`            | Select YouTube channel                             |
| `kavenio.connect.listYouTubePlaylists({ ... })`            | List YouTube playlists                             |
| `kavenio.connect.listDiscordChannels({ ... })`             | List Discord connect channels                      |
| `kavenio.connect.selectDiscordChannel({ ... })`            | Select Discord channel                             |

### Accounts

Read and manage connected social accounts after connection.

| Method                                                                             | Description                       |
| ---------------------------------------------------------------------------------- | --------------------------------- |
| `kavenio.accounts.list({ ... })`                                                   | List connected accounts           |
| `kavenio.accounts.get({ accountId })`                                              | Get a connected account           |
| `kavenio.accounts.replace({ accountId, ... })`                                     | Replace account fields            |
| `kavenio.accounts.update({ accountId, ... })`                                      | Update a connected account        |
| `kavenio.accounts.move({ accountId, ... })`                                        | Move a connected account          |
| `kavenio.accounts.disconnect({ accountId })`                                       | Disconnect an account             |
| `kavenio.accounts.checkHealth({ accountId })`                                      | Check account health              |
| `kavenio.accounts.listMastodonNotifications({ accountId, ... })`                   | List Mastodon notifications       |
| `kavenio.accounts.listMastodonEngagementItems({ accountId, ... })`                 | List Mastodon engagement items    |
| `kavenio.accounts.dismissMastodonNotification({ accountId, notificationId })`      | Dismiss a Mastodon notification   |
| `kavenio.accounts.listMastodonConversations({ accountId, ... })`                   | List Mastodon conversations       |
| `kavenio.accounts.markMastodonConversationRead({ accountId, conversationId })`     | Mark a Mastodon conversation read |
| `kavenio.accounts.listBlueskyConversations({ accountId, ... })`                    | List Bluesky conversations        |
| `kavenio.accounts.listBlueskyMessages({ accountId, conversationId, ... })`         | List Bluesky messages             |
| `kavenio.accounts.sendBlueskyMessage({ accountId, conversationId, ... })`          | Send a Bluesky message            |
| `kavenio.accounts.markBlueskyConversationRead({ accountId, conversationId, ... })` | Mark Bluesky conversation read    |
| `kavenio.accounts.archiveBlueskyConversation({ accountId, conversationId })`       | Archive a Bluesky conversation    |
| `kavenio.accounts.getMastodonStatusContext({ accountId, statusId })`               | Get Mastodon status context       |
| `kavenio.accounts.mutateMastodonStatus({ accountId, statusId, action })`           | Run a Mastodon status action      |

### Inbox Reviews

Methods for inboxReviews.

| Method                               | Description        |
| ------------------------------------ | ------------------ |
| `kavenio.inboxReviews.list({ ... })` | List inbox reviews |

### Inbox Engagement

Methods for inboxEngagement.

| Method                                  | Description           |
| --------------------------------------- | --------------------- |
| `kavenio.inboxEngagement.list({ ... })` | List inbox engagement |

### Media

Upload media, create presigned upload URLs, and validate media for publishing.

| Method                                 | Description                |
| -------------------------------------- | -------------------------- |
| `kavenio.media.uploadBatch({ ... })`   | Upload media               |
| `kavenio.media.createPresign({ ... })` | Create a media presign URL |
| `kavenio.media.validate({ ... })`      | Validate media             |

## Payload examples

### Posts

#### `kavenio.posts.create`

```ts theme={null}
await kavenio.posts.create({
  profileId: "proflinkedinlive",
  title: "Launch announcement",
  content: "We are launching the new campaign today.",
  platforms: [
    {
      platform: "linkedin",
      accountId: "acctlinkedinpage",
    },
  ],
  scheduledFor: "2026-06-25T15:00:00.000Z",
  timezone: "UTC",
  tags: ["launch"],
});
```

#### `kavenio.posts.bulkUpload`

```ts theme={null}
await kavenio.posts.bulkUpload({
  csv: "title,content,scheduledFor\nLaunch,Post body,2026-06-25T15:00:00.000Z",
  defaults: {
    profileId: "proflinkedinlive",
    timezone: "UTC",
  },
});
```

#### `kavenio.posts.replace`

```ts theme={null}
await kavenio.posts.replace({
  postId: "postlaunchlive01",
  title: "Updated launch announcement",
  content: "Updated post body.",
  scheduledFor: "2026-06-25T16:00:00.000Z",
  timezone: "UTC",
});
```

#### `kavenio.posts.update`

```ts theme={null}
await kavenio.posts.update({
  postId: "postlaunchlive01",
  content: "Updated post body.",
});
```

#### `kavenio.posts.retry`

```ts theme={null}
await kavenio.posts.retry({
  postId: "postlaunchlive01",
  targetIds: ["targlinkedinpost"],
});
```

#### `kavenio.posts.unpublish`

```ts theme={null}
await kavenio.posts.unpublish({
  postId: "postlaunchlive01",
  targetIds: ["targlinkedinpost"],
});
```

#### `kavenio.posts.editPublished`

```ts theme={null}
await kavenio.posts.editPublished({
  postId: "postlaunchlive01",
  targetIds: ["targlinkedinpost"],
  content: "Updated published content.",
  visibility: "public",
});
```

#### `kavenio.posts.deleteComment`

```ts theme={null}
await kavenio.posts.deleteComment({
  postId: "postlaunchlive01",
  targetId: "targlinkedinpost",
  commentUri: "at://did:plc:creator/app.bsky.feed.post/3comment",
});
```

#### `kavenio.posts.replyToComment`

```ts theme={null}
await kavenio.posts.replyToComment({
  postId: "postlaunchlive01",
  targetId: "targlinkedinpost",
  text: "Thanks for the question.",
  rootUri: "at://did:plc:creator/app.bsky.feed.post/3kavenio",
  rootCid: "bafyroot",
  parentUri: "at://did:plc:reply/app.bsky.feed.post/3reply",
  parentCid: "bafyreply",
  parentStatusId: "109404970108594431",
});
```

#### `kavenio.posts.likeComment`

```ts theme={null}
await kavenio.posts.likeComment({
  postId: "postlaunchlive01",
  targetId: "targlinkedinpost",
  commentUri: "at://did:plc:reply/app.bsky.feed.post/3reply",
  commentCid: "bafyreply",
});
```

#### `kavenio.posts.unlikeComment`

```ts theme={null}
await kavenio.posts.unlikeComment({
  postId: "postlaunchlive01",
  targetId: "targlinkedinpost",
  platformLikeId: "at://did:plc:creator/app.bsky.feed.like/3like",
});
```

### Queue

#### `kavenio.queue.createSlotSchedule`

```ts theme={null}
await kavenio.queue.createSlotSchedule({
  profileId: "proflinkedinlive",
  name: "Weekday mornings",
  timezone: "UTC",
  active: true,
  slots: [
    {
      dayOfWeek: 1,
      time: "09:00",
      timezone: "UTC",
    },
  ],
});
```

#### `kavenio.queue.updateSlotSchedule`

```ts theme={null}
await kavenio.queue.updateSlotSchedule({
  profileId: "proflinkedinlive",
  queueId: "queueweekdayam",
  name: "Weekday afternoons",
  slots: [
    {
      dayOfWeek: 2,
      time: "14:00",
      timezone: "UTC",
    },
  ],
});
```

### Validation

#### `kavenio.validation.post`

```ts theme={null}
await kavenio.validation.post({
  profileId: "proflinkedinlive",
  content: "Validation-only post body.",
  platforms: [
    {
      platform: "linkedin",
      accountId: "acctlinkedinpage",
    },
  ],
});
```

#### `kavenio.validation.postLength`

```ts theme={null}
await kavenio.validation.postLength({
  text: "Short post text for platform length validation.",
});
```

### Connect

#### `kavenio.connect.begin`

```ts theme={null}
await kavenio.connect.begin({
  profileId: "proflinkedinlive",
  platform: "linkedin",
  returnTo: "/accounts",
});
```

#### `kavenio.connect.complete`

```ts theme={null}
await kavenio.connect.complete({
  state: "state_example",
  code: "code_example",
});
```

#### `kavenio.connect.connectBlueskyCredentials`

```ts theme={null}
await kavenio.connect.connectBlueskyCredentials({
  profileId: "proflinkedinlive",
  identifier: "handle.example.com",
  appPassword: "bluesky_app_password_redacted",
});
```

#### `kavenio.connect.selectFacebookPage`

```ts theme={null}
await kavenio.connect.selectFacebookPage({
  accountId: "acctlinkedinpage",
  profileId: "proflinkedinlive",
  pageId: "page_example",
});
```

#### `kavenio.connect.selectInstagramAccount`

```ts theme={null}
await kavenio.connect.selectInstagramAccount({
  accountId: "acctlinkedinpage",
  profileId: "proflinkedinlive",
  instagramAccountId: "ig_example",
});
```

#### `kavenio.connect.selectPinterestBoard`

```ts theme={null}
await kavenio.connect.selectPinterestBoard({
  accountId: "acctlinkedinpage",
  profileId: "proflinkedinlive",
  boardId: "board_example",
});
```

#### `kavenio.connect.selectYouTubeChannel`

```ts theme={null}
await kavenio.connect.selectYouTubeChannel({
  accountId: "acctlinkedinpage",
  profileId: "proflinkedinlive",
  channelId: "channel_example",
});
```

#### `kavenio.connect.selectDiscordChannel`

```ts theme={null}
await kavenio.connect.selectDiscordChannel({
  accountId: "acctlinkedinpage",
  channelId: "123456789012345678",
});
```

### Accounts

#### `kavenio.accounts.replace`

```ts theme={null}
await kavenio.accounts.replace({
  accountId: "acctlinkedinpage",
  displayName: "Retail LinkedIn",
  enabled: true,
  metadata: {
    label: "primary",
  },
});
```

#### `kavenio.accounts.update`

```ts theme={null}
await kavenio.accounts.update({
  accountId: "acctlinkedinpage",
  enabled: false,
});
```

#### `kavenio.accounts.move`

```ts theme={null}
await kavenio.accounts.move({
  accountId: "acctlinkedinpage",
  profileId: "proflinkedinlive",
});
```

#### `kavenio.accounts.sendBlueskyMessage`

```ts theme={null}
await kavenio.accounts.sendBlueskyMessage({
  accountId: "acctlinkedinpage",
  conversationId: "conversationIdExample",
  text: "Thanks for reaching out.",
});
```

#### `kavenio.accounts.markBlueskyConversationRead`

```ts theme={null}
await kavenio.accounts.markBlueskyConversationRead({
  accountId: "acctlinkedinpage",
  conversationId: "conversationIdExample",
  messageId: "message_1",
});
```

### Media

#### `kavenio.media.uploadBatch`

```ts theme={null}
await kavenio.media.uploadBatch({
  items: [
    {
      fileName: "campaign-image.png",
      contentType: "image/png",
      base64Data: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB...",
    },
  ],
});
```

#### `kavenio.media.createPresign`

```ts theme={null}
await kavenio.media.createPresign({
  filename: "campaign-video.mp4",
  contentType: "video/mp4",
  size: 10485760,
});
```

#### `kavenio.media.validate`

```ts theme={null}
await kavenio.media.validate({
  url: "https://cdn.example.com/campaign-image.png",
});
```

## API reference

For request and response schemas, see the [API reference](/docs/api/reference).
