FastComments.com

FastComments JavaScript/TypeScript SDK


ื–ื” ื”-SDK ื”ืจืฉืžื™ ืฉืœ JavaScript/TypeScript ืขื‘ื•ืจ FastComments.

SDK ืจืฉืžื™ ืฉืœ JavaScript/TypeScript ืขื‘ื•ืจ ื”-FastComments API

ืžืื’ืจ

ืฆืคื” ื‘-GitHub


ื”ืชืงื ื” Internal Link

npm install fastcomments-sdk

ืชื™ืขื•ื“ API Internal Link


ืžื“ืจื™ืš API ืžืœื: docs/api/README.md

ืชืื™ืžื•ืช ื“ืคื“ืคืŸ ืžื•ืœ ืฉืจืช Internal Link


ื”-SDK ื”ื–ื” ืžืฉืชืžืฉ ื‘-ืฉืชื™ ื ืงื•ื“ื•ืช ื›ื ื™ืกื” ื›ื“ื™ ืœื”ื‘ื˜ื™ื— ืชืื™ืžื•ืช ืžื™ื˜ื‘ื™ืช ื•ืœืžื ื•ืข ืฉื’ื™ืื•ืช ื‘ื–ืžืŸ ืจื™ืฆื”:

  • fastcomments-sdk/browser - ื’ืจืกื” ื‘ื˜ื•ื—ื” ืœื“ืคื“ืคืŸ ืขื fetch ืžื•ื‘ื ื”
  • fastcomments-sdk/server - ื’ืจืกื” ืžืœืื” ืœ-Node.js ืขื ืชืžื™ื›ื” ื‘-SSO
  • fastcomments-sdk (ื‘ืจื™ืจืช ืžื—ื“ืœ) - ื˜ื™ืคื•ืกื™ื ื‘ืœื‘ื“, ื‘ื˜ื•ื— ืœื™ื™ื‘ื ื‘ื›ืœ ืžืงื•ื

ืžืžืฉืงื™ API ืฆื™ื‘ื•ืจื™ื™ื ืžื•ืœ ืžืื•ื‘ื˜ื—ื™ื Internal Link

The SDK ืžืกืคืง ืฉืœื•ืฉ ืžื—ืœืงื•ืช API ืขื™ืงืจื™ื•ืช:

  • DefaultApi - ื ืงื•ื“ื•ืช ืงืฆื” ืžืื•ื‘ื˜ื—ื•ืช ืฉื“ื•ืจืฉื•ืช ืืช ืžืคืชื— ื”-API ืฉืœืš ืœืื™ืžื•ืช. ื”ืฉืชืžืฉ ื‘ื”ืŸ ืขื‘ื•ืจ ืคืขื•ืœื•ืช ื‘ืฆื“ ื”ืฉืจืช.
  • PublicApi - ื ืงื•ื“ื•ืช ืงืฆื” ืฆื™ื‘ื•ืจื™ื•ืช ืฉื ื™ืชืŸ ืœื’ืฉืช ืืœื™ื”ืŸ ืœืœื ืžืคืชื— API. ื ื™ืชืŸ ืœืงืจื•ื ืœื”ืŸ ื™ืฉื™ืจื•ืช ืžื“ืคื“ืคื ื™ื/ืžื›ืฉื™ืจื™ื ื ื™ื™ื“ื™ื/ื•ื›ื•'.
  • HiddenApi - ื ืงื•ื“ื•ืช ืงืฆื” ืคื ื™ืžื™ื•ืช/ืžื ื”ืœื™ื•ืช ืœืฉื™ืžื•ืฉื™ื ืžืชืงื“ืžื™ื.

ื“ื•ื’ืžื”: ืฉื™ืžื•ืฉ ื‘-Public API (ื‘ื˜ื•ื— ืœื“ืคื“ืคืŸ)

import { PublicApi } from 'fastcomments-sdk/browser';

const publicApi = new PublicApi();

// ืงื‘ืœ ืชื’ื•ื‘ื•ืช ืขื‘ื•ืจ ื“ืฃ (ืื™ืŸ ืฆื•ืจืš ื‘ืžืคืชื— API)
const response = await publicApi.getCommentsPublic({
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id'
});

ื“ื•ื’ืžื”: ืฉื™ืžื•ืฉ ื‘-Default API (ืฆื“ ืฉืจืช ื‘ืœื‘ื“)

import { DefaultApi, Configuration } from 'fastcomments-sdk/server';

const config = new Configuration({
  apiKey: 'your-api-key' // ืฉืžื•ืจ ื–ืืช ื‘ืกื•ื“!
});
const defaultApi = new DefaultApi(config);

// ืงื‘ืœ ืชื’ื•ื‘ื•ืช ืขื ื’ื™ืฉื” ืžื ื”ืœื™ืช ืžืœืื”
const response = await defaultApi.getComments({
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id'
});

ืื™ื ื˜ื’ืจืฆื™ื™ืช SSO (ื›ื ื™ืกื” ื™ื—ื™ื“ื”) Internal Link

FastComments ืชื•ืžืš ื‘-SSO ื›ื“ื™ ืœื”ืฉืชืœื‘ ื‘ืžืขืจื›ืช ืื™ืžื•ืช ื”ืžืฉืชืžืฉื™ื ื”ืงื™ื™ืžืช ืฉืœืš. ืคื•ื ืงืฆื™ื•ื ืœื™ื•ืช SSO ื–ืžื™ื ื” ืจืง ื‘ื’ืจืกืช ื”ืฉืจืช ืžื›ื™ื•ื•ืŸ ืฉื”ื™ื ื“ื•ืจืฉืช ื™ื›ื•ืœื•ืช crypto ืฉืœ Node.js.

SSO ืคืฉื•ื˜ (ืฆื“ ืฉืจืช ื‘ืœื‘ื“)

ื™ืฉ ืœื™ืฆื•ืจ SSO ืคืฉื•ื˜ ื‘ืฆื“ ื”ืฉืจืช ื•ืœืฉืœื•ื— ืื•ืชื• ืืœ ื”ืœืงื•ื—:

// ืงื•ื“ ืฆื“ ืฉืจืช (Node.js/backend)
import { FastCommentsSSO, PublicApi } from 'fastcomments-sdk/server';

// ื™ืฆื™ืจืช SSO ืคืฉื•ื˜ ื‘ืืžืฆืขื•ืช ืขื–ืจ ืžื•ื‘ื ื”  
const userData = {
  username: 'john_doe',
  email: 'john@example.com',
  displayName: 'John Doe',
  avatar: 'https://example.com/avatar.jpg'
};

const sso = FastCommentsSSO.createSimple(userData, {
  loginURL: '/login',
  logoutURL: '/logout'
});

const ssoToken = sso.createToken();

// ืฉืœื— ืืช ssoToken ืœืงื•ื“ ื‘ืฆื“ ื”ืœืงื•ื—
// ืงื•ื“ ื‘ืฆื“ ื”ืœืงื•ื— ื™ื›ื•ืœ ืื– ืœื”ืฉืชืžืฉ ื‘ื˜ื•ืงืŸ ื–ื” ืขื ื”-SDK ืœื“ืคื“ืคืŸ

SSO ืžืื•ื‘ื˜ื— (ืฆื“ ืฉืจืช, ืžื•ืžืœืฅ)

ื™ืฉ ืœื™ื™ืฉื SSO ืžืื•ื‘ื˜ื— ื‘ืฆื“ ื”ืฉืจืช ื•ื”ื•ื ืžืกืคืง ืื‘ื˜ื—ื” ื˜ื•ื‘ื” ื™ื•ืชืจ:

// ืงื•ื“ ืฆื“ ืฉืจืช (Node.js/backend)
import { FastCommentsSSO, PublicApi } from 'fastcomments-sdk/server';

// ื™ืฆื™ืจืช SSO ืžืื•ื‘ื˜ื— ื‘ืืžืฆืขื•ืช ื”ืขื–ืจ ื”ืžื•ื‘ื ื”
const userData = {
  id: 'user-123',
  email: 'john@example.com',
  username: 'john_doe',
  displayName: 'John Doe',
  avatar: 'https://example.com/avatar.jpg',
  isAdmin: false,
  isModerator: false
};

const sso = FastCommentsSSO.createSecure('your-api-key', userData, {
  loginURL: '/login',
  logoutURL: '/logout'
});

const ssoConfig = sso.prepareToSend();

// Use with API calls on the server
const publicApi = new PublicApi();
const response = await publicApi.getCommentsPublic({
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id',
  sso: JSON.stringify(ssoConfig)
});

// Or send ssoConfig to client for browser usage

ืฉื™ืžื•ืฉ ื‘-SSO ืžื”ื“ืคื“ืคืŸ (ืขื ื˜ื•ืงืŸ ืฉื ื•ืฆืจ ื‘ืฉืจืช)

