
Getting Started
Documentation
Aggregate
Audit Logs
Block From Comment
Check Blocked Comments
Comments
Domain Configs
Event Log
Feed Posts
Flag Comment
Pages
Question Results Aggregation
SSO Users
Subscriptions
Upload Image
User Badge Progress
User Badges
User Notifications
User Presence Status
User Search
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
"user@example.com".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.
Support 
For issues, questions, or feature requests:
- GitHub Issues: https://github.com/fastcomments/fastcomments-rust
- Documentation: https://docs.fastcomments.com
- Support: support@fastcomments.com
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
Example

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
Example

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
Example

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
Example

checked_comments_for_blocked 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_ids | String | Yes | |
| sso | String | No |
Response
Returns: CheckedCommentsForBlocked200Response
Example

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
Example

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
Example

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
Example

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
Example

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
Example

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
Example

get_comment 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetComment200Response
Example

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
Example

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
Example

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
Example

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
Example

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
Example

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
Example

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
Example

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>
Example

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
Example

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
Example

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
Example

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
Example

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
Example

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
Example

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
Example

add_domain_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| add_domain_config_params | models::AddDomainConfigParams | Yes |
Response
Returns: AddDomainConfig200Response
Example

delete_domain_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| domain | String | Yes |
Response
Returns: DeleteDomainConfig200Response
Example

get_domain_config 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| domain | String | Yes |
Response
Returns: GetDomainConfig200Response
Example

get_domain_configs 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes |
Response
Returns: GetDomainConfigs200Response
Example

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
Example

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
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
Example

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
Example

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
Example

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
Example

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
Example

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
Example

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
Example

get_feed_posts_stats 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_ids | Vec |
Yes | |
| sso | String | No |
Response
Returns: GetFeedPostsStats200Response
Example

get_user_reacts_public 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_ids | Vec |
No | |
| sso | String | No |
Response
Returns: GetUserReactsPublic200Response
Example

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
Example

update_feed_post 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| feed_post | models::FeedPost | Yes |
Response
Returns: FlagCommentPublic200Response
Example

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
Example

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
Example

add_page 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_api_page_data | models::CreateApiPageData | Yes |
Response
Returns: AddPageApiResponse
Example

delete_page 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: DeletePageApiResponse
Example

get_page_by_urlid 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes |
Response
Returns: GetPageByUrlidApiResponse
Example

get_pages 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes |
Response
Returns: GetPagesApiResponse
Example

patch_page 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_api_page_data | models::UpdateApiPageData | Yes |
Response
Returns: PatchPageApiResponse
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
Example

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
Returns: BulkAggregateQuestionResults200Response
Example

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
Returns: CombineCommentsWithQuestionResults200Response
Example

add_sso_user 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_apisso_user_data | models::CreateApissoUserData | Yes |
Response
Returns: AddSsoUserApiResponse
Example

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
Example

get_sso_user_by_email 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| String | Yes |
Response
Returns: GetSsoUserByEmailApiResponse
Example

get_sso_user_by_id 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetSsoUserByIdApiResponse
Example

get_sso_users 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | i32 | No |
Response
Returns: GetSsoUsers200Response
Example

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
Example

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
Example

create_subscription 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_api_user_subscription_data | models::CreateApiUserSubscriptionData | Yes |
Response
Returns: CreateSubscriptionApiResponse
Example

delete_subscription 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| user_id | String | No |
Response
Returns: DeleteSubscriptionApiResponse
Example

get_subscriptions 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | No |
Response
Returns: GetSubscriptionsApiResponse
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
Example

get_user_badge_progress_by_id 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetUserBadgeProgressById200Response
Example

get_user_badge_progress_by_user_id 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | Yes |
Response
Returns: GetUserBadgeProgressById200Response
Example

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
Example

create_user_badge 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_user_badge_params | models::CreateUserBadgeParams | Yes |
Response
Returns: CreateUserBadge200Response
Example

delete_user_badge 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: UpdateUserBadge200Response
Example

get_user_badge 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
Response
Returns: GetUserBadge200Response
Example

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
Example

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
Example

get_user_notification_count 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| sso | String | No |
Response
Returns: GetUserNotificationCount200Response
Example

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
Example

reset_user_notification_count 
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| sso | String | No |
Response
Returns: ResetUserNotifications200Response
Example

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
Example

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
Returns: UpdateUserNotificationStatus200Response
Example

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
Returns: UpdateUserNotificationStatus200Response
Example

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
Returns: UpdateUserNotificationStatus200Response
Example

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
Example

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