
Language 🇺🇸 English
Getting Started
Documentation
Aggregate
Audit Logs
Block From Comment
Check Blocked Comments
Comments
Domain Configs
Email Templates
Event Log
Feed Posts
Flag Comment
Hash Tags
Moderators
Notification Count
Notifications
Pages
Pending Webhook Events
Question Configs
Question Results
Question Results Aggregation
SSO Users
Subscriptions
Tenant Daily Usage
Tenant Packages
Tenant Users
Tenants
Upload Image
User Badge Progress
User Badges
User Notifications
User Presence Status
User Search
Users
Votes
FastComments Rust SDK
This is the official Rust SDK for FastComments.
Official Rust SDK for the FastComments API
Repository
Library Contents 
The FastComments Rust SDK consists of several modules:
Client Module - Auto-generated API client for FastComments REST APIs
- Complete type definitions for all API models
- Both authenticated (
DefaultApi) and public (PublicApi) endpoints - Full async/await support with tokio
- See client/README.md for detailed API documentation
SSO Module - Server-side Single Sign-On utilities
- Secure token generation for user authentication
- Support for both simple and secure SSO modes
- HMAC-SHA256 based token signing
Core Types - Shared type definitions and utilities
- Comment models and metadata structures
- User and tenant configurations
- Helper functions for common operations
Quick Start 
Using the Public API
use fastcomments_sdk::client::apis::configuration::Configuration;
use fastcomments_sdk::client::apis::public_api;
#[tokio::main]
async fn main() {
// Create API configuration
let config = Configuration::new();
// Fetch comments for a page
let result = public_api::get_comments_public(
&config,
public_api::GetCommentsPublicParams {
tenant_id: "your-tenant-id".to_string(),
urlid: Some("page-url-id".to_string()),
url: None,
count_only: None,
skip: None,
limit: None,
sort_dir: None,
page: None,
sso_hash: None,
simple_sso_hash: None,
has_no_comment: None,
has_comment: None,
comment_id_filter: None,
child_ids: None,
start_date_time: None,
starts_with: None,
},
)
.await;
match result {
Ok(response) => {
println!("Found {} comments", response.comments.len());
for comment in response.comments {
println!("Comment: {:?}", comment);
}
}
Err(e) => eprintln!("Error fetching comments: {:?}", e),
}
}
Using the Authenticated API
use fastcomments_sdk::client::apis::configuration::{ApiKey, Configuration};
use fastcomments_sdk::client::apis::default_api;
#[tokio::main]
async fn main() {
// Create configuration with API key
let mut config = Configuration::new();
config.api_key = Some(ApiKey {
prefix: None,
key: "your-api-key".to_string(),
});
// Fetch comments using authenticated API
let result = default_api::get_comments(
&config,
default_api::GetCommentsParams {
tenant_id: "your-tenant-id".to_string(),
skip: None,
limit: None,
sort_dir: None,
urlid: Some("page-url-id".to_string()),
url: None,
is_spam: None,
user_id: None,
all_comments: None,
for_moderation: None,
parent_id: None,
is_flagged: None,
is_flagged_tag: None,
is_by_verified: None,
is_pinned: None,
asc: None,
include_imported: None,
origin: None,
tags: None,
},
)
.await;
match result {
Ok(response) => {
println!("Total comments: {}", response.count);
for comment in response.comments {
println!("Comment ID: {}, Text: {}", comment.id, comment.comment);
}
}
Err(e) => eprintln!("Error: {:?}", e),
}
}
Using SSO for Authentication
use fastcomments_sdk::sso::{
fastcomments_sso::FastCommentsSSO,
secure_sso_user_data::SecureSSOUserData,
};
fn main() {
let api_key = "your-api-key".to_string();
// Create secure SSO user data (server-side only!)
let user_data = SecureSSOUserData::new(
"user-123".to_string(), // User ID
"[email protected]".to_string(), // Email
"John Doe".to_string(), // Username
"https://example.com/avatar.jpg".to_string(), // Avatar URL
);
// Generate SSO token
let sso = FastCommentsSSO::new_secure(api_key, &user_data).unwrap();
let token = sso.create_token().unwrap();
println!("SSO Token: {}", token);
// Pass this token to your frontend for authentication
}
Common Issues 
401 Unauthorized Errors
If you're getting 401 errors when using the authenticated API:
- Check your API key: Ensure you're using the correct API key from your FastComments dashboard
- Verify the tenant ID: Make sure the tenant ID matches your account
- API key format: The API key should be passed in the Configuration:
let mut config = Configuration::new();
config.api_key = Some(ApiKey {
prefix: None,
key: "YOUR_API_KEY".to_string(),
});
SSO Token Issues
If SSO tokens aren't working:
- Use secure mode for production: Always use
FastCommentsSSO::new_secure()with your API key for production - Server-side only: Generate SSO tokens on your server, never expose your API key to clients
- Check user data: Ensure all required fields (id, email, username) are provided
Async Runtime Errors
The SDK uses tokio for async operations. Make sure to:
Add tokio to your dependencies:
[dependencies] tokio = { version = "1", features = ["full"] }Use the tokio runtime:
#[tokio::main] async fn main() { // Your async code here }
Notes 
Broadcast IDs
You'll see you're supposed to pass a broadcastId in some API calls. When you receive events, you'll get this ID back, so you know to ignore the event if you plan to optimistically apply changes on the client
(which you'll probably want to do since it offers the best experience). Pass a UUID here. The ID should be unique enough to not occur twice in a browser session.
aggregate 
Aggregates documents by grouping them (if groupBy is provided) and applying multiple operations. Different operations (e.g. sum, countDistinct, avg, etc.) are supported.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| aggregation_request | models::AggregationRequest | Yes | |
| parent_tenant_id | String | No | |
| include_stats | bool | No |
Response
Returns: AggregationResponse
get_audit_logs 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| limit | f64 | No | |
| skip | f64 | No | |
| order | models::SortDir | No | |
| after | f64 | No | |
| before | f64 | No |
Response
Returns: GetAuditLogs200Response
block_from_comment_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| public_block_from_comment_params | models::PublicBlockFromCommentParams | Yes | |
| sso | String | No |
Response
Returns: BlockFromCommentPublic200Response
un_block_comment_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| public_block_from_comment_params | models::PublicBlockFromCommentParams | Yes | |
| sso | String | No |
Response
Returns: UnBlockCommentPublic200Response
checked_comments_for_blocked 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_ids | String | Yes | |
| sso | String | No |
Response
Returns: CheckedCommentsForBlocked200Response
block_user_from_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| block_from_comment_params | models::BlockFromCommentParams | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
Response
Returns: BlockFromCommentPublic200Response
create_comment_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| broadcast_id | String | Yes | |
| comment_data | models::CommentData | Yes | |
| session_id | String | No | |
| sso | String | No |
Response
Returns: CreateCommentPublic200Response
delete_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| context_user_id | String | No | |
| is_live | bool | No |
Response
Returns: DeleteComment200Response
delete_comment_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | Yes | |
| edit_key | String | No | |
| sso | String | No |
Response
Returns: DeleteCommentPublic200Response
delete_comment_vote 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| vote_id | String | Yes | |
| url_id | String | Yes | |
| broadcast_id | String | Yes | |
| edit_key | String | No | |
| sso | String | No |
Response
Returns: DeleteCommentVote200Response
flag_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
Response
Returns: FlagComment200Response
get_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetComment200Response
get_comment_text 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| edit_key | String | No | |
| sso | String | No |
Response
Returns: GetCommentText200Response
get_comment_vote_user_names 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| dir | i32 | Yes | |
| sso | String | No |
Response
Returns: GetCommentVoteUserNames200Response
get_comments 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| page | i32 | No | |
| limit | i32 | No | |
| skip | i32 | No | |
| as_tree | bool | No | |
| skip_children | i32 | No | |
| limit_children | i32 | No | |
| max_tree_depth | i32 | No | |
| url_id | String | No | |
| user_id | String | No | |
| anon_user_id | String | No | |
| context_user_id | String | No | |
| hash_tag | String | No | |
| parent_id | String | No | |
| direction | models::SortDirections | No |
Response
Returns: GetComments200Response
get_comments_public 
req tenantId urlId
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| page | i32 | No | |
| direction | models::SortDirections | No | |
| sso | String | No | |
| skip | i32 | No | |
| skip_children | i32 | No | |
| limit | i32 | No | |
| limit_children | i32 | No | |
| count_children | bool | No | |
| fetch_page_for_comment_id | String | No | |
| include_config | bool | No | |
| count_all | bool | No | |
| includei10n | bool | No | |
| locale | String | No | |
| modules | String | No | |
| is_crawler | bool | No | |
| include_notification_count | bool | No | |
| as_tree | bool | No | |
| max_tree_depth | i32 | No | |
| use_full_translation_ids | bool | No | |
| parent_id | String | No | |
| search_text | String | No | |
| hash_tags | Vec |
No | |
| user_id | String | No | |
| custom_config_str | String | No | |
| after_comment_id | String | No | |
| before_comment_id | String | No |
Response
Returns: GetCommentsPublic200Response
lock_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | Yes | |
| sso | String | No |
Response
Returns: LockComment200Response
pin_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | Yes | |
| sso | String | No |
Response
Returns: PinComment200Response
save_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_comment_params | models::CreateCommentParams | Yes | |
| is_live | bool | No | |
| do_spam_check | bool | No | |
| send_emails | bool | No | |
| populate_notifications | bool | No |
Response
Returns: SaveComment200Response
save_comments_bulk 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_comment_params | Vecmodels::CreateCommentParams | Yes | |
| is_live | bool | No | |
| do_spam_check | bool | No | |
| send_emails | bool | No | |
| populate_notifications | bool | No |
Response
Returns: Vec<models::SaveComment200Response>
set_comment_text 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | Yes | |
| comment_text_update_request | models::CommentTextUpdateRequest | Yes | |
| edit_key | String | No | |
| sso | String | No |
Response
Returns: SetCommentText200Response
un_block_user_from_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| un_block_from_comment_params | models::UnBlockFromCommentParams | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
Response
Returns: UnBlockCommentPublic200Response
un_flag_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
Response
Returns: FlagComment200Response
un_lock_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | Yes | |
| sso | String | No |
Response
Returns: LockComment200Response
un_pin_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | Yes | |
| sso | String | No |
Response
Returns: PinComment200Response
update_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| body | models::PickApiCommentPeriodUpdatableCommentFields | Yes | |
| context_user_id | String | No | |
| do_spam_check | bool | No | |
| is_live | bool | No |
Response
Returns: FlagCommentPublic200Response
vote_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| url_id | String | Yes | |
| broadcast_id | String | Yes | |
| vote_body_params | models::VoteBodyParams | Yes | |
| session_id | String | No | |
| sso | String | No |
Response
Returns: VoteComment200Response
add_domain_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| add_domain_config_params | models::AddDomainConfigParams | Yes |
Response
Returns: AddDomainConfig200Response
delete_domain_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| domain | String | Yes |
Response
Returns: DeleteDomainConfig200Response
get_domain_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| domain | String | Yes |
Response
Returns: GetDomainConfig200Response
get_domain_configs 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes |
Response
Returns: GetDomainConfigs200Response
patch_domain_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| domain_to_update | String | Yes | |
| patch_domain_config_params | models::PatchDomainConfigParams | Yes |
Response
Returns: GetDomainConfig200Response
put_domain_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| domain_to_update | String | Yes | |
| update_domain_config_params | models::UpdateDomainConfigParams | Yes |
Response
Returns: GetDomainConfig200Response
create_email_template 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_email_template_body | models::CreateEmailTemplateBody | Yes |
Response
Returns: CreateEmailTemplate200Response
Example

delete_email_template 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: FlagCommentPublic200Response
Example

delete_email_template_render_error 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| error_id | String | Yes |
Response
Returns: FlagCommentPublic200Response
Example

get_email_template 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetEmailTemplate200Response
Example

get_email_template_definitions 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes |
Response
Returns: GetEmailTemplateDefinitions200Response
Example

get_email_template_render_errors 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| skip | f64 | No |
Response
Returns: GetEmailTemplateRenderErrors200Response
Example

get_email_templates 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
Response
Returns: GetEmailTemplates200Response
Example

render_email_template 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| render_email_template_body | models::RenderEmailTemplateBody | Yes | |
| locale | String | No |
Response
Returns: RenderEmailTemplate200Response
Example

update_email_template 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_email_template_body | models::UpdateEmailTemplateBody | Yes |
Response
Returns: FlagCommentPublic200Response
Example

get_event_log 
req tenantId urlId userIdWS
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| user_id_ws | String | Yes | |
| start_time | i64 | Yes | |
| end_time | i64 | Yes |
Response
Returns: GetEventLog200Response
get_global_event_log 
req tenantId urlId userIdWS
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| user_id_ws | String | Yes | |
| start_time | i64 | Yes | |
| end_time | i64 | Yes |
Response
Returns: GetEventLog200Response
create_feed_post 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_feed_post_params | models::CreateFeedPostParams | Yes | |
| broadcast_id | String | No | |
| is_live | bool | No | |
| do_spam_check | bool | No | |
| skip_dup_check | bool | No |
Response
Returns: CreateFeedPost200Response
create_feed_post_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_feed_post_params | models::CreateFeedPostParams | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
Response
Returns: CreateFeedPostPublic200Response
delete_feed_post_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
Response
Returns: DeleteFeedPostPublic200Response
get_feed_posts 
req tenantId afterId
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| after_id | String | No | |
| limit | i32 | No | |
| tags | Vec |
No |
Response
Returns: GetFeedPosts200Response
get_feed_posts_public 
req tenantId afterId
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| after_id | String | No | |
| limit | i32 | No | |
| tags | Vec |
No | |
| sso | String | No | |
| is_crawler | bool | No | |
| include_user_info | bool | No |
Response
Returns: GetFeedPostsPublic200Response
get_feed_posts_stats 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_ids | Vec |
Yes | |
| sso | String | No |
Response
Returns: GetFeedPostsStats200Response
get_user_reacts_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_ids | Vec |
No | |
| sso | String | No |
Response
Returns: GetUserReactsPublic200Response
react_feed_post_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_id | String | Yes | |
| react_body_params | models::ReactBodyParams | Yes | |
| is_undo | bool | No | |
| broadcast_id | String | No | |
| sso | String | No |
Response
Returns: ReactFeedPostPublic200Response
update_feed_post 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| feed_post | models::FeedPost | Yes |
Response
Returns: FlagCommentPublic200Response
update_feed_post_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_id | String | Yes | |
| update_feed_post_params | models::UpdateFeedPostParams | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
Response
Returns: CreateFeedPostPublic200Response
flag_comment_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| is_flagged | bool | Yes | |
| sso | String | No |
Response
Returns: FlagCommentPublic200Response
add_hash_tag 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | No | |
| create_hash_tag_body | models::CreateHashTagBody | No |
Response
Returns: AddHashTag200Response
Example

add_hash_tags_bulk 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | No | |
| bulk_create_hash_tags_body | models::BulkCreateHashTagsBody | No |
Response
Returns: AddHashTagsBulk200Response
Example

delete_hash_tag 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tag | String | Yes | |
| tenant_id | String | No | |
| delete_hash_tag_request | models::DeleteHashTagRequest | No |
Response
Returns: FlagCommentPublic200Response
Example

get_hash_tags 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| page | f64 | No |
Response
Returns: GetHashTags200Response
Example

patch_hash_tag 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tag | String | Yes | |
| tenant_id | String | No | |
| update_hash_tag_body | models::UpdateHashTagBody | No |
Response
Returns: PatchHashTag200Response
Example

create_moderator 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_moderator_body | models::CreateModeratorBody | Yes |
Response
Returns: CreateModerator200Response
Example

delete_moderator 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| send_email | String | No |
Response
Returns: FlagCommentPublic200Response
Example

get_moderator 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetModerator200Response
Example

get_moderators 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
Response
Returns: GetModerators200Response
Example

send_invite 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| from_name | String | Yes |
Response
Returns: FlagCommentPublic200Response
Example

update_moderator 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_moderator_body | models::UpdateModeratorBody | Yes |
Response
Returns: FlagCommentPublic200Response
Example

delete_notification_count 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: FlagCommentPublic200Response
Example

get_cached_notification_count 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetCachedNotificationCount200Response
Example

get_notification_count 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | No | |
| url_id | String | No | |
| from_comment_id | String | No | |
| viewed | bool | No |
Response
Returns: GetNotificationCount200Response
Example

get_notifications 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | No | |
| url_id | String | No | |
| from_comment_id | String | No | |
| viewed | bool | No | |
| skip | f64 | No |
Response
Returns: GetNotifications200Response
Example

update_notification 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_notification_body | models::UpdateNotificationBody | Yes | |
| user_id | String | No |
Response
Returns: FlagCommentPublic200Response
Example

add_page 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_api_page_data | models::CreateApiPageData | Yes |
Response
Returns: AddPageApiResponse
delete_page 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: DeletePageApiResponse
get_page_by_urlid 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes |
Response
Returns: GetPageByUrlidApiResponse
get_pages 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes |
Response
Returns: GetPagesApiResponse
patch_page 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_api_page_data | models::UpdateApiPageData | Yes |
Response
Returns: PatchPageApiResponse
delete_pending_webhook_event 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: FlagCommentPublic200Response
Example

get_pending_webhook_event_count 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | No | |
| external_id | String | No | |
| event_type | String | No | |
| domain | String | No | |
| attempt_count_gt | f64 | No |
Response
Returns: GetPendingWebhookEventCount200Response
Example

get_pending_webhook_events 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | No | |
| external_id | String | No | |
| event_type | String | No | |
| domain | String | No | |
| attempt_count_gt | f64 | No | |
| skip | f64 | No |
Response
Returns: GetPendingWebhookEvents200Response
Example

create_question_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_question_config_body | models::CreateQuestionConfigBody | Yes |
Response
Returns: CreateQuestionConfig200Response
Example

delete_question_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: FlagCommentPublic200Response
Example

get_question_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetQuestionConfig200Response
Example

get_question_configs 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
Response
Returns: GetQuestionConfigs200Response
Example

update_question_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_question_config_body | models::UpdateQuestionConfigBody | Yes |
Response
Returns: FlagCommentPublic200Response
Example

create_question_result 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_question_result_body | models::CreateQuestionResultBody | Yes |
Response
Returns: CreateQuestionResult200Response
Example

delete_question_result 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: FlagCommentPublic200Response
Example

get_question_result 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetQuestionResult200Response
Example

get_question_results 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | No | |
| user_id | String | No | |
| start_date | String | No | |
| question_id | String | No | |
| question_ids | String | No | |
| skip | f64 | No |
Response
Returns: GetQuestionResults200Response
Example

update_question_result 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_question_result_body | models::UpdateQuestionResultBody | Yes |
Response
Returns: FlagCommentPublic200Response
Example

aggregate_question_results 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| question_id | String | No | |
| question_ids | Vec |
No | |
| url_id | String | No | |
| time_bucket | models::AggregateTimeBucket | No | |
| start_date | String | No | |
| force_recalculate | bool | No |
Response
Returns: AggregateQuestionResults200Response
bulk_aggregate_question_results 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| bulk_aggregate_question_results_request | models::BulkAggregateQuestionResultsRequest | Yes | |
| force_recalculate | bool | No |
Response
combine_comments_with_question_results 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| question_id | String | No | |
| question_ids | Vec |
No | |
| url_id | String | No | |
| start_date | String | No | |
| force_recalculate | bool | No | |
| min_value | f64 | No | |
| max_value | f64 | No | |
| limit | f64 | No |
Response
add_sso_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_apisso_user_data | models::CreateApissoUserData | Yes |
Response
Returns: AddSsoUserApiResponse
delete_sso_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| delete_comments | bool | No | |
| comment_delete_mode | String | No |
Response
Returns: DeleteSsoUserApiResponse
get_sso_user_by_email 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| String | Yes |
Response
Returns: GetSsoUserByEmailApiResponse
get_sso_user_by_id 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetSsoUserByIdApiResponse
get_sso_users 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | i32 | No |
Response
Returns: GetSsoUsers200Response
patch_sso_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_apisso_user_data | models::UpdateApissoUserData | Yes | |
| update_comments | bool | No |
Response
Returns: PatchSsoUserApiResponse
put_sso_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_apisso_user_data | models::UpdateApissoUserData | Yes | |
| update_comments | bool | No |
Response
Returns: PutSsoUserApiResponse
create_subscription 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_api_user_subscription_data | models::CreateApiUserSubscriptionData | Yes |
Response
Returns: CreateSubscriptionApiResponse
delete_subscription 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| user_id | String | No |
Response
Returns: DeleteSubscriptionApiResponse
get_subscriptions 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | No |
Response
Returns: GetSubscriptionsApiResponse
get_tenant_daily_usages 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| year_number | f64 | No | |
| month_number | f64 | No | |
| day_number | f64 | No | |
| skip | f64 | No |
Response
Returns: GetTenantDailyUsages200Response
Example

create_tenant_package 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_tenant_package_body | models::CreateTenantPackageBody | Yes |
Response
Returns: CreateTenantPackage200Response
Example

delete_tenant_package 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: FlagCommentPublic200Response
Example

get_tenant_package 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetTenantPackage200Response
Example

get_tenant_packages 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
Response
Returns: GetTenantPackages200Response
Example

replace_tenant_package 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| replace_tenant_package_body | models::ReplaceTenantPackageBody | Yes |
Response
Returns: FlagCommentPublic200Response
Example

update_tenant_package 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_tenant_package_body | models::UpdateTenantPackageBody | Yes |
Response
Returns: FlagCommentPublic200Response
Example

create_tenant_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_tenant_user_body | models::CreateTenantUserBody | Yes |
Response
Returns: CreateTenantUser200Response
Example

delete_tenant_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| delete_comments | String | No | |
| comment_delete_mode | String | No |
Response
Returns: FlagCommentPublic200Response
Example

get_tenant_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetTenantUser200Response
Example

get_tenant_users 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
Response
Returns: GetTenantUsers200Response
Example

replace_tenant_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| replace_tenant_user_body | models::ReplaceTenantUserBody | Yes | |
| update_comments | String | No |
Response
Returns: FlagCommentPublic200Response
Example

send_login_link 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| redirect_url | String | No |
Response
Returns: FlagCommentPublic200Response
Example

update_tenant_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_tenant_user_body | models::UpdateTenantUserBody | Yes | |
| update_comments | String | No |
Response
Returns: FlagCommentPublic200Response
Example

create_tenant 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_tenant_body | models::CreateTenantBody | Yes |
Response
Returns: CreateTenant200Response
Example

delete_tenant 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| sure | String | No |
Response
Returns: FlagCommentPublic200Response
Example

get_tenant 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetTenant200Response
Example

get_tenants 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| meta | String | No | |
| skip | f64 | No |
Response
Returns: GetTenants200Response
Example

update_tenant 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_tenant_body | models::UpdateTenantBody | Yes |
Response
Returns: FlagCommentPublic200Response
Example

upload_image 
Upload and resize an image
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| file | std::path::PathBuf | Yes | |
| size_preset | models::SizePreset | No | |
| url_id | String | No |
Response
Returns: UploadImageResponse
get_user_badge_progress_by_id 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetUserBadgeProgressById200Response
get_user_badge_progress_by_user_id 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | Yes |
Response
Returns: GetUserBadgeProgressById200Response
get_user_badge_progress_list 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | No | |
| limit | f64 | No | |
| skip | f64 | No |
Response
Returns: GetUserBadgeProgressList200Response
create_user_badge 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_user_badge_params | models::CreateUserBadgeParams | Yes |
Response
Returns: CreateUserBadge200Response
delete_user_badge 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: UpdateUserBadge200Response
get_user_badge 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetUserBadge200Response
get_user_badges 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | No | |
| badge_id | String | No | |
| displayed_on_comments | bool | No | |
| limit | f64 | No | |
| skip | f64 | No |
Response
Returns: GetUserBadges200Response
update_user_badge 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_user_badge_params | models::UpdateUserBadgeParams | Yes |
Response
Returns: UpdateUserBadge200Response
get_user_notification_count 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| sso | String | No |
Response
Returns: GetUserNotificationCount200Response
get_user_notifications 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| page_size | i32 | No | |
| after_id | String | No | |
| include_context | bool | No | |
| after_created_at | i64 | No | |
| unread_only | bool | No | |
| dm_only | bool | No | |
| no_dm | bool | No | |
| include_translations | bool | No | |
| sso | String | No |
Response
Returns: GetUserNotifications200Response
reset_user_notification_count 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| sso | String | No |
Response
Returns: ResetUserNotifications200Response
reset_user_notifications 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| after_id | String | No | |
| after_created_at | i64 | No | |
| unread_only | bool | No | |
| dm_only | bool | No | |
| no_dm | bool | No | |
| sso | String | No |
Response
Returns: ResetUserNotifications200Response
update_user_notification_comment_subscription_status 
Enable or disable notifications for a specific comment.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| notification_id | String | Yes | |
| opted_in_or_out | String | Yes | |
| comment_id | String | Yes | |
| sso | String | No |
Response
update_user_notification_page_subscription_status 
Enable or disable notifications for a page. When users are subscribed to a page, notifications are created for new root comments, and also
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| url | String | Yes | |
| page_title | String | Yes | |
| subscribed_or_unsubscribed | String | Yes | |
| sso | String | No |
Response
update_user_notification_status 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| notification_id | String | Yes | |
| new_status | String | Yes | |
| sso | String | No |
Response
get_user_presence_statuses 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id_ws | String | Yes | |
| user_ids | String | Yes |
Response
Returns: GetUserPresenceStatuses200Response
search_users 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| username_starts_with | String | Yes | |
| mention_group_ids | Vec |
No | |
| sso | String | No |
Response
Returns: SearchUsers200Response
get_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetUser200Response
Example

create_vote 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| direction | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
Response
Returns: VoteComment200Response
Example

delete_vote 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| edit_key | String | No |
Response
Returns: DeleteCommentVote200Response
Example

get_votes 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes |
Response
Returns: GetVotes200Response
Example

get_votes_for_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
Response
Returns: GetVotesForUser200Response
Example

Need Help?
If you encounter any issues or have questions about the Rust SDK, please:
Contributing
Contributions are welcome! Please visit the GitHub repository for contribution guidelines.