// ืงื•ื“ ื‘ืฆื“ ื”ืœืงื•ื— (ื“ืคื“ืคืŸ)
import { PublicApi } from 'fastcomments-sdk/browser';

// ืงื‘ืœ ื˜ื•ืงืŸ SSO ืžื ืงื•ื“ืช ื”ืงืฆื” ืฉืœ ื”ืฉืจืช ืฉืœืš
const ssoToken = await fetch('/api/sso-token').then(r => r.json());

const publicApi = new PublicApi();
const response = await publicApi.getCommentsPublic({
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id',
  sso: ssoToken // ื”ืฉืชืžืฉ ื‘ื˜ื•ืงืŸ SSO ืฉื ื•ืฆืจ ื‘ืฉืจืช
});

SSO ืขื ื™ืฆื™ืจืช ืชื’ื•ื‘ื”

// ืฆื“ ืฉืจืช: ืฆื•ืจ SSO ื•ืชื’ื•ื‘ื”
import { FastCommentsSSO, PublicApi } from 'fastcomments-sdk/server';

const sso = FastCommentsSSO.createSecure('your-api-key', userData);
const ssoConfig = sso.prepareToSend();

const response = await publicApi.createCommentPublic({
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id',
  broadcastId: 'unique-broadcast-id',
  commentData: {
    comment: 'This is my comment',
    date: Date.now(),
    commenterName: 'John Doe',
    url: 'https://example.com/page',
    urlId: 'page-url-id'
  },
  sso: JSON.stringify(ssoConfig)
});

ืžืงืจื™ ืฉื™ืžื•ืฉ ื ืคื•ืฆื™ื Internal Link

ืงื‘ืœืช ืชื’ื•ื‘ื•ืช ืœืขืžื•ื“

const comments = await sdk.publicApi.getCommentsPublic({
  tenantId: 'your-tenant-id',
  urlId: 'article-123'
});

ื™ืฆื™ืจืช ืชื’ื•ื‘ื”

const newComment = await sdk.publicApi.createCommentPublic({
  createCommentParams: {
    tenantId: 'your-tenant-id',
    urlId: 'article-123',
    comment: 'Great article!',
    commenterName: 'John Doe',
    commenterEmail: 'john@example.com'
  }
});

ื”ืฆื‘ืขื” ืขืœ ืชื’ื•ื‘ื”

const voteResponse = await sdk.publicApi.voteComment({
  voteBodyParams: {
    commentId: 'comment-id',
    direction: 1 // 1 ืœื”ืฆื‘ืขื” ื‘ืขื“, -1 ืœื”ืฆื‘ืขื” ื ื’ื“
  }
});

ื ื™ื”ื•ืœ ืžืฉืชืžืฉื™ื (ื“ื•ืจืฉ ืžืคืชื— API)

// ื—ืคืฉ ืžืฉืชืžืฉื™ื (ื“ื•ืจืฉ DefaultApi)
const users = await sdk.defaultApi.searchUsers({
  tenantId: 'your-tenant-id',
  urlId: 'page-id',
  usernameStartsWith: 'john'
});

ืื™ืจื•ืขื™ื ื—ื™ื™ื (ืขื“ื›ื•ื ื™ื ื‘ื–ืžืŸ ืืžืช) Internal Link

ื”ื™ืจืฉื ืœืื™ืจื•ืขื™ื ื—ื™ื™ื ื›ื“ื™ ืœืงื‘ืœ ืขื“ื›ื•ื ื™ื ื‘ื–ืžืŸ ืืžืช ืขืœ ืชื’ื•ื‘ื•ืช, ื”ืฆื‘ืขื•ืช ื•ืคืขื™ืœื•ื™ื•ืช ื ื•ืกืคื•ืช.

ืื™ืจื•ืขื™ื ื‘ืจืžืช ื”ื“ืฃ

ื”ืื–ืŸ ืœืื™ืจื•ืขื™ื ื—ื™ื™ื ื‘ื“ืฃ ืžืกื•ื™ื (ืชื’ื•ื‘ื•ืช, ื”ืฆื‘ืขื•ืช ื•ื›ื•ืณ):

import { subscribeToChanges, LiveEvent, LiveEventType } from 'fastcomments-sdk/browser';

const config = {
  tenantId: 'your-tenant-id',
  urlId: 'page-url-id',
};

// ื”ื™ืจืฉื ืœืื™ืจื•ืขื™ื ื—ื™ื™ื ืขื‘ื•ืจ ื“ืฃ
const subscription = subscribeToChanges(
  config,
  'your-tenant-id', // tenantIdWS
  'page-url-id',    // urlIdWS  
  'user-session-id', // userIdWS (ืงื‘ืœ ื–ืืช ืžืชื•ืš ื”ืชื’ื•ื‘ื” ืฉืœ getComments)
  (event: LiveEvent) => {
    console.log('Live event received:', event);

    switch (event.type) {
      case LiveEventType.new_comment:
        console.log('New comment:', event.comment);
        // ืขื“ื›ืŸ ืืช ืžืžืฉืง ื”ืžืฉืชืžืฉ ืฉืœืš ืขื ื”ืชื’ื•ื‘ื” ื”ื—ื“ืฉื”
        break;
      case LiveEventType.new_vote:
        console.log('New vote:', event.vote);
        // ืขื“ื›ืŸ ืืช ืกืคื™ืจื•ืช ื”ื”ืฆื‘ืขื•ืช ื‘ืžืžืฉืง ื”ืžืฉืชืžืฉ ืฉืœืš
        break;
      case LiveEventType.updated_comment:
        console.log('Comment updated:', event.comment);
        break;
      default:
        console.log('Other event type:', event.type);
    }

    return true; // ื”ื—ื–ืจ true ืื ื”ืื™ืจื•ืข ื˜ื•ืคืœ
  },
  (isConnected: boolean) => {
    console.log('Connection status:', isConnected ? 'Connected' : 'Disconnected');
  }
);

// ืกื’ื•ืจ ืืช ื”ืžื ื•ื™ ื›ืฉืกื™ื™ืžืช
subscription.close();

ื”ื™ืจืฉื ืœืื™ืจื•ืขื™ ืžืฉืชืžืฉ

ื”ืื–ืŸ ืœืื™ืจื•ืขื™ื ืกืคืฆื™ืคื™ื™ื ืœืžืฉืชืžืฉ (ื”ืชืจืื•ืช, ืื–ื›ื•ืจื™ื ื•ื›ื•ืณ):

import { subscribeToUserFeed, LiveEvent, LiveEventType } from 'fastcomments-sdk/browser';

const userConfig = {
  userIdWS: 'user-session-id', // Get this from getComments response
};

// ื”ื™ืจืฉื ืœืคื™ื“ ื”ืื™ืฉื™ ืฉืœ ื”ืžืฉืชืžืฉ
const userSubscription = subscribeToUserFeed(
  userConfig,
  (event: LiveEvent) => {
    console.log('User event received:', event);

    switch (event.type) {
      case LiveEventType.notification:
        console.log('New notification:', event.notification);
        // ื”ืฆื’ ื”ื•ื“ืขื” ื‘ืžืžืฉืง ื”ืžืฉืชืžืฉ ืฉืœืš
        break;
      case LiveEventType.notification_update:
        console.log('Notification updated:', event.notification);
        break;
      default:
        console.log('Other user event:', event.type);
    }

    return true;
  },
  (isConnected: boolean) => {
    console.log('User feed connection:', isConnected ? 'Connected' : 'Disconnected');
  }
);

// ืกื’ื•ืจ ื›ืฉืกื™ื™ืžืช
userSubscription.close();

ืงื‘ืœืช userIdWS

ืคืจืžื˜ืจ userIdWS ื ื“ืจืฉ ืขื‘ื•ืจ ืื™ืจื•ืขื™ื ื—ื™ื™ื ื•ื ื™ืชืŸ ืœื”ืฉื™ื’ื• ืžืชืฉื•ื‘ื•ืช API:

const response = await sdk.publicApi.getCommentsPublic({
  tenantId: 'your-tenant-id',
  urlId: 'page-id'
});

// ื—ืœืฅ ืืช userIdWS ืžื”ืชื’ื•ื‘ื”
const userIdWS = response.data?.userSessionInfo?.userIdWS;

if (userIdWS) {
  // ื›ืขืช ืืชื” ื™ื›ื•ืœ ืœื”ื™ืจืฉื ืœืื™ืจื•ืขื™ื ื—ื™ื™ื
  const subscription = subscribeToChanges(config, tenantIdWS, urlIdWS, userIdWS, handleEvent);
}

ืžื–ื”ื™ ืฉื™ื“ื•ืจ Internal Link

ืชืจืื” ืฉืขืœื™ืš ืœื”ืขื‘ื™ืจ broadcastId ื‘ื—ืœืง ืžืงืจื™ืื•ืช ื”-API. ื›ืฉืืชื” ืžืงื‘ืœ ืื™ืจื•ืขื™ื, ืชืงื‘ืœ ื—ื–ืจื” ืืช ื”โ€‘ID ื”ื–ื”, ื›ืš ืชื“ืข ืœื”ืชืขืœื ืžื”ืื™ืจื•ืข ืื ืืชื” ืžืชื›ื ืŸ ืœื™ื™ืฉื ืฉื™ื ื•ื™ื™ื ื‘ืื•ืคื˜ื™ืžื™ื•ืช ืžืฆื“ ื”ืœืงื•ื— (ืžื” ืฉืกื‘ื™ืจ ืฉืชืจืฆื” ืœืขืฉื•ืช ื›ื™ื•ื•ืŸ ืฉื–ื” ืžืกืคืง ืืช ื—ื•ื•ื™ื™ืช ื”ืžืฉืชืžืฉ ื”ื˜ื•ื‘ื” ื‘ื™ื•ืชืจ). ื”ืขื‘ืจ ื›ืืŸ UUID. ื”โ€‘ID ืฆืจื™ืš ืœื”ื™ื•ืช ื™ื™ื—ื•ื“ื™ ืžืกืคื™ืง ื›ื“ื™ ืฉืœื ื™ื•ืคื™ืข ืคืขืžื™ื™ื ื‘ืื•ืชื• ืžื•ืฉื‘ ื‘ื“ืคื“ืคืŸ.

import { v4 as uuidv4 } from 'uuid';

const response = await sdk.publicApi.createCommentPublic({
  createCommentParams: {
    tenantId: 'your-tenant-id',
    urlId: 'page-id',
    comment: 'My comment',
    broadcastId: uuidv4() // ืžื–ื”ื” ื™ื™ื—ื•ื“ื™ ืœืคืขื•ืœื” ื–ื•
  }
});

ื ื™ื”ื•ืœ ืฉื’ื™ืื•ืช Internal Link

try {
  const comments = await sdk.publicApi.getCommentsPublic({
    tenantId: 'your-tenant-id',
    urlId: 'page-id'
  });
} catch (error) {
  if (error.response?.status === 404) {
    console.log('Page not found');
  } else {
    console.error('API Error:', error.message);
  }
}

aggregate Internal Link

ืžืื—ื“ ืžืกืžื›ื™ื ืขืœ ื™ื“ื™ ืงื™ื‘ื•ืฆื (ืื ื ืžืกืจ groupBy) ื•ื™ื™ืฉื•ื ืžืกืคืจ ืคืขื•ืœื•ืช. ื ืชืžื›ื•ืช ืคืขื•ืœื•ืช ืฉื•ื ื•ืช (ืœืžืฉืœ sum, countDistinct, avg ื•ื›ื•').

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
aggregationRequest AggregationRequest ื›ืŸ
parentTenantId string ืœื
includeStats boolean ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AggregationResponse


getAuditLogs Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
limit number ืœื
skip number ืœื
order SORTDIR ืœื
after number ืœื
before number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetAuditLogs200Response


blockFromCommentPublic Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
publicBlockFromCommentParams PublicBlockFromCommentParams ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื•ื—ื–ืจ: BlockFromCommentPublic200Response

unBlockCommentPublic Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
publicBlockFromCommentParams PublicBlockFromCommentParams ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UnBlockCommentPublic200Response


checkedCommentsForBlocked Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentIds string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CheckedCommentsForBlocked200Response


blockUserFromComment Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
blockFromCommentParams BlockFromCommentParams ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: BlockFromCommentPublic200Response


createCommentPublic Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ
broadcastId string ื›ืŸ
commentData CommentData ื›ืŸ
sessionId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateCommentPublic200Response


deleteComment Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
contextUserId string ืœื
isLive boolean ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteComment200Response


deleteCommentPublic Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
editKey string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteCommentPublic200Response


deleteCommentVote Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
voteId string ื›ืŸ
urlId string ื›ืŸ
broadcastId string ื›ืŸ
editKey string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteCommentVote200Response


flagComment Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagComment200Response


getComment Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetComment200Response


getComments Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
page number ืœื
limit number ืœื
skip number ืœื
asTree boolean ืœื
skipChildren number ืœื
limitChildren number ืœื
maxTreeDepth number ืœื
urlId string ืœื
userId string ืœื
anonUserId string ืœื
contextUserId string ืœื
hashTag string ืœื
parentId string ืœื
direction SortDirections ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetComments200Response


getCommentsPublic Internal Link

req tenantId urlId

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ
page number ืœื
direction SortDirections ืœื
sso string ืœื
skip number ืœื
skipChildren number ืœื
limit number ืœื
limitChildren number ืœื
countChildren boolean ืœื
fetchPageForCommentId string ืœื
includeConfig boolean ืœื
countAll boolean ืœื
includei10n boolean ืœื
locale string ืœื
modules string ืœื
isCrawler boolean ืœื
includeNotificationCount boolean ืœื
asTree boolean ืœื
maxTreeDepth number ืœื
useFullTranslationIds boolean ืœื
parentId string ืœื
searchText string ืœื
hashTags Array ืœื
userId string ืœื
customConfigStr string ืœื
afterCommentId string ืœื
beforeCommentId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetCommentsPublic200Response


getCommentText Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
editKey string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetCommentText200Response


getCommentVoteUserNames Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
dir number ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetCommentVoteUserNames200Response


lockComment Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: LockComment200Response


pinComment Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PinComment200Response


saveComment Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createCommentParams CreateCommentParams ื›ืŸ
isLive boolean ืœื
doSpamCheck boolean ืœื
sendEmails boolean ืœื
populateNotifications boolean ืœื

ืชืฉื•ื‘ื”

ืžื—ื–ื™ืจ: SaveComment200Response


saveCommentsBulk Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createCommentParams Array ื›ืŸ
isLive boolean ืœื
doSpamCheck boolean ืœื
sendEmails boolean ืœื
populateNotifications boolean ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: Array<SaveComment200Response

setCommentText Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
commentTextUpdateRequest CommentTextUpdateRequest ื›ืŸ
editKey string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: SetCommentText200Response


unBlockUserFromComment Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
unBlockFromCommentParams UnBlockFromCommentParams ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UnBlockCommentPublic200Response


unFlagComment Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagComment200Response


unLockComment Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: LockComment200Response


unPinComment Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PinComment200Response


updateComment Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
body PickAPICommentUpdatableCommentFields ื›ืŸ
contextUserId string ืœื
doSpamCheck boolean ืœื
isLive boolean ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response


voteComment Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
urlId string ื›ืŸ
broadcastId string ื›ืŸ
voteBodyParams VoteBodyParams ื›ืŸ
sessionId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: VoteComment200Response


addDomainConfig Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
addDomainConfigParams AddDomainConfigParams ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AddDomainConfig200Response


deleteDomainConfig Internal Link


ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
domain string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteDomainConfig200Response


getDomainConfig Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
domain string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetDomainConfig200Response


getDomainConfigs Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetDomainConfigs200Response


patchDomainConfig Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
domainToUpdate string ื›ืŸ
patchDomainConfigParams PatchDomainConfigParams ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetDomainConfig200Response


putDomainConfig Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื“ืจื•ืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
domainToUpdate string ื›ืŸ
updateDomainConfigParams UpdateDomainConfigParams ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetDomainConfig200Response


createEmailTemplate Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
createEmailTemplateBody CreateEmailTemplateBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateEmailTemplate200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createEmailTemplate
Copy Copy
1
2const tenantId: string = "tenant_7a9f2b3d";
3
4const createEmailTemplateBody: CreateEmailTemplateBody = {
5 name: "Comment Notification",
6 subject: "New comment on your article: ",
7 htmlBody: "<p> left a comment:</p><blockquote></blockquote>",
8 enabled: true,
9 defaultLocale: "en-US",
10 metadata: { createdBy: "admin@example.com", purpose: "notify_comment" } // ื ืชื•ื ื™ื ื ื•ืกืคื™ื ืื•ืคืฆื™ื•ื ืœื™ื™ื
11};
12
13const result: CreateEmailTemplate200Response = await createEmailTemplate(tenantId, createEmailTemplateBody);
14

deleteEmailTemplate Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteEmailTemplate
Copy Copy
1
2const tenantId: string = "tenant_4b2f6a-4b2f6a2d";
3const templateId: string = "email_template_9f8b7c3e";
4const result: FlagCommentPublic200Response = await deleteEmailTemplate(tenantId, templateId);
5const status: APIStatus | undefined = result?.status
6

deleteEmailTemplateRenderError Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
errorId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteEmailTemplateRenderError
Copy Copy
1
2const tenantId: string = "tenant_8f3b2a9c";
3const id: string = "template_4a1c9f7e";
4const errorId: string = "err_20260112_abc123";
5const result: FlagCommentPublic200Response = await deleteEmailTemplateRenderError(tenantId, id, errorId);
6

getEmailTemplate Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

Returns: GetEmailTemplate200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ getEmailTemplate
Copy Copy
1
2(async () => {
3 const tenantId: string = 'acme-enterprises-123';
4 const id: string = 'welcome-email-template-v2';
5 const locale: string | undefined = 'en-US'; // ื“ื•ื’ืžืช ืคืจืžื˜ืจ ืื•ืคืฆื™ื•ื ืœื™
6 const template: GetEmailTemplate200Response = await getEmailTemplate(tenantId, id);
7 console.log(template, locale);
8})();
9

getEmailTemplateDefinitions Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEmailTemplateDefinitions200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getEmailTemplateDefinitions
Copy Copy
1
2const tenantId: string = 'acme-enterprises-78f2';
3const emailTemplates: GetEmailTemplateDefinitions200Response = await getEmailTemplateDefinitions(tenantId);
4

getEmailTemplateRenderErrors Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEmailTemplateRenderErrors200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getEmailTemplateRenderErrors
Copy Copy
1
2const tenantId: string = "tenant_7b3f2a9c";
3const id: string = "tmpl_4f1b2c9e";
4const skip: number = 25;
5const result: GetEmailTemplateRenderErrors200Response = await getEmailTemplateRenderErrors(tenantId, id, skip);
6

getEmailTemplates Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEmailTemplates200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getEmailTemplates
Copy Copy
1
2const tenantId: string = 'tenant_8f4d2b7c';
3const responseWithoutSkip: GetEmailTemplates200Response = await getEmailTemplates(tenantId);
4const skip: number = 20;
5const responseWithSkip: GetEmailTemplates200Response = await getEmailTemplates(tenantId, skip);
6

renderEmailTemplate Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
renderEmailTemplateBody RenderEmailTemplateBody ื›ืŸ
locale string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: RenderEmailTemplate200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-renderEmailTemplate
Copy Copy
1
2const tenantId: string = 'acme-corp-7f3';
3const renderEmailTemplateBody: RenderEmailTemplateBody = {
4 templateId: 'new-comment-notification',
5 recipientEmail: 'jane.doe@acme.com',
6 variables: {
7 commenterName: 'Samir Patel',
8 commentText: 'I found this article really helpful โ€” thanks for sharing!',
9 threadUrl: 'https://acme.com/blog/123#comments'
10 },
11 includeUnsubscribeLink: true
12};
13const locale: string = 'en-US';
14const response: RenderEmailTemplate200Response = await renderEmailTemplate(tenantId, renderEmailTemplateBody, locale);
15

updateEmailTemplate Internal Link

ืคืจืžื˜ืจื™ื

Name Type ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateEmailTemplateBody UpdateEmailTemplateBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช updateEmailTemplate
Copy Copy
1
2const tenantId: string = 'acme-corp-tenant-01';
3const id: string = 'email_tpl_42b7a9';
4const updateEmailTemplateBody: UpdateEmailTemplateBody = {
5 name: 'Comment Flag Notification',
6 subject: 'A comment was flagged on acme.com',
7 html: '<p>A comment by was flagged. Review at </p>',
8 replyTo: 'noreply@acme.com', // ืฉื“ื” ืื•ืคืฆื™ื•ื ืœื™ ืœื“ื•ื’ืžื”
9 enabled: true,
10 customConfig: { priority: 'high' } // ืคืจืžื˜ืจื™ื ืžื•ืชืืžื™ื ืื•ืคืฆื™ื•ื ืœื™ื™ื
11};
12const response: FlagCommentPublic200Response = await updateEmailTemplate(tenantId, id, updateEmailTemplateBody);
13

getEventLog Internal Link


req tenantId urlId userIdWS

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ
userIdWS string ื›ืŸ
startTime number ื›ืŸ
endTime number ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEventLog200Response


getGlobalEventLog Internal Link

req tenantId urlId userIdWS

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ
userIdWS string ื›ืŸ
startTime number ื›ืŸ
endTime number ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEventLog200Response


createFeedPost Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
createFeedPostParams CreateFeedPostParams ื›ืŸ
broadcastId string ืœื
isLive boolean ืœื
doSpamCheck boolean ืœื
skipDupCheck boolean ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateFeedPost200Response


createFeedPostPublic Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createFeedPostParams CreateFeedPostParams ื›ืŸ
broadcastId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateFeedPostPublic200Response


deleteFeedPostPublic Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
postId string ื›ืŸ
broadcastId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteFeedPostPublic200Response


getFeedPosts Internal Link


req tenantId afterId

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
afterId string ืœื
limit number ืœื
tags Array ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetFeedPosts200Response


getFeedPostsPublic Internal Link

req tenantId afterId

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
afterId string ืœื
limit number ืœื
tags Array ืœื
sso string ืœื
isCrawler boolean ืœื
includeUserInfo boolean ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetFeedPostsPublic200Response

getFeedPostsStats Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
postIds Array ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetFeedPostsStats200Response


getUserReactsPublic Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
postIds Array ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserReactsPublic200Response


reactFeedPostPublic Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
postId string ื›ืŸ
reactBodyParams ReactBodyParams ื›ืŸ
isUndo boolean ืœื
broadcastId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: ReactFeedPostPublic200Response


updateFeedPost Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
feedPost FeedPost ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response


updateFeedPostPublic Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
postId string ื›ืŸ
updateFeedPostParams UpdateFeedPostParams ื›ืŸ
broadcastId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateFeedPostPublic200Response


flagCommentPublic Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
isFlagged boolean ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response


addHashTag Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ืœื
createHashTagBody CreateHashTagBody ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AddHashTag200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-addHashTag
Copy Copy
1
2const tenantId: string = 'tenant_7b2f6c2b';
3const createBody: CreateHashTagBody = {
4 tag: 'feature-request',
5 label: 'Feature Request',
6 description: 'Requests for new functionality in the web client',
7 isActive: true,
8 visibility: 'public',
9 allowedDomains: ['example.com', 'internal.example.com']
10};
11const result: AddHashTag200Response = await addHashTag(tenantId, createBody);
12const resultWithoutTenant: AddHashTag200Response = await addHashTag(undefined, {
13 tag: 'bug',
14 label: 'Bug',
15 description: 'Use for reproducible bugs reported by users',
16 isActive: true,
17 visibility: 'public'
18});
19

addHashTagsBulk Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ืœื
bulkCreateHashTagsBody BulkCreateHashTagsBody ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AddHashTagsBulk200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-addHashTagsBulk
Copy Copy
1
2(async () => {
3 const tenantId: string = 'tenant_3f2b9a';
4 const bulkCreateHashTagsBody: BulkCreateHashTagsBody = {
5 tags: [
6 { name: 'performance', description: 'Comments about site performance', visibleToModeratorsOnly: false },
7 { name: 'feature-request', description: 'Requests for new features', visibleToModeratorsOnly: true }
8 ]
9 };
10 const result: AddHashTagsBulk200Response = await addHashTagsBulk(tenantId, bulkCreateHashTagsBody);
11 const resultWithNoTenant: AddHashTagsBulk200Response = await addHashTagsBulk(undefined, bulkCreateHashTagsBody);
12 console.log(result, resultWithNoTenant);
13})();
14

deleteHashTag Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tag string ื›ืŸ
tenantId string ืœื
deleteHashTagRequest DeleteHashTagRequest ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteHashTag
Copy Copy
1
2const tag: string = 'breaking-news';
3const tenantId: string = 'tenant_42';
4const deleteReq: DeleteHashTagRequest = { removedBy: 'moderator_jane', reason: 'off-topic for this community', deleteAssociatedComments: true } as DeleteHashTagRequest;
5const result: FlagCommentPublic200Response = await deleteHashTag(tag, tenantId, deleteReq);
6

getHashTags Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
page number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetHashTags200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getHashTags
Copy Copy
1
2(async () => {
3 const tenantId: string = "acme-corp-7a9f";
4 const tagsPage1: GetHashTags200Response = await getHashTags(tenantId);
5 const tagsPage2: GetHashTags200Response = await getHashTags(tenantId, 2);
6 console.log(tagsPage1, tagsPage2);
7})();
8

patchHashTag Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tag string ื›ืŸ
tenantId string ืœื
updateHashTagBody UpdateHashTagBody ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PatchHashTag200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-patchHashTag
Copy Copy
1
2const tag: string = 'release-2026';
3const tenantId: string = 'tenant_42';
4const updateHashTagBody: UpdateHashTagBody = {
5 displayName: 'Release 2026',
6 description: 'Discussions and notes for the 2026 product release',
7 isActive: true
8};
9const result: PatchHashTag200Response = await patchHashTag(tag, tenantId, updateHashTagBody);
10

createModerator Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
createModeratorBody CreateModeratorBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateModerator200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createModerator
Copy Copy
1
2const tenantId: string = "tenant_prod_us-east_01";
3const createModeratorBody: CreateModeratorBody = {
4 email: "maria.lopez+mod@fastcompany.com",
5 username: "mlopez_mod",
6 displayName: "Maria Lopez",
7 roles: ["content_moderator"],
8 notifyOnReports: true,
9 metadata: { region: "us-east", team: "community" }
10};
11const result: CreateModerator200Response = await createModerator(tenantId, createModeratorBody);
12

deleteModerator Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
sendEmail string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteModerator
Copy Copy
1
2const tenantId: string = 'acme-tenant-987';
3const moderatorId: string = 'mod-78b2c9a4-3f1e-4d6a';
4const sendEmail: string = 'true';
5const result: FlagCommentPublic200Response = await deleteModerator(tenantId, moderatorId, sendEmail);
6

getModerator Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetModerator200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช getModerator
Copy Copy
1
2const tenantId: string = "tenant_eu_4f8d2b9e";
3const maybeModeratorId: string | undefined = "mod_91c3b7a2"; // ืžืงื•ืจ ืื•ืคืฆื™ื•ื ืœื™ (ื™ื›ื•ืœ ืœื”ื™ื•ืช undefined)
4const moderator: GetModerator200Response = await getModerator(tenantId, maybeModeratorId!);
5

getModerators Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetModerators200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getModerators
Copy Copy
1
2const tenantId: string = "tenant_corp_7f9b2a";
3const moderatorsPage1: GetModerators200Response = await getModerators(tenantId);
4const skip: number = 50;
5const moderatorsPage2: GetModerators200Response = await getModerators(tenantId, skip);
6

sendInvite Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
fromName string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-sendInvite
Copy Copy
1
2const tenantId: string = 'acme-tenant-004';
3const id: string = 'comment_9b7f3a2c';
4const fromName: string = 'Marรญa Hernรกndez';
5const response: FlagCommentPublic200Response = await sendInvite(tenantId, id, fromName);
6

updateModerator Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateModeratorBody UpdateModeratorBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateModerator
Copy Copy
1
2const tenantId: string = '4f8a9c2e-3b6d-4d9e-8c2f-1a2b3c4d5e6f';
3const id: string = 'mod_92a7c4';
4const updateModeratorBodyMinimal: UpdateModeratorBody = { displayName: 'Sophia Patel' };
5const updateModeratorBodyWithOptional: UpdateModeratorBody = {
6 displayName: 'Sophia Patel',
7 email: 'sophia.patel@newsroom.example',
8 permissions: ['remove_comments', 'ban_user'],
9 notifyOnFlag: true // ืคืจืžื˜ืจ ืื•ืคืฆื™ื•ื ืœื™ ืœื“ื•ื’ืžื”
10};
11const result: FlagCommentPublic200Response = await updateModerator(tenantId, id, updateModeratorBodyWithOptional);
12

deleteNotificationCount Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช deleteNotificationCount
Copy Copy
1
2const tenantId: string = 'tenant_7f3a1b2c4d9e';
3const notificationId: string = 'notif_8c9d0a1b2f3e4b7';
4const result: FlagCommentPublic200Response = await deleteNotificationCount(tenantId, notificationId);
5

getCachedNotificationCount Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetCachedNotificationCount200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getCachedNotificationCount
Copy Copy
1
2const tenantId: string = 'acme-tenant-01';
3const baseNotificationId: string = 'notif-000123';
4const idSuffix: string | undefined = undefined; // ื“ื•ื’ืžื” ืœืคืจืžื˜ืจ ืื•ืคืฆื™ื•ื ืœื™
5const notificationId: string = idSuffix ? `${baseNotificationId}-${idSuffix}` : baseNotificationId;
6const result: GetCachedNotificationCount200Response = await getCachedNotificationCount(tenantId, notificationId);
7console.log(result);
8

getNotificationCount Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
userId string ืœื
urlId string ืœื
fromCommentId string ืœื
viewed boolean ืœื
type string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetNotificationCount200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getNotificationCount
Copy Copy
1
2const tenantId: string = 'tenant_8a9b7c';
3const userId: string = 'user_42b3c';
4const urlId: string = 'https://blog.example.com/posts/introducing-new-editor';
5const fromCommentId: string | undefined = undefined;
6const viewed: boolean = false;
7const type: string = 'mention';
8const result: GetNotificationCount200Response = await getNotificationCount(tenantId, userId, urlId, fromCommentId, viewed, type);
9

getNotifications Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
userId string ืœื
urlId string ืœื
fromCommentId string ืœื
viewed boolean ืœื
type string ืœื
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetNotifications200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getNotifications
Copy Copy
1
2(async () => {
3 const tenantId: string = 'tenant_8f3b1a2c';
4 const userId: string = 'user_42';
5 const urlId: string = 'https://news.example.com/articles/2026/01/11/comment-thread';
6 const fromCommentId: string = 'cmt_9a7b';
7 const viewed: boolean = false;
8 const type: string = 'mention';
9 const skip: number = 0;
10 const response: GetNotifications200Response = await getNotifications(tenantId, userId, urlId, fromCommentId, viewed, type, skip);
11 console.log(response);
12})();
13

updateNotification Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateNotificationBody UpdateNotificationBody ื›ืŸ
userId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateNotification
Copy Copy
1
2const tenantId: string = "tenant_86a7b3";
3const id: string = "notif_20260112_01";
4const userId: string = "moderator_42";
5const updateNotificationBody: UpdateNotificationBody = {
6 name: "Flagged comment alert",
7 enabled: true,
8 channels: ["email"],
9 recipients: ["mod-team@news-site.com"],
10 threshold: 1
11};
12
13(async () => {
14 const result: FlagCommentPublic200Response = await updateNotification(tenantId, id, updateNotificationBody, userId);
15 console.log(result);
16})();
17

addPage Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createAPIPageData CreateAPIPageData ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AddPageAPIResponse


deletePage Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชืฉื•ื‘ื”

ืžื—ื–ื™ืจ: DeletePageAPIResponse


getPageByURLId Internal Link


ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
urlId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetPageByURLIdAPIResponse


getPages Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetPagesAPIResponse


patchPage Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateAPIPageData UpdateAPIPageData ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PatchPageAPIResponse


deletePendingWebhookEvent Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deletePendingWebhookEvent
Copy Copy
1
2const tenantId: string = 'tenant_7f4e2b';
3const pendingEventId: string = '9f7b6a8c-3b2a-4c0d-a8e5-1234567890ab';
4const result: FlagCommentPublic200Response = await deletePendingWebhookEvent(tenantId, pendingEventId);
5console.log(result);
6

getPendingWebhookEventCount Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
commentId string ืœื
externalId string ืœื
eventType string ืœื
type string ืœื
domain string ืœื
attemptCountGT number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetPendingWebhookEventCount200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getPendingWebhookEventCount
Copy Copy
1
2(async () => {
3 const tenantId: string = 'tenant_9c3b2b';
4 const commentId: string = 'cmt_f4a1b2';
5 const externalId: string = 'ext-789';
6 const eventType: string = 'comment.created';
7 const type: string = 'delivery';
8 const domain: string = 'app.example.com';
9 const attemptCountGT: number = 2;
10
11 const result: GetPendingWebhookEventCount200Response = await getPendingWebhookEventCount(
12 tenantId,
13 commentId,
14 externalId,
15 eventType,
16 type,
17 domain,
18 attemptCountGT
19 );
20
21 console.log(result);
22})();
23

getPendingWebhookEvents Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string Yes
commentId string No
externalId string No
eventType string No
type string No
domain string No
attemptCountGT number No
skip number No

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetPendingWebhookEvents200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getPendingWebhookEvents
Copy Copy
1
2const tenantId: string = "tenant_78b2f1";
3const commentId: string = "cmt_0042";
4const eventType: string = "comment.created";
5const domain: string = "blog.example.com";
6const attemptCountGT: number = 1;
7const skip: number = 0;
8
9const pending: GetPendingWebhookEvents200Response = await getPendingWebhookEvents(
10 tenantId,
11 commentId,
12 undefined, // externalId
13 eventType,
14 undefined, // type
15 domain,
16 attemptCountGT,
17 skip
18);
19

createQuestionConfig Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createQuestionConfigBody CreateQuestionConfigBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateQuestionConfig200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createQuestionConfig
Copy Copy
1
2const tenantId: string = "tenant_live_7f8b3c2a";
3const customOptions: QuestionConfigCustomOptionsInner[] = [
4 { value: "under18", label: "Under 18" },
5 { value: "18-24", label: "18-24" },
6 { value: "25-34", label: "25-34", defaultSelected: true }
7];
8const createQuestionConfigBody: CreateQuestionConfigBody = {
9 key: "age_range",
10 label: "What is your age range?",
11 required: false, // ืื•ืคืฆื™ื•ื ืœื™: ืœื”ื“ื’ื™ื ื”ืฉืžื˜ื” ืœืขื•ืžืช ื”ื›ืœืœื” ืฉืœ ืฉื“ื•ืช ืื•ืคืฆื™ื•ื ืœื™ื™ื
12 renderingType: QuestionRenderingType.Dropdown,
13 options: customOptions,
14 whenSave: QuestionWhenSave.Always
15};
16const result: CreateQuestionConfig200Response = await createQuestionConfig(tenantId, createQuestionConfigBody);
17

deleteQuestionConfig Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื•ื—ื–ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteQuestionConfig
Copy Copy
1
2async function deleteIfPresent(tenantId: string, id?: string): Promise<FlagCommentPublic200Response | null> {
3 if (!id) return null;
4 const result: FlagCommentPublic200Response = await deleteQuestionConfig(tenantId, id);
5 return result;
6}
7const tenantId: string = 'tenant_acme_001';
8const optionalConfigId: string | undefined = 'qcfg_20260112_01';
9(async (): Promise<void> => {
10 const deleted: FlagCommentPublic200Response | null = await deleteIfPresent(tenantId, optionalConfigId);
11 void deleted;
12})();
13

getQuestionConfig Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string Yes
id string Yes

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetQuestionConfig200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getQuestionConfig
Copy Copy
1
2const tenantId: string = 'acme-corp-47';
3const questionId: string = 'q-2026-01-12-01';
4const result: GetQuestionConfig200Response = await getQuestionConfig(tenantId, questionId);
5function summarizeConfig(cfg: GetQuestionConfig200Response, includeMetadata?: boolean): QuestionConfig | undefined {
6 // includeMetadata ื”ื•ื ืื•ืคืฆื™ื•ื ืœื™; ื”ืžื™ืžื•ืฉ ื”ื•ืฉืžื˜ ืœืฉื ืชืžืฆื•ืช
7 return undefined;
8}
9const summarizedWithMeta: QuestionConfig | undefined = summarizeConfig(result, true);
10const summarizedDefault: QuestionConfig | undefined = summarizeConfig(result);
11

getQuestionConfigs Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetQuestionConfigs200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getQuestionConfigs
Copy Copy
1
2const tenantId: string = 'tenant-42a7b9';
3const firstPage: GetQuestionConfigs200Response = await getQuestionConfigs(tenantId);
4const secondPage: GetQuestionConfigs200Response = await getQuestionConfigs(tenantId, 50);
5

updateQuestionConfig Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string Yes
id string Yes
updateQuestionConfigBody UpdateQuestionConfigBody Yes

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateQuestionConfig
Copy Copy
1
2const tenantId: string = 'tenant-82b3a';
3const id: string = 'qst-20260112';
4const updateQuestionConfigBody: UpdateQuestionConfigBody = { label: 'Age verification', required: true, renderingType: 'singleChoice', customOptions: [{ value: '18-24', label: '18โ€“24' }] } as UpdateQuestionConfigBody;
5const result: FlagCommentPublic200Response = await updateQuestionConfig(tenantId, id, updateQuestionConfigBody);
6

createQuestionResult Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createQuestionResultBody CreateQuestionResultBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateQuestionResult200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createQuestionResult
Copy Copy
1
2const tenantId: string = "fc_tenant_7a3c_us-east-1";
3const metaItem: MetaItem = { key: "referrer", value: "/blog/how-to-comment" };
4const createQuestionResultBody: CreateQuestionResultBody = {
5 questionId: "q_42",
6 commenterId: "user_1984",
7 answer: "yes",
8 score: 4,
9 meta: [metaItem] // ืžื˜ื-ื ืชื•ื ื™ื ืื•ืคืฆื™ื•ื ืœื™ื™ื (ื”ื“ื’ืžื”)
10} as CreateQuestionResultBody;
11const result: CreateQuestionResult200Response = await createQuestionResult(tenantId, createQuestionResultBody);
12

deleteQuestionResult Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ deleteQuestionResult
Copy Copy
1
2const tenantId: string = 'acme-tenant-01';
3const questionResultId: string = '6f1a2b3c-4d5e-6789-abcd-ef0123456789';
4const deletedResult: FlagCommentPublic200Response = await deleteQuestionResult(tenantId, questionResultId);
5console.log(deletedResult);
6

getQuestionResult Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชืฉื•ื‘ื”

ืžื—ื–ื™ืจ: GetQuestionResult200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getQuestionResult
Copy Copy
1
2const tenantId: string = "3fa85f64-5717-4562-b3fc-2c963f66afa6";
3const questionId: string = "question_72f1b9c3a4";
4const result: GetQuestionResult200Response = await getQuestionResult(tenantId, questionId);
5console.log(result);
6

getQuestionResults Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
urlId string ืœื
userId string ืœื
startDate string ืœื
questionId string ืœื
questionIds string ืœื
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetQuestionResults200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getQuestionResults
Copy Copy
1
2const tenantId: string = 'tenant_42';
3const urlId: string = 'news/2025/fastcomments-release';
4const userId: string = 'user_8b7f3c';
5const startDate: string = '2025-01-01T00:00:00Z';
6const questionIds: string = 'q123,q124';
7const skip: number = 20;
8const result: GetQuestionResults200Response = await getQuestionResults(tenantId, urlId, userId, startDate, undefined, questionIds, skip);
9

updateQuestionResult Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
updateQuestionResultBody UpdateQuestionResultBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateQuestionResult
Copy Copy
1
2const tenantId: string = 'tenant_84f2b9';
3const id: string = 'question_3a7c1d';
4const updateQuestionResultBody: UpdateQuestionResultBody = {
5 result: { verdict: 'helpful', confidence: 0.92 },
6 reviewer: { id: 'mod_102', name: 'Aisha Rahman' },
7 notifyUser: true // ืคืจืžื˜ืจ ืื•ืคืฆื™ื•ื ืœื™ ื›ืœื•ืœ
8};
9const response: FlagCommentPublic200Response = await updateQuestionResult(tenantId, id, updateQuestionResultBody);
10

aggregateQuestionResults Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
questionId string ืœื
questionIds Array ืœื
urlId string ืœื
timeBucket AggregateTimeBucket ืœื
startDate Date ืœื
forceRecalculate boolean ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AggregateQuestionResults200Response


bulkAggregateQuestionResults Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
bulkAggregateQuestionResultsRequest BulkAggregateQuestionResultsRequest ื›ืŸ
forceRecalculate boolean ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: BulkAggregateQuestionResults200Response


combineCommentsWithQuestionResults Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
questionId string ืœื
questionIds Array ืœื
urlId string ืœื
startDate Date ืœื
forceRecalculate boolean ืœื
minValue number ืœื
maxValue number ืœื
limit number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CombineCommentsWithQuestionResults200Response


addSSOUser Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createAPISSOUserData CreateAPISSOUserData ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AddSSOUserAPIResponse


deleteSSOUser Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
deleteComments boolean ืœื
commentDeleteMode string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteSSOUserAPIResponse


getSSOUserByEmail Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
email string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetSSOUserByEmailAPIResponse


getSSOUserById Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetSSOUserByIdAPIResponse


getSSOUsers Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetSSOUsers200Response


patchSSOUser Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateAPISSOUserData UpdateAPISSOUserData ื›ืŸ
updateComments boolean ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PatchSSOUserAPIResponse

putSSOUser Internal Link


ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
updateAPISSOUserData UpdateAPISSOUserData ื›ืŸ
updateComments boolean ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PutSSOUserAPIResponse


createSubscription Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createAPIUserSubscriptionData CreateAPIUserSubscriptionData ื›ืŸ

ืชืฉื•ื‘ื”

ืžื—ื–ื™ืจ: CreateSubscriptionAPIResponse

deleteSubscription Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
userId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteSubscriptionAPIResponse


getSubscriptions Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
userId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetSubscriptionsAPIResponse


getTenantDailyUsages Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
yearNumber number ืœื
monthNumber number ืœื
dayNumber number ืœื
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenantDailyUsages200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getTenantDailyUsages
Copy Copy
1
2const tenantId: string = "tenant_89f3c2-prod";
3const yearNumber: number = 2026;
4const monthNumber: number = 1;
5const skip: number = 0;
6const usages: GetTenantDailyUsages200Response = await getTenantDailyUsages(tenantId, yearNumber, monthNumber, undefined, skip);
7

createTenantPackage Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
createTenantPackageBody CreateTenantPackageBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateTenantPackage200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช createTenantPackage
Copy Copy
1
2const tenantId: string = "tenant_7f3b1a9c";
3const tenantPackage: TenantPackage = { id: "pkg_001", name: "Premium Plan", seats: 100 };
4const customConfig: CustomConfigParameters = { enableImages: true, maxImageSizeMb: 10 };
5const createTenantPackageBody: CreateTenantPackageBody = {
6 packageName: "Premium Plus",
7 tenantPackage,
8 customConfig,
9 notes: "Enable advanced moderation and image uploads" // ื”ื“ื’ืžื” ืฉืœ ืคืจืžื˜ืจ ืื•ืคืฆื™ื•ื ืœื™
10};
11const result: CreateTenantPackage200Response = await createTenantPackage(tenantId, createTenantPackageBody);
12

deleteTenantPackage Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteTenantPackage
Copy Copy
1
2const tenantId: string = 'fc-tenant-8a9c2b';
3const packageId: string = 'pkg-47f3c9';
4const result: FlagCommentPublic200Response = await deleteTenantPackage(tenantId, packageId);
5

getTenantPackage Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenantPackage200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getTenantPackage
Copy Copy
1
2const tenantId: string = 'tenant_westus_01';
3const packageId: string = 'pkg_premium_annual_2026';
4interface FetchOptions { includeArchived?: boolean }
5const options: FetchOptions = { includeArchived: false };
6const result: GetTenantPackage200Response = await getTenantPackage(tenantId, packageId);
7

getTenantPackages Internal Link

Parameters

Name Type Required Description
tenantId string ื›ืŸ
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenantPackages200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getTenantPackages
Copy Copy
1
2const tenantId: string = 'tenant_4f3a9c2d';
3const skip: number = 25;
4const packagesResponse: GetTenantPackages200Response = await getTenantPackages(tenantId);
5const pagedPackagesResponse: GetTenantPackages200Response = await getTenantPackages(tenantId, skip);
6

replaceTenantPackage Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
replaceTenantPackageBody ReplaceTenantPackageBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-replaceTenantPackage
Copy Copy
1
2const tenantId: string = 'tenant-9b72f2';
3const packageId: string = 'pkg-prod-v2';
4const replaceTenantPackageBody: ReplaceTenantPackageBody = {
5 name: 'Premium Moderation Bundle',
6 enabled: true,
7 maxModerators: 4,
8 // ืฉื“ื•ืช ืื•ืคืฆื™ื•ื ืœื™ื™ื ื›ืžื• "notes" ืื• "trialExpiry" ื”ื•ืฉืžื˜ื• ื‘ื›ื•ื•ื ื” ื›ืืŸ
9} as ReplaceTenantPackageBody;
10const result: FlagCommentPublic200Response = await replaceTenantPackage(
11 tenantId,
12 packageId,
13 replaceTenantPackageBody
14);
15

updateTenantPackage Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateTenantPackageBody UpdateTenantPackageBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateTenantPackage
Copy Copy
1
2const tenantId: string = 'tenant_8a4f1c9b';
3const packageId: string = 'pkg_premium_v2';
4const customConfig: CustomConfigParameters = { enableRichText: true, maxImagesPerComment: 5 };
5const updateTenantPackageBody: UpdateTenantPackageBody = {
6 name: 'Premium Moderation Package',
7 enabled: true,
8 description: 'Adds advanced spam rules, image moderation and priority support',
9 customConfigParameters: customConfig
10};
11const result: FlagCommentPublic200Response = await updateTenantPackage(tenantId, packageId, updateTenantPackageBody);
12

createTenantUser Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createTenantUserBody CreateTenantUserBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateTenantUser200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createTenantUser
Copy Copy
1
2const tenantId: string = "tenant_9a8c7e4b";
3const createTenantUserBody: CreateTenantUserBody = {
4 email: "julia.smith@acme-corp.com",
5 displayName: "Julia Smith",
6 role: "moderator",
7 password: "Str0ngP@ssword!23",
8 sendInviteEmail: true, // ืคืจืžื˜ืจ ืื•ืคืฆื™ื•ื ืœื™ ืžื•ืฆื’
9 locale: "en-US",
10 metadata: { department: "Customer Success" }
11};
12const result: CreateTenantUser200Response = await createTenantUser(tenantId, createTenantUserBody);
13

deleteTenantUser Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
deleteComments string ืœื
commentDeleteMode string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteTenantUser
Copy Copy
1
2const tenantId: string = 'tenant_8f3b2a9c';
3const id: string = 'user_4e5f6a7b';
4const deleteComments: string = 'true';
5const commentDeleteMode: string = 'hard';
6
7const result: FlagCommentPublic200Response = await deleteTenantUser(tenantId, id, deleteComments, commentDeleteMode);
8

getTenantUser Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenantUser200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getTenantUser
Copy Copy
1
2const tenantId: string = "tenant_9f7d4b2a-1c3e";
3const id: string = "user_6a12b3c4d5";
4const includeProfile: boolean | undefined = true; // ื“ื•ื’ืžื” ืœืคืจืžื˜ืจ ืื•ืคืฆื™ื•ื ืœื™
5const response: GetTenantUser200Response = await getTenantUser(tenantId, id);
6console.log("Tenant user fetched", response);
7

getTenantUsers Internal Link


ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenantUsers200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ getTenantUsers
Copy Copy
1
2const tenantId: string = 'tenant_8f3b2c1a';
3const skip: number = 50;
4const firstPage: GetTenantUsers200Response = await getTenantUsers(tenantId);
5const nextPage: GetTenantUsers200Response = await getTenantUsers(tenantId, skip);
6

replaceTenantUser Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
replaceTenantUserBody ReplaceTenantUserBody ื›ืŸ
updateComments string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ replaceTenantUser
Copy Copy
1
2const tenantId: string = "tenant_5f8b9a";
3const id: string = "user_92bf21";
4const replaceTenantUserBody: ReplaceTenantUserBody = {
5 email: "jane.doe@acme-corp.com",
6 displayName: "Jane Doe",
7 externalId: "acme|12345",
8 roles: ["commenter", "moderator"],
9 isActive: true,
10 metadata: { team: "product", location: "NYC" }
11};
12const updateComments: string = "Update historical comments to reflect new display name";
13const result: FlagCommentPublic200Response = await replaceTenantUser(tenantId, id, replaceTenantUserBody, updateComments);
14

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
redirectURL string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช sendLoginLink
Copy Copy
1
2const tenantId: string = 'tenant_acme_01';
3const id: string = 'user_9f3b2a';
4const redirectURL: string = 'https://app.example.com/onboard?source=login-email';
5const result: FlagCommentPublic200Response = await sendLoginLink(tenantId, id, redirectURL);
6

updateTenantUser Internal Link


ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
updateTenantUserBody UpdateTenantUserBody ื›ืŸ
updateComments string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateTenantUser
Copy Copy
1
2const tenantId: string = 'tenant_84f3b2';
3const id: string = 'user_7a9d1c';
4const updateComments: string = 'Promoted to moderator and updated contact email';
5const updateTenantUserBody: UpdateTenantUserBody = {
6 email: 'jane.doe+mod@example.com',
7 displayName: 'Jane D.',
8 roles: ['moderator'],
9 isBanned: false,
10 metadata: { department: 'community' }
11};
12const result: FlagCommentPublic200Response = await updateTenantUser(tenantId, id, updateTenantUserBody, updateComments);
13

createTenant Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createTenantBody CreateTenantBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateTenant200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createTenant
Copy Copy
1
2const tenantId: string = "acme-corporation";
3const billing: BillingInfo = { planId: "pro", billingContactEmail: "finance@acme-corp.com", currency: "USD" };
4const domainConfig: APIDomainConfiguration = { primaryDomain: "comments.acme-corp.com", allowedDomains: ["acme-corp.com", "www.acme-corp.com"], enforceHttps: true };
5const importedSites: ImportedSiteType[] = [{ siteId: "site-001", url: "https://blog.acme-corp.com", name: "Acme Blog" }]; // ืื•ืคืฆื™ื•ื ืœื™
6const createBody: CreateTenantBody = { tenantName: "Acme Corporation", adminEmail: "admin@acme-corp.com", billingInfo: billing, domainConfiguration: domainConfig, importedSites, enableModeration: true };
7const response: CreateTenant200Response = await createTenant(tenantId, createBody);
8

deleteTenant Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
sure string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteTenant
Copy Copy
1
2const tenantId: string = "tenant_7b3f1a9e";
3const id: string = "flag_9c4d2b1a";
4const sure: string = "yes_confirm_delete";
5
6const result: FlagCommentPublic200Response = await deleteTenant(tenantId, id, sure);
7console.log(result);
8

getTenant Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenant200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช getTenant
Copy Copy
1
2const tenantId: string = "tenant_acme_corp";
3const id: string = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
4interface GetOptions { includeDeleted?: boolean; locale?: string; }
5const options: GetOptions = { locale: "en-US" };
6const result: GetTenant200Response = await getTenant(tenantId, id);
7

getTenants Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
meta string ืœื
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenants200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getTenants
Copy Copy
1
2(async () => {
3 const tenantId: string = 'tenant_9f2d1b7c';
4 const meta: string = 'include=domains,billing,customConfig';
5 const skip: number = 20;
6 const response: GetTenants200Response = await getTenants(tenantId, meta, skip);
7 console.log(response);
8})();
9

updateTenant Internal Link


ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
updateTenantBody UpdateTenantBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateTenant
Copy Copy
1
2const tenantId: string = "tenant_01H4ZQ7KABCD";
3const id: string = "site_9f8e7d6c";
4const apiDomainConfiguration: APIDomainConfiguration = {
5 primaryDomain: "comments.acme.com",
6 allowSubdomains: true
7};
8const billingInfo: BillingInfo = {
9 planName: "Business",
10 billingContactEmail: "billing@acme.com",
11 seats: 25
12};
13const updateTenantBody: UpdateTenantBody = {
14 displayName: "Acme Corporation Comments",
15 apiDomainConfiguration,
16 billingInfo, // ืคืจืžื˜ืจ ืื•ืคืฆื™ื•ื ืœื™ ืœื”ื“ื’ืžื”
17 enableModeration: true
18};
19const result: FlagCommentPublic200Response = await updateTenant(tenantId, id, updateTenantBody);
20

uploadImage Internal Link

ื”ืขืœื” ื•ืฉื ื” ื’ื•ื“ืœ ืชืžื•ื ื”

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
file Blob ื›ืŸ
sizePreset SizePreset ืœื
urlId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UploadImageResponse


getUserBadgeProgressById Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserBadgeProgressById200Response


getUserBadgeProgressByUserId Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
userId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserBadgeProgressById200Response


getUserBadgeProgressList Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
userId string ืœื
limit number ืœื
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserBadgeProgressList200Response


createUserBadge Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
createUserBadgeParams CreateUserBadgeParams ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateUserBadge200Response


deleteUserBadge Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UpdateUserBadge200Response


getUserBadge Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserBadge200Response


getUserBadges Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
userId string ืœื
badgeId string ืœื
type number ืœื
displayedOnComments boolean ืœื
limit number ืœื
skip number ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserBadges200Response


updateUserBadge Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateUserBadgeParams UpdateUserBadgeParams ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UpdateUserBadge200Response


getUserNotificationCount Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserNotificationCount200Response


getUserNotifications Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
pageSize number ืœื
afterId string ืœื
includeContext boolean ืœื
afterCreatedAt number ืœื
unreadOnly boolean ืœื
dmOnly boolean ืœื
noDm boolean ืœื
includeTranslations boolean ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserNotifications200Response


resetUserNotificationCount Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: ResetUserNotifications200Response

resetUserNotifications Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
afterId string ืœื
afterCreatedAt number ืœื
unreadOnly boolean ืœื
dmOnly boolean ืœื
noDm boolean ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: ResetUserNotifications200Response


updateUserNotificationCommentSubscriptionStatus Internal Link

ื”ืคืขืœ ืื• ื”ืฉื‘ืช ื”ืชืจืื•ืช ืขื‘ื•ืจ ืชื’ื•ื‘ื” ืกืคืฆื™ืคื™ืช.

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
notificationId string ื›ืŸ
optedInOrOut UpdateUserNotificationCommentSubscriptionStatusOptedInOrOutEnum ื›ืŸ
commentId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UpdateUserNotificationStatus200Response


updateUserNotificationPageSubscriptionStatus Internal Link

ื”ืคืขืœ ืื• ื”ืฉื‘ืช ื”ืชืจืื•ืช ืขื‘ื•ืจ ื“ืฃ. ื›ืฉืžืฉืชืžืฉื™ื ืžื ื•ื™ื™ื ืœื“ืฃ, ื ื•ืฆืจื™ื ื”ืชืจืื•ืช ืขื‘ื•ืจ ืชื’ื•ื‘ื•ืช ืฉื•ืจืฉ ื—ื“ืฉื•ืช, ื•ื’ื

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ
url string ื›ืŸ
pageTitle string ื›ืŸ
subscribedOrUnsubscribed UpdateUserNotificationPageSubscriptionStatusSubscribedOrUnsubscribedEnum ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UpdateUserNotificationStatus200Response

updateUserNotificationStatus Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
notificationId string ื›ืŸ
newStatus UpdateUserNotificationStatusNewStatusEnum ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UpdateUserNotificationStatus200Response


getUserPresenceStatuses Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlIdWS string ื›ืŸ
userIds string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserPresenceStatuses200Response


searchUsers Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
urlId string ื›ืŸ
usernameStartsWith string ื›ืŸ
mentionGroupIds Array ืœื
sso string ืœื

Response

ืžื—ื–ื™ืจ: SearchUsers200Response


getUser Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUser200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getUser
Copy Copy
1
2const tenantId: string = "acme-publishing-42";
3const userIdOptional: string | undefined = "user_9d7b4c"; // may be undefined in some flows (optional)
4const id: string = userIdOptional ?? "user_default_0001";
5const result: GetUser200Response = await getUser(tenantId, id);
6console.log(result);
7

createVote Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
direction CreateVoteDirectionEnum ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: VoteComment200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createVote
Copy Copy
1
2(async () => {
3 const tenantId: string = 'acme-tenant-812';
4 const commentId: string = '5e8f8b7a-3d4b-4f1b-9a2e-1c9f2d6a7b8c';
5 const direction: CreateVoteDirectionEnum = CreateVoteDirectionEnum.UP;
6 const anonUserId: string = 'anon-84b9c2d';
7 const voteResult: VoteComment200Response = await createVote(tenantId, commentId, direction, undefined, anonUserId);
8 console.log(voteResult);
9})();
10

deleteVote Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
editKey string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteCommentVote200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteVote
Copy Copy
1
2const tenantId: string = 'tenant_7f3b21c9';
3const id: string = 'vote_4a2d9f1b';
4const editKey: string = 'edit_92b7c6a1';
5
6const resultWithoutEditKey: DeleteCommentVote200Response = await deleteVote(tenantId, id);
7const resultWithEditKey: DeleteCommentVote200Response = await deleteVote(tenantId, id, editKey);
8

getVotes Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
urlId string ื›ืŸ

ืชืฉื•ื‘ื”

ืžื—ื–ื™ืจ: GetVotes200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getVotes
Copy Copy
1
2const tenantId: string = 'tenant_9f8b3c_prod';
3const urlId: string = '/news/2026/typescript-ecosystem-update';
4const votes: GetVotes200Response = await getVotes(tenantId, urlId);
5// ืื ืงื™ื™ื ืคืจืžื˜ืจ ืื•ืคืฆื™ื•ื ืœื™, ืœื“ื•ื’ืžื” includeHidden, ื ื™ืชืŸ ืœื”ืฉืชืžืฉ ื‘ื• ื›ืš:
6// const votesWithHidden: GetVotes200Response = await getVotes(tenantId, urlId, { includeHidden: true });
7

getVotesForUser Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
urlId string ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetVotesForUser200Response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getVotesForUser
Copy Copy
1
2const tenantId: string = 'tenant_acme_01';
3const urlId: string = 'news/2026/01/12/product-launch';
4const userId: string = 'user_9c3f2b';
5const anonUserId: string = 'anon_d4e7a1';
6
7const votesForUser: GetVotesForUser200Response = await getVotesForUser(tenantId, urlId, userId);
8const votesForAnon: GetVotesForUser200Response = await getVotesForUser(tenantId, urlId, undefined, anonUserId);
9

ืฆืจื™ื›ื™ื ืขื–ืจื”?

ืื ืืชื ื ืชืงืœื™ื ื‘ื‘ืขื™ื•ืช ืื• ื™ืฉ ืœื›ื ืฉืืœื•ืช ืœื’ื‘ื™ ื”-JavaScript/TypeScript SDK, ืื ื:

ืชืจื•ืžื•ืช

ืชืจื•ืžื•ืช ืžืชืงื‘ืœื•ืช ื‘ื‘ืจื›ื”! ืื ื ื‘ืงืจื• ื‘-ืžืื’ืจ GitHub ืœืงื‘ืœืช ื”ื ื—ื™ื•ืช ืœืชืจื•ืžื”.