Appearance
Common
About 20120 wordsAbout 67 min
Go-Serverside SDK - Chat API
Table of Contents
- GetApp
- UpdateApp
- ListBlockLists
- CreateBlockList
- GetBlockList
- UpdateBlockList
- DeleteBlockList
- CheckPush
- CheckSNS
- CheckSQS
- ListDevices
- CreateDevice
- DeleteDevice
- ExportUsers
- ListExternalStorage
- CreateExternalStorage
- UpdateExternalStorage
- DeleteExternalStorage
- CheckExternalStorage
- CreateGuest
- CreateImportURL
- ListImports
- CreateImport
- ListImportV2Tasks
- CreateImportV2Task
- GetImporterExternalStorage
- UpsertImporterExternalStorage
- DeleteImporterExternalStorage
- ValidateImporterExternalStorage
- GetImportV2Task
- DeleteImportV2Task
- GetImport
- GetOG
- ListPermissions
- GetPermission
- CreatePoll
- UpdatePoll
- QueryPolls
- GetPoll
- UpdatePollPartial
- DeletePoll
- CreatePollOption
- UpdatePollOption
- GetPollOption
- DeletePollOption
- QueryPollVotes
- UpdatePushNotificationPreferences
- ListPushProviders
- UpsertPushProvider
- DeletePushProvider
- GetPushTemplates
- UpsertPushTemplate
- GetRateLimits
- ListRoles
- CreateRole
- DeleteRole
- GetTask
- UploadFile
- DeleteFile
- UploadImage
- DeleteImage
- ListUserGroups
- CreateUserGroup
- SearchUserGroups
- GetUserGroup
- UpdateUserGroup
- DeleteUserGroup
- AddUserGroupMembers
- RemoveUserGroupMembers
- QueryUsers
- UpdateUsers
- UpdateUsersPartial
- GetBlockedUsers
- BlockUsers
- DeactivateUsers
- DeleteUsers
- GetUserLiveLocations
- UpdateLiveLocation
- ReactivateUsers
- RestoreUsers
- UnblockUsers
- DeactivateUser
- ExportUser
- ReactivateUser
- Types Reference
GetApp
Retrieve the current application settings to understand or verify the configuration. Use this method when you need to view the existing app settings without making changes.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get App Settings
resp, err := client.GetApp(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetApplicationResponse
UpdateApp
Modify the application settings to align with new requirements or preferences. Use this method when you need to update the app configuration.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update App Settings
resp, err := client.UpdateApp(context.Background(), &stream.UpdateAppRequest{
ActivityMetricsConfig: map[string]any{},
AllowedFlagReasons: nil,
ApnConfig: &stream.APNConfig{Disabled: false},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with async_moderation_config and async_url_enrich_enabled
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update App Settings
resp, err := client.UpdateApp(context.Background(), &stream.UpdateAppRequest{
AsyncModerationConfig: &stream.AsyncModerationConfiguration{Callback: stream.AsyncModerationCallbackConfig{Mode: "value"}},
AsyncURLEnrichEnabled: false,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with auto_translation_enabled and before_message_send_hook_url
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update App Settings
resp, err := client.UpdateApp(context.Background(), &stream.UpdateAppRequest{
AutoTranslationEnabled: stream.PtrTo(false),
BeforeMessageSendHookURL: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with cdn_expiration_seconds and channel_hide_members_only
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update App Settings
resp, err := client.UpdateApp(context.Background(), &stream.UpdateAppRequest{
CdnExpirationSeconds: stream.PtrTo(10),
ChannelHideMembersOnly: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ActivityMetricsConfig | map[string]any | No | - |
| AllowedFlagReasons | []string | No | - |
| ApnConfig | APNConfig | No | - |
| AsyncModerationConfig | AsyncModerationConfiguration | No | - |
| AsyncURLEnrichEnabled | bool | No | - |
| AutoTranslationEnabled | bool | No | - |
| BeforeMessageSendHookURL | string | No | - |
| CdnExpirationSeconds | int | No | - |
| ChannelHideMembersOnly | bool | No | - |
| CustomActionHandlerURL | string | No | - |
| DatadogInfo | DataDogInfo | No | - |
| DisableAuthChecks | bool | No | - |
| DisablePermissionsChecks | bool | No | - |
| EnforceUniqueUsernames | string | No | - |
| EventHooks | []EventHook | No | - |
| FeedsModerationEnabled | bool | No | - |
| FeedsV2Region | string | No | - |
| FileUploadConfig | FileUploadConfig | No | - |
| FirebaseConfig | FirebaseConfig | No | - |
| Grants | map[string]any | No | - |
| GuestUserCreationDisabled | bool | No | - |
| HuaweiConfig | HuaweiConfig | No | - |
| ImageModerationBlockLabels | []string | No | - |
| ImageModerationEnabled | bool | No | - |
| ImageModerationLabels | []string | No | - |
| ImageUploadConfig | FileUploadConfig | No | - |
| MaxAggregatedActivitiesLength | int | No | - |
| MigratePermissionsToV2 | bool | No | - |
| ModerationAnalyticsEnabled | bool | No | - |
| ModerationDashboardPreferences | ModerationDashboardPreferences | No | - |
| ModerationEnabled | bool | No | - |
| ModerationS3ImageAccessRoleArn | string | No | - |
| ModerationWebhookURL | string | No | - |
| MultiTenantEnabled | bool | No | - |
| PermissionVersion | string | No | - |
| PushConfig | PushConfig | No | - |
| RemindersInterval | int | No | - |
| RemindersMaxMembers | int | No | - |
| RevokeTokensIssuedBefore | float | No | - |
| SnsKey | string | No | - |
| SnsSecret | string | No | - |
| SnsTopicArn | string | No | - |
| SqsKey | string | No | - |
| SqsSecret | string | No | - |
| SqsURL | string | No | - |
| UserResponseTimeEnabled | bool | No | - |
| UserSearchDisallowedRoles | []string | No | - |
| WebhookEvents | []string | No | - |
| WebhookURL | string | No | - |
| XiaomiConfig | XiaomiConfig | No | - |
ListBlockLists
Get a list of all existing block lists to review or manage them. Use this method when you need an overview of current block lists.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// List block lists
resp, err := client.ListBlockLists(context.Background(), &stream.ListBlockListsRequest{
Team: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Team | string | No | - |
CreateBlockList
Create a new block list to restrict certain content or users as per your criteria. Use this method when setting up a new block list for moderation or content control.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create block list
resp, err := client.CreateBlockList(context.Background(), &stream.CreateBlockListRequest{
Name: "My Feed",
Words: nil,
Type: stream.PtrTo("like"),
IsPluralCheckEnabled: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with team and is_leet_check_enabled
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create block list
resp, err := client.CreateBlockList(context.Background(), &stream.CreateBlockListRequest{
Name: "My Feed",
Words: nil,
Team: stream.PtrTo("value"),
IsLeetCheckEnabled: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | Block list name |
| Words | []string | Yes | List of words to block |
| IsLeetCheckEnabled | bool | No | - |
| IsPluralCheckEnabled | bool | No | - |
| Team | string | No | - |
| Type | string | No | Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word |
GetBlockList
Access a specific block list to view its details and contents. Use this method when you need to inspect the entries of a particular block list.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get block list
resp, err := client.GetBlockList(context.Background(), &stream.GetBlockListRequest{
Name: "My Feed",
Team: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | - |
| Team | string | No | - |
UpdateBlockList
Modify an existing block list to add or remove entries as needed. Use this method when updating the criteria or contents of a block list.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update block list
resp, err := client.UpdateBlockList(context.Background(), &stream.UpdateBlockListRequest{
Name: "My Feed",
IsLeetCheckEnabled: stream.PtrTo(false),
IsPluralCheckEnabled: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with team and words
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update block list
resp, err := client.UpdateBlockList(context.Background(), &stream.UpdateBlockListRequest{
Name: "My Feed",
Team: stream.PtrTo("value"),
Words: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateBlockListResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | - |
| IsLeetCheckEnabled | bool | No | - |
| IsPluralCheckEnabled | bool | No | - |
| Team | string | No | - |
| Words | []string | No | List of words to block |
DeleteBlockList
Remove a specific block list that is no longer needed. Use this method when you want to delete a block list to stop enforcing its restrictions.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete block list
resp, err := client.DeleteBlockList(context.Background(), &stream.DeleteBlockListRequest{
Name: "My Feed",
Team: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | - |
| Team | string | No | - |
CheckPush
Verify the status and functionality of your push notification setup. Use this method to ensure your push notifications are working correctly.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Check push
resp, err := client.CheckPush(context.Background(), &stream.CheckPushRequest{
UserID: stream.PtrTo("john"),
EventType: stream.PtrTo("value"),
FirebaseDataTemplate: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with firebase_template and message_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Check push
resp, err := client.CheckPush(context.Background(), &stream.CheckPushRequest{
FirebaseTemplate: stream.PtrTo("value"),
MessageID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with push_provider_name and push_provider_type
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Check push
resp, err := client.CheckPush(context.Background(), &stream.CheckPushRequest{
PushProviderName: stream.PtrTo("value"),
PushProviderType: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with skip_devices and user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Check push
resp, err := client.CheckPush(context.Background(), &stream.CheckPushRequest{
SkipDevices: stream.PtrTo(false),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CheckPushResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ApnTemplate | string | No | Push message template for APN |
| EventType | string | No | Type of event for push templates (default: message.new). One of: message.new, message.updated, re... |
| FirebaseDataTemplate | string | No | Push message data template for Firebase |
| FirebaseTemplate | string | No | Push message template for Firebase |
| MessageID | string | No | Message ID to send push notification for |
| PushProviderName | string | No | Name of push provider |
| PushProviderType | string | No | Push provider type. One of: firebase, apn, huawei, xiaomi |
| SkipDevices | bool | No | Don't require existing devices to render templates |
| User | UserRequest | No | - |
| UserID | string | No | - |
CheckSNS
Test the integration and functionality of your Amazon SNS (Simple Notification Service) setup. Use this method to confirm SNS is configured and operating as expected.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Check SNS
resp, err := client.CheckSNS(context.Background(), &stream.CheckSNSRequest{
SnsKey: stream.PtrTo("value"),
SnsSecret: stream.PtrTo("value"),
SnsTopicArn: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CheckSNSResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| SnsKey | string | No | AWS SNS access key |
| SnsSecret | string | No | AWS SNS key secret |
| SnsTopicArn | string | No | AWS SNS topic ARN |
CheckSQS
Check the status and operation of your Amazon SQS (Simple Queue Service) configuration. Use this method to ensure that your SQS setup is functioning properly.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Check SQS
resp, err := client.CheckSQS(context.Background(), &stream.CheckSQSRequest{
SqsKey: stream.PtrTo("value"),
SqsSecret: stream.PtrTo("value"),
SqsURL: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CheckSQSResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| SqsKey | string | No | AWS SQS access key |
| SqsSecret | string | No | AWS SQS key secret |
| SqsURL | string | No | AWS SQS endpoint URL |
ListDevices
Retrieve a list of all registered devices associated with your account, useful for managing and monitoring device activity.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// List devices
resp, err := client.ListDevices(context.Background(), &stream.ListDevicesRequest{
UserID: stream.PtrTo("john"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListDevicesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserID | string | No | - |
CreateDevice
Add a new device to your account, enabling it to participate in your chat ecosystem and access related features.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create device
resp, err := client.CreateDevice(context.Background(), &stream.CreateDeviceRequest{
ID: "activity-123",
PushProvider: "value",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with push_provider_name and voip_token
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create device
resp, err := client.CreateDevice(context.Background(), &stream.CreateDeviceRequest{
ID: "activity-123",
PushProvider: "value",
PushProviderName: stream.PtrTo("value"),
VoipToken: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | Device ID |
| PushProvider | string | Yes | Push provider |
| PushProviderName | string | No | Push provider name |
| User | UserRequest | No | - |
| UserID | string | No | Server-side only. User ID which server acts upon |
| VoipToken | bool | No | When true the token is for Apple VoIP push notifications |
DeleteDevice
Remove a specified device from your account, which is helpful for maintaining security and managing active devices.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete device
resp, err := client.DeleteDevice(context.Background(), &stream.DeleteDeviceRequest{
ID: "activity-123",
UserID: stream.PtrTo("john"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| UserID | string | No | - |
ExportUsers
Generate and download a list of all users in your chat system, ideal for backups or data analysis.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Export users
resp, err := client.ExportUsers(context.Background(), &stream.ExportUsersRequest{
UserIds: []string{"user-1", "user-2"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ExportUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserIds | []string | Yes | - |
ListExternalStorage
View all configured external storage options, providing an overview of available storage connections for your data.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// List external storage
resp, err := client.ListExternalStorage(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListExternalStorageResponse
CreateExternalStorage
Set up a new external storage connection to extend your data storage capabilities, allowing for seamless data integration.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create external storage
resp, err := client.CreateExternalStorage(context.Background(), &stream.CreateExternalStorageRequest{
Bucket: "value",
Name: "My Feed",
StorageType: "value",
AWSS3: &stream.S3Request{S3Region: "value", S3APIKey: "value"},
AzureBlob: &stream.AzureRequest{AbsAccountName: "value", AbsClientID: "value", AbsClientSecret: "value", AbsTenantID: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with gcs_credentials and path
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create external storage
resp, err := client.CreateExternalStorage(context.Background(), &stream.CreateExternalStorageRequest{
Bucket: "value",
Name: "My Feed",
StorageType: "value",
GcsCredentials: stream.PtrTo("value"),
Path: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Bucket | string | Yes | The name of the bucket on the service provider |
| Name | string | Yes | The name of the provider, this must be unique |
| StorageType | string | Yes | The type of storage to use |
| AWSS3 | S3Request | No | Only required if you want to create an Amazon S3 storage |
| AzureBlob | AzureRequest | No | Only required if you want to create an Azure Blob Storage |
| GcsCredentials | string | No | - |
| Path | string | No | The path prefix to use for storing files |
UpdateExternalStorage
Modify the settings of an existing external storage connection to ensure it aligns with your current data management needs.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update External Storage
resp, err := client.UpdateExternalStorage(context.Background(), &stream.UpdateExternalStorageRequest{
Name: "My Feed",
Bucket: "value",
StorageType: "value",
AWSS3: &stream.S3Request{S3Region: "value", S3APIKey: "value"},
AzureBlob: &stream.AzureRequest{AbsAccountName: "value", AbsClientID: "value", AbsClientSecret: "value", AbsTenantID: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with gcs_credentials and path
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update External Storage
resp, err := client.UpdateExternalStorage(context.Background(), &stream.UpdateExternalStorageRequest{
Name: "My Feed",
Bucket: "value",
StorageType: "value",
GcsCredentials: stream.PtrTo("value"),
Path: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | - |
| Bucket | string | Yes | The name of the bucket on the service provider |
| StorageType | string | Yes | The type of storage to use |
| AWSS3 | S3Request | No | Only required if you want to create an Amazon S3 storage |
| AzureBlob | AzureRequest | No | Only required if you want to create an Azure Blob Storage |
| GcsCredentials | string | No | - |
| Path | string | No | The path prefix to use for storing files |
DeleteExternalStorage
Remove an external storage configuration, useful for cleaning up unused or obsolete storage connections.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete external storage
resp, err := client.DeleteExternalStorage(context.Background(), &stream.DeleteExternalStorageRequest{
Name: "My Feed",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | - |
CheckExternalStorage
Verify the status and connectivity of your external storage setup, ensuring data integrity and accessibility.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Check External Storage
resp, err := client.CheckExternalStorage(context.Background(), &stream.CheckExternalStorageRequest{
Name: "My Feed",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CheckExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | - |
CreateGuest
Register a temporary guest user, allowing limited access to your chat system for short-term collaboration or testing.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create Guest
resp, err := client.CreateGuest(context.Background(), &stream.CreateGuestRequest{
User: stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateGuestResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| User | UserRequest | Yes | User object which server acts upon |
CreateImportURL
Generates a URL for importing data into the chat application, useful for seamlessly integrating external data sources.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create import URL
resp, err := client.CreateImportURL(context.Background(), &stream.CreateImportURLRequest{
Filename: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateImportURLResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Filename | string | No | - |
ListImports
Retrieves a list of all data imports, allowing users to track and manage their import activities.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get import
resp, err := client.ListImports(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListImportsResponse
CreateImport
Initiates a new data import process, ideal for users looking to upload large datasets into the chat system.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create import
resp, err := client.CreateImport(context.Background(), &stream.CreateImportRequest{
Mode: "value",
Path: "value",
MergeCustom: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateImportResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Mode | string | Yes | - |
| Path | string | Yes | - |
| MergeCustom | bool | No | - |
ListImportV2Tasks
Displays all tasks related to version 2 imports, providing users with a comprehensive overview of their import operations.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// List import v2 tasks
resp, err := client.ListImportV2Tasks(context.Background(), &stream.ListImportV2TasksRequest{
State: stream.PtrTo(10),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListImportV2TasksResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| State | int | No | - |
CreateImportV2Task
Starts a new import task under version 2, enabling users to handle specific import scenarios with updated functionalities.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create import v2 task
resp, err := client.CreateImportV2Task(context.Background(), &stream.CreateImportV2TaskRequest{
Product: "value",
Settings: stream.ImportV2TaskSettings{MergeCustom: false},
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Product | string | Yes | - |
| Settings | ImportV2TaskSettings | Yes | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
GetImporterExternalStorage
Retrieve details of an existing external storage configuration. Use this method to view the current settings and status of your linked external storage.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get external storage
resp, err := client.GetImporterExternalStorage(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetExternalStorageResponse
UpsertImporterExternalStorage
Add or update an external storage configuration. Use this method to ensure your external storage is correctly set up or to modify existing configurations.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Upsert external storage
resp, err := client.UpsertImporterExternalStorage(context.Background(), &stream.UpsertImporterExternalStorageRequest{
Type: "like",
AWSS3: &stream.UpsertExternalStorageAWSS3Request{Bucket: "value", Region: "value", RoleArn: "value", PathPrefix: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpsertExternalStorageResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Type | string | Yes | - |
| AWSS3 | UpsertExternalStorageAWSS3Request | No | - |
DeleteImporterExternalStorage
Remove an existing external storage configuration. Use this when you no longer need to link external storage or to clear outdated configurations.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete external storage
resp, err := client.DeleteImporterExternalStorage(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteExternalStorageResponse
ValidateImporterExternalStorage
Check the validity of an external storage configuration. Use this to ensure that your external storage setup is correctly configured and operational.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Validate external storage
resp, err := client.ValidateImporterExternalStorage(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ValidateExternalStorageResponse
GetImportV2Task
Fetches details of a specific import task in version 2, useful for monitoring progress and diagnosing issues.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get import v2 task
resp, err := client.GetImportV2Task(context.Background(), &stream.GetImportV2TaskRequest{
ID: "activity-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
DeleteImportV2Task
Removes a specific import task from version 2, helping users manage and clean up their import queues.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete import v2 task
resp, err := client.DeleteImportV2Task(context.Background(), &stream.DeleteImportV2TaskRequest{
ID: "activity-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteImportV2TaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
GetImport
Provides information on a specific import, allowing users to review and verify the details of their data uploads.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get import
resp, err := client.GetImport(context.Background(), &stream.GetImportRequest{
ID: "activity-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetImportResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
GetOG
Retrieves Open Graph data, which is helpful for obtaining metadata about shared content such as links or media.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get OG
resp, err := client.GetOG(context.Background(), &stream.GetOGRequest{
URL: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetOGResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| URL | string | Yes | - |
ListPermissions
Lists all permissions available, aiding users in understanding and managing access control within the chat application.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// List permissions
resp, err := client.ListPermissions(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListPermissionsResponse
GetPermission
Retrieve the permissions associated with a user or role to determine access levels within the chat system. Use this method to check if a user has the necessary rights to perform specific actions.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get permission
resp, err := client.GetPermission(context.Background(), &stream.GetPermissionRequest{
ID: "activity-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetCustomPermissionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
CreatePoll
Create a new poll in the chat application to gather opinions or feedback from users. Use this method to initiate a poll with customizable options and parameters.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create poll
resp, err := client.CreatePoll(context.Background(), &stream.CreatePollRequest{
Name: "My Feed",
UserID: stream.PtrTo("john"),
ID: stream.PtrTo("activity-123"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with allow_user_suggested_options and description
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create poll
resp, err := client.CreatePoll(context.Background(), &stream.CreatePollRequest{
Name: "My Feed",
AllowUserSuggestedOptions: stream.PtrTo(false),
Description: stream.PtrTo("A description"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enforce_unique_vote and Custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create poll
resp, err := client.CreatePoll(context.Background(), &stream.CreatePollRequest{
Name: "My Feed",
EnforceUniqueVote: stream.PtrTo(false),
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with is_closed and max_votes_allowed
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create poll
resp, err := client.CreatePoll(context.Background(), &stream.CreatePollRequest{
Name: "My Feed",
IsClosed: stream.PtrTo(false),
MaxVotesAllowed: stream.PtrTo(10),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | The name of the poll |
| Custom | map[string]any | No | - |
| AllowAnswers | bool | No | Indicates whether users can suggest user defined answers |
| AllowUserSuggestedOptions | bool | No | - |
| Description | string | No | A description of the poll |
| EnforceUniqueVote | bool | No | Indicates whether users can cast multiple votes |
| ID | string | No | - |
| IsClosed | bool | No | Indicates whether the poll is open for voting |
| MaxVotesAllowed | int | No | Indicates the maximum amount of votes a user can cast |
| Options | []PollOptionInput | No | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
| VotingVisibility | string | No | - |
UpdatePoll
Modify an existing poll to change its details or options based on new requirements or feedback. Use this method when you need to update the poll's content or settings after creation.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update poll
resp, err := client.UpdatePoll(context.Background(), &stream.UpdatePollRequest{
ID: "activity-123",
Name: "My Feed",
UserID: stream.PtrTo("john"),
AllowAnswers: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with allow_user_suggested_options and description
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update poll
resp, err := client.UpdatePoll(context.Background(), &stream.UpdatePollRequest{
ID: "activity-123",
Name: "My Feed",
AllowUserSuggestedOptions: stream.PtrTo(false),
Description: stream.PtrTo("A description"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with enforce_unique_vote and is_closed
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update poll
resp, err := client.UpdatePoll(context.Background(), &stream.UpdatePollRequest{
ID: "activity-123",
Name: "My Feed",
EnforceUniqueVote: stream.PtrTo(false),
IsClosed: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with max_votes_allowed and options
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update poll
resp, err := client.UpdatePoll(context.Background(), &stream.UpdatePollRequest{
ID: "activity-123",
Name: "My Feed",
MaxVotesAllowed: stream.PtrTo(10),
Options: []stream.PollOptionRequest{{ID: "activity-123", Text: stream.PtrTo("Hello, world!")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | Poll ID |
| Name | string | Yes | Poll name |
| Custom | map[string]any | No | - |
| AllowAnswers | bool | No | Allow answers |
| AllowUserSuggestedOptions | bool | No | Allow user suggested options |
| Description | string | No | Poll description |
| EnforceUniqueVote | bool | No | Enforce unique vote |
| IsClosed | bool | No | Is closed |
| MaxVotesAllowed | int | No | Max votes allowed |
| Options | []PollOptionRequest | No | Poll options |
| User | UserRequest | No | - |
| UserID | string | No | - |
| VotingVisibility | string | No | Voting visibility |
QueryPolls
Retrieve a list of polls based on specific criteria or filters. Use this method to find and review polls that match certain conditions or properties.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Query polls
resp, err := client.QueryPolls(context.Background(), &stream.QueryPollsRequest{
UserID: stream.PtrTo("john"),
Limit: stream.PtrTo(25),
Filter: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with sort and prev
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Query polls
resp, err := client.QueryPolls(context.Background(), &stream.QueryPollsRequest{
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
Prev: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Query polls
resp, err := client.QueryPolls(context.Background(), &stream.QueryPollsRequest{
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryPollsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserID | string | No | - |
| Filter | map[string]any | No | Filter to apply to the query |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Array of sort parameters |
GetPoll
Access detailed information about a specific poll, including its options and current status. Use this method when you need to view the complete details of a particular poll.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get poll
resp, err := client.GetPoll(context.Background(), &stream.GetPollRequest{
PollID: "poll-123",
UserID: stream.PtrTo("john"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PollID | string | Yes | - |
| UserID | string | No | - |
UpdatePollPartial
Make selective updates to certain fields of an existing poll without altering the entire poll. Use this method when you only need to change specific attributes rather than the whole poll structure.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Partial update poll
resp, err := client.UpdatePollPartial(context.Background(), &stream.UpdatePollPartialRequest{
PollID: "poll-123",
UserID: stream.PtrTo("john"),
Unset: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user and set
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Partial update poll
resp, err := client.UpdatePollPartial(context.Background(), &stream.UpdatePollPartialRequest{
PollID: "poll-123",
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
Set: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PollResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PollID | string | Yes | - |
| Set | map[string]any | No | Sets new field values |
| Unset | []string | No | Array of field names to unset |
| User | UserRequest | No | - |
| UserID | string | No | - |
DeletePoll
Remove a poll from the chat application, permanently eliminating it from user access and records. Use this method to clean up outdated or irrelevant polls.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete poll
resp, err := client.DeletePoll(context.Background(), &stream.DeletePollRequest{
PollID: "poll-123",
UserID: stream.PtrTo("john"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PollID | string | Yes | - |
| UserID | string | No | - |
CreatePollOption
Add a new option to an existing poll to expand the choices available to users. Use this method when you need to introduce additional voting options in a poll.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create poll option
resp, err := client.CreatePollOption(context.Background(), &stream.CreatePollOptionRequest{
PollID: "poll-123",
Text: "Hello, world!",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with Custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create poll option
resp, err := client.CreatePollOption(context.Background(), &stream.CreatePollOptionRequest{
PollID: "poll-123",
Text: "Hello, world!",
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PollID | string | Yes | - |
| Text | string | Yes | Option text |
| Custom | map[string]any | No | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
UpdatePollOption
Modify the details of an existing poll option to correct, enhance, or adjust its content. Use this method to refine or update the available choices in a poll.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update poll option
resp, err := client.UpdatePollOption(context.Background(), &stream.UpdatePollOptionRequest{
PollID: "poll-123",
ID: "activity-123",
Text: "Hello, world!",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with Custom
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update poll option
resp, err := client.UpdatePollOption(context.Background(), &stream.UpdatePollOptionRequest{
PollID: "poll-123",
ID: "activity-123",
Text: "Hello, world!",
Custom: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PollID | string | Yes | - |
| ID | string | Yes | Option ID |
| Text | string | Yes | Option text |
| Custom | map[string]any | No | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
GetPollOption
Retrieve detailed information about a specific poll option to understand its current setup and status. Use this method to inspect the details of a particular choice within a poll.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get poll option
resp, err := client.GetPollOption(context.Background(), &stream.GetPollOptionRequest{
PollID: "poll-123",
OptionID: "value",
UserID: stream.PtrTo("john"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PollOptionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PollID | string | Yes | - |
| OptionID | string | Yes | - |
| UserID | string | No | - |
DeletePollOption
Remove a specific option from an existing poll. Use this method when you need to update a poll by eliminating options that are no longer valid or necessary.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete poll option
resp, err := client.DeletePollOption(context.Background(), &stream.DeletePollOptionRequest{
PollID: "poll-123",
OptionID: "value",
UserID: stream.PtrTo("john"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PollID | string | Yes | - |
| OptionID | string | Yes | - |
| UserID | string | No | - |
QueryPollVotes
Retrieve the current vote counts for a specific poll. This method is useful for monitoring poll results and understanding user preferences in real-time.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Query votes
resp, err := client.QueryPollVotes(context.Background(), &stream.QueryPollVotesRequest{
PollID: "poll-123",
UserID: stream.PtrTo("john"),
Limit: stream.PtrTo(25),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with filter and sort
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Query votes
resp, err := client.QueryPollVotes(context.Background(), &stream.QueryPollVotesRequest{
PollID: "poll-123",
Filter: map[string]any{},
Sort: []stream.SortParamRequest{{Direction: stream.PtrTo(-1), Field: stream.PtrTo("created_at"), Type: stream.PtrTo("like")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with prev and next
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Query votes
resp, err := client.QueryPollVotes(context.Background(), &stream.QueryPollVotesRequest{
PollID: "poll-123",
Prev: nil,
Next: nil,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: PollVotesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PollID | string | Yes | - |
| UserID | string | No | - |
| Filter | map[string]any | No | Filter to apply to the query |
| Limit | int | No | - |
| Next | string | No | - |
| Prev | string | No | - |
| Sort | []SortParamRequest | No | Array of sort parameters |
UpdatePushNotificationPreferences
Modify the push notification settings for a user or application. Use this method to customize how and when notifications are delivered to enhance user engagement.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Push notification preferences
resp, err := client.UpdatePushNotificationPreferences(context.Background(), &stream.UpdatePushNotificationPreferencesRequest{
Preferences: []stream.PushPreferenceInput{{UserID: stream.PtrTo("john")}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpsertPushPreferencesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Preferences | []PushPreferenceInput | Yes | A list of push preferences for channels, calls, or the user. |
ListPushProviders
Get a list of available push notification providers integrated with your application. This method helps you understand which services are available for sending notifications to users.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// List push providers
resp, err := client.ListPushProviders(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListPushProvidersResponse
UpsertPushProvider
Add or update a push notification provider in your system. Use this method to manage your notification delivery services, ensuring they are correctly configured and up-to-date.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Upsert a push provider
resp, err := client.UpsertPushProvider(context.Background(), &stream.UpsertPushProviderRequest{
PushProvider: &stream.PushProviderRequest{Name: "My Feed", ApnAuthKey: "value"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpsertPushProviderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PushProvider | PushProviderRequest | No | - |
DeletePushProvider
Remove a push notification provider from your application’s configuration. Use this method to clean up unused or deprecated providers and streamline your notification setup.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete a push provider
resp, err := client.DeletePushProvider(context.Background(), &stream.DeletePushProviderRequest{
Type: "like",
Name: "My Feed",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Type | string | Yes | - |
| Name | string | Yes | - |
GetPushTemplates
Retrieve a list of available push notification templates. This method is useful for managing and selecting pre-defined message formats to ensure consistent communication with users.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get push notification templates
resp, err := client.GetPushTemplates(context.Background(), &stream.GetPushTemplatesRequest{
PushProviderType: "value",
PushProviderName: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetPushTemplatesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PushProviderType | string | Yes | - |
| PushProviderName | string | No | - |
UpsertPushTemplate
Create or update a push notification template to streamline the creation of consistent and professional notifications. Use this method to manage your message templates efficiently.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Upsert a push notification template
resp, err := client.UpsertPushTemplate(context.Background(), &stream.UpsertPushTemplateRequest{
EventType: "value",
PushProviderType: "value",
EnablePush: stream.PtrTo(false),
PushProviderName: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with template
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Upsert a push notification template
resp, err := client.UpsertPushTemplate(context.Background(), &stream.UpsertPushTemplateRequest{
EventType: "value",
PushProviderType: "value",
Template: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpsertPushTemplateResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| EventType | string | Yes | Event type. One of: message.new, message.updated, reaction.new, notification.reminder_due, feeds.... |
| PushProviderType | string | Yes | Push provider type. One of: firebase, apn, huawei, xiaomi |
| EnablePush | bool | No | Whether to send push notification for this event |
| PushProviderName | string | No | Push provider name |
| Template | string | No | Push template |
GetRateLimits
Fetch the current rate limits applicable to your account or application. Use this method to understand your usage boundaries and prevent exceeding limits that could disrupt service.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get rate limits
resp, err := client.GetRateLimits(context.Background(), &stream.GetRateLimitsRequest{
ServerSide: stream.PtrTo(false),
Android: stream.PtrTo(false),
Ios: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with web and endpoints
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get rate limits
resp, err := client.GetRateLimits(context.Background(), &stream.GetRateLimitsRequest{
Web: stream.PtrTo(false),
Endpoints: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetRateLimitsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ServerSide | bool | No | - |
| Android | bool | No | - |
| Ios | bool | No | - |
| Web | bool | No | - |
| Endpoints | string | No | - |
ListRoles
Obtain a list of roles defined within your application, along with their associated permissions. This method is helpful for managing user access and ensuring appropriate permissions are assigned.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// List roles
resp, err := client.ListRoles(context.Background())
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListRolesResponse
CreateRole
Create a new role within the chat application to define user permissions and access levels; use this when setting up or modifying user roles.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create role
resp, err := client.CreateRole(context.Background(), &stream.CreateRoleRequest{
Name: "My Feed",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateRoleResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | Role name |
DeleteRole
Remove an existing role from the chat application to revoke associated permissions and access; use this when a role is no longer needed.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete role
resp, err := client.DeleteRole(context.Background(), &stream.DeleteRoleRequest{
Name: "My Feed",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | - |
GetTask
Retrieve the current status of a specific task to monitor progress or completion; use this to track task execution.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get status of a task
resp, err := client.GetTask(context.Background(), &stream.GetTaskRequest{
ID: "activity-123",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetTaskResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
UploadFile
Upload a file to the chat application to share it with other users or for storage; use this to facilitate file sharing and management.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Upload file
resp, err := client.UploadFile(context.Background(), &stream.UploadFileRequest{
File: stream.PtrTo("value"),
User: &stream.OnlyUserID{ID: "activity-123"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: FileUploadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| File | string | No | file field |
| User | OnlyUserID | No | user for the request server side only |
DeleteFile
Remove a previously uploaded file from the chat application to free up space or maintain data privacy; use this to manage file storage.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete file
resp, err := client.DeleteFile(context.Background(), &stream.DeleteFileRequest{
URL: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| URL | string | No | - |
UploadImage
Upload an image to the chat application to share it with other users or for visual content storage; use this to enhance conversations with images.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Upload image
resp, err := client.UploadImage(context.Background(), &stream.UploadImageRequest{
File: stream.PtrTo("value"),
UploadSizes: []stream.ImageSize{},
User: &stream.OnlyUserID{ID: "activity-123"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ImageUploadResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| File | string | No | - |
| UploadSizes | []ImageSize | No | field with JSON-encoded array of image size configurations |
| User | OnlyUserID | No | - |
DeleteImage
Remove a previously uploaded image from the chat application to manage storage or privacy; use this to control visual content availability.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete image
resp, err := client.DeleteImage(context.Background(), &stream.DeleteImageRequest{
URL: "value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| URL | string | No | - |
ListUserGroups
Retrieve a list of all user groups. Use this to view and manage the groups available within your application.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// List user groups
resp, err := client.ListUserGroups(context.Background(), &stream.ListUserGroupsRequest{
Limit: stream.PtrTo(25),
IDGt: stream.PtrTo("value"),
CreatedAtGt: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with team_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// List user groups
resp, err := client.ListUserGroups(context.Background(), &stream.ListUserGroupsRequest{
TeamID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ListUserGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Limit | int | No | - |
| IDGt | string | No | - |
| CreatedAtGt | string | No | - |
| TeamID | string | No | - |
CreateUserGroup
Create a new user group. Use this method to organize users into groups for better management and access control.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create user group
resp, err := client.CreateUserGroup(context.Background(), &stream.CreateUserGroupRequest{
Name: "My Feed",
ID: stream.PtrTo("activity-123"),
Description: stream.PtrTo("A description"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with member_ids and team_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Create user group
resp, err := client.CreateUserGroup(context.Background(), &stream.CreateUserGroupRequest{
Name: "My Feed",
MemberIds: nil,
TeamID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: CreateUserGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | The user friendly name of the user group |
| Description | string | No | An optional description for the group |
| ID | string | No | Optional user group ID. If not provided, a UUID v7 will be generated |
| MemberIds | []string | No | Optional initial list of user IDs to add as members |
| TeamID | string | No | Optional team ID to scope the group to a team |
SearchUserGroups
Find user groups based on specific criteria. Use this to quickly locate groups that meet your search parameters.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Search user groups
resp, err := client.SearchUserGroups(context.Background(), &stream.SearchUserGroupsRequest{
Query: "value",
Limit: stream.PtrTo(25),
NameGt: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with id_gt and team_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Search user groups
resp, err := client.SearchUserGroups(context.Background(), &stream.SearchUserGroupsRequest{
Query: "value",
IDGt: stream.PtrTo("value"),
TeamID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: SearchUserGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Query | string | Yes | - |
| Limit | int | No | - |
| NameGt | string | No | - |
| IDGt | string | No | - |
| TeamID | string | No | - |
GetUserGroup
Retrieve details of a specific user group. Use this to view information about a particular group and its members.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get user group
resp, err := client.GetUserGroup(context.Background(), &stream.GetUserGroupRequest{
ID: "activity-123",
TeamID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetUserGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| TeamID | string | No | - |
UpdateUserGroup
Modify the details of an existing user group. Use this method to change group settings or update group information.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update user group
resp, err := client.UpdateUserGroup(context.Background(), &stream.UpdateUserGroupRequest{
ID: "activity-123",
Name: stream.PtrTo("My Feed"),
Description: stream.PtrTo("A description"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with team_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update user group
resp, err := client.UpdateUserGroup(context.Background(), &stream.UpdateUserGroupRequest{
ID: "activity-123",
TeamID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateUserGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| Description | string | No | The new description for the group |
| Name | string | No | The new name of the user group |
| TeamID | string | No | - |
DeleteUserGroup
Remove a user group from the system. Use this to delete groups that are no longer needed, ensuring the organization of your user base.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete user group
resp, err := client.DeleteUserGroup(context.Background(), &stream.DeleteUserGroupRequest{
ID: "activity-123",
TeamID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| TeamID | string | No | - |
AddUserGroupMembers
Use this method to add members to a user group, allowing them to access the group's resources and participate in group activities. Ideal for managing team memberships and ensuring the right people are included in specific group communications.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Add user group members
resp, err := client.AddUserGroupMembers(context.Background(), &stream.AddUserGroupMembersRequest{
ID: "activity-123",
MemberIds: nil,
AsAdmin: stream.PtrTo(false),
TeamID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: AddUserGroupMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| MemberIds | []string | Yes | List of user IDs to add as members |
| AsAdmin | bool | No | Whether to add the members as group admins. Defaults to false |
| TeamID | string | No | - |
RemoveUserGroupMembers
This method removes members from a user group, revoking their access to the group's resources and activities. It is useful for managing group memberships and maintaining security by ensuring only authorized users remain in the group.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Remove user group members
resp, err := client.RemoveUserGroupMembers(context.Background(), &stream.RemoveUserGroupMembersRequest{
ID: "activity-123",
MemberIds: nil,
TeamID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: RemoveUserGroupMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | - |
| MemberIds | []string | Yes | List of user IDs to remove |
| TeamID | string | No | - |
QueryUsers
Search for users within the chat application based on specific criteria to find and interact with them; use this to efficiently locate users.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Query users
resp, err := client.QueryUsers(context.Background(), &stream.QueryUsersRequest{
Payload: &"value",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: QueryUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Payload | No | - |
UpdateUsers
Add new users or modify existing user details within the chat application to keep user information current; use this for comprehensive user management.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Upsert users
resp, err := client.UpdateUsers(context.Background(), &stream.UpdateUsersRequest{
Users: map[string]any{},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Users | map[string]any | Yes | Object containing users |
UpdateUsersPartial
Make specific updates to existing user details without altering the entire user profile; use this for targeted changes to user information.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Partially update user
resp, err := client.UpdateUsersPartial(context.Background(), &stream.UpdateUsersPartialRequest{
Users: []stream.UpdateUserPartialRequest{{ID: "activity-123"}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UpdateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Users | []UpdateUserPartialRequest | Yes | - |
GetBlockedUsers
Retrieve a list of users currently blocked from accessing chat services, useful for managing and reviewing user restrictions.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get list of blocked Users
resp, err := client.GetBlockedUsers(context.Background(), &stream.GetBlockedUsersRequest{
UserID: stream.PtrTo("john"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: GetBlockedUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserID | string | No | - |
BlockUsers
Block specified users from accessing chat features, ideal for temporarily restricting users due to policy violations or other administrative reasons.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Block user
resp, err := client.BlockUsers(context.Background(), &stream.BlockUsersRequest{
BlockedUserID: "value",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: BlockUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| BlockedUserID | string | Yes | User id to block |
| User | UserRequest | No | - |
| UserID | string | No | - |
DeactivateUsers
Deactivate multiple user accounts to suspend their access and activity, often used for managing inactive or problematic accounts.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Deactivate users
resp, err := client.DeactivateUsers(context.Background(), &stream.DeactivateUsersRequest{
UserIds: []string{"user-1", "user-2"},
CreatedByID: stream.PtrTo("value"),
MarkChannelsDeleted: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with mark_messages_deleted
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Deactivate users
resp, err := client.DeactivateUsers(context.Background(), &stream.DeactivateUsersRequest{
UserIds: []string{"user-1", "user-2"},
MarkMessagesDeleted: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeactivateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserIds | []string | Yes | User IDs to deactivate |
| CreatedByID | string | No | ID of the user who deactivated the users |
| MarkChannelsDeleted | bool | No | - |
| MarkMessagesDeleted | bool | No | Makes messages appear to be deleted |
DeleteUsers
Permanently remove user accounts and all associated data, suitable for complying with data privacy requests or clearing inactive accounts.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete Users
resp, err := client.DeleteUsers(context.Background(), &stream.DeleteUsersRequest{
UserIds: []string{"user-1", "user-2"},
Calls: stream.PtrTo("value"),
Conversations: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with files and messages
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete Users
resp, err := client.DeleteUsers(context.Background(), &stream.DeleteUsersRequest{
UserIds: []string{"user-1", "user-2"},
Files: stream.PtrTo(false),
Messages: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with new_call_owner_id and new_channel_owner_id
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete Users
resp, err := client.DeleteUsers(context.Background(), &stream.DeleteUsersRequest{
UserIds: []string{"user-1", "user-2"},
NewCallOwnerID: stream.PtrTo("value"),
NewChannelOwnerID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with user
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Delete Users
resp, err := client.DeleteUsers(context.Background(), &stream.DeleteUsersRequest{
UserIds: []string{"user-1", "user-2"},
User: &stream.UserRequest{ID: "john"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeleteUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserIds | []string | Yes | IDs of users to delete |
| Calls | string | No | Calls delete mode. Affected calls are those that include exactly two members, one of whom is the ... |
| Conversations | string | No | Conversation channels delete mode. Conversation channel is any channel which only has two members... |
| Files | bool | No | Delete user files. * false or empty string - doesn't delete any files * true - deletes all files ... |
| Messages | string | No | Message delete mode. * null or empty string - doesn't delete user messages * soft - marks all use... |
| NewCallOwnerID | string | No | - |
| NewChannelOwnerID | string | No | - |
| User | string | No | User delete mode. * soft - marks user as deleted and retains all user data * pruning - marks user... |
GetUserLiveLocations
Access the real-time location of users, useful for features that depend on location-based services or tracking.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Get user live locations
resp, err := client.GetUserLiveLocations(context.Background(), &stream.GetUserLiveLocationsRequest{
UserID: stream.PtrTo("john"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: SharedLocationsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserID | string | No | - |
UpdateLiveLocation
Refresh the live location data for a user, ensuring that location-based services have the most current information.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update live location
resp, err := client.UpdateLiveLocation(context.Background(), &stream.UpdateLiveLocationRequest{
MessageID: "value",
UserID: stream.PtrTo("john"),
EndAt: &10,
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with latitude and longitude
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Update live location
resp, err := client.UpdateLiveLocation(context.Background(), &stream.UpdateLiveLocationRequest{
MessageID: "value",
Latitude: stream.PtrTo(10),
Longitude: stream.PtrTo(10),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: SharedLocationResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| MessageID | string | Yes | Live location ID |
| UserID | string | No | - |
| EndAt | float | No | Time when the live location expires |
| Latitude | float | No | Latitude coordinate |
| Longitude | float | No | Longitude coordinate |
ReactivateUsers
Restore access to previously deactivated user accounts, allowing them to resume using chat services.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Reactivate users
resp, err := client.ReactivateUsers(context.Background(), &stream.ReactivateUsersRequest{
UserIds: []string{"user-1", "user-2"},
CreatedByID: stream.PtrTo("value"),
RestoreChannels: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with restore_messages
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Reactivate users
resp, err := client.ReactivateUsers(context.Background(), &stream.ReactivateUsersRequest{
UserIds: []string{"user-1", "user-2"},
RestoreMessages: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ReactivateUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserIds | []string | Yes | User IDs to reactivate |
| CreatedByID | string | No | ID of the user who's reactivating the users |
| RestoreChannels | bool | No | - |
| RestoreMessages | bool | No | Restore previously deleted messages |
RestoreUsers
Reinstate users who were previously deleted, recovering their account and data if within a grace period, useful for accidental deletions.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Restore users
resp, err := client.RestoreUsers(context.Background(), &stream.RestoreUsersRequest{
UserIds: []string{"user-1", "user-2"},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserIds | []string | Yes | - |
UnblockUsers
Remove restrictions on users who were previously blocked, allowing them to access chat services again.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Unblock user
resp, err := client.UnblockUsers(context.Background(), &stream.UnblockUsersRequest{
BlockedUserID: "value",
UserID: stream.PtrTo("john"),
User: &stream.UserRequest{ID: "activity-123", Custom: map[string]any{}},
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: UnblockUsersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| BlockedUserID | string | Yes | - |
| User | UserRequest | No | - |
| UserID | string | No | - |
DeactivateUser
Suspend a specific user's account, preventing access and activity, typically used for addressing individual account issues.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Deactivate user
resp, err := client.DeactivateUser(context.Background(), &stream.DeactivateUserRequest{
UserID: "john",
CreatedByID: stream.PtrTo("value"),
MarkMessagesDeleted: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: DeactivateUserResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserID | string | Yes | - |
| CreatedByID | string | No | ID of the user who deactivated the user |
| MarkMessagesDeleted | bool | No | Makes messages appear to be deleted |
ExportUser
Exports the user's data for backup or analysis purposes, ensuring you have a local copy of their information when needed.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Export user
resp, err := client.ExportUser(context.Background(), &stream.ExportUserRequest{
UserID: "john",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ExportUserResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserID | string | Yes | - |
ReactivateUser
Reactivates a previously deactivated user, allowing them to regain access to their account and continue using the chat service.
Example
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Reactivate user
resp, err := client.ReactivateUser(context.Background(), &stream.ReactivateUserRequest{
UserID: "john",
Name: stream.PtrTo("My Feed"),
CreatedByID: stream.PtrTo("value"),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Example: with restore_messages
package main
import (
"context"
"fmt"
stream "github.com/GetStream/getstream-go/v3"
)
func main() {
// Initialize client
client, _ := stream.NewClient(apiKey, apiSecret)
// Reactivate user
resp, err := client.ReactivateUser(context.Background(), &stream.ReactivateUserRequest{
UserID: "john",
RestoreMessages: stream.PtrTo(false),
})
if err != nil {
panic(err)
}
fmt.Println(resp)
}Response: ReactivateUserResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| UserID | string | Yes | - |
| CreatedByID | string | No | ID of the user who's reactivating the user |
| Name | string | No | Set this field to put new name for the user |
| RestoreMessages | bool | No | Restore previously deleted messages |
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
AIImageConfig
type AIImageConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
OcrRules []OCRRule `json:"ocr_rules,omitempty"`
Rules []AWSRekognitionRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| ocr_rules | []OCRRule | No | |
| rules | []AWSRekognitionRule | No |
AITextConfig
type AITextConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Profile string `json:"profile,omitempty"`
Rules []BodyguardRule `json:"rules,omitempty"`
SeverityRules []BodyguardSeverityRule `json:"severity_rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| profile | string | No | |
| rules | []BodyguardRule | No | |
| severity_rules | []BodyguardSeverityRule | No |
AIVideoConfig
type AIVideoConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Rules []AWSRekognitionRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | []AWSRekognitionRule | No |
APNConfig
type APNConfig struct {
Disabled bool `json:"Disabled,omitempty"`
AuthKey string `json:"auth_key,omitempty"`
AuthType string `json:"auth_type,omitempty"`
BundleId string `json:"bundle_id,omitempty"`
Development bool `json:"development,omitempty"`
Host string `json:"host,omitempty"`
KeyId string `json:"key_id,omitempty"`
NotificationTemplate string `json:"notification_template,omitempty"`
P12Cert string `json:"p12_cert,omitempty"`
TeamId string `json:"team_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| auth_key | string | No | |
| auth_type | string | No | |
| bundle_id | string | No | |
| development | bool | No | |
| host | string | No | |
| key_id | string | No | |
| notification_template | string | No | |
| p12_cert | string | No | |
| team_id | string | No |
Action
type Action struct {
Name string `json:"name,omitempty"`
Style string `json:"style,omitempty"`
Text string `json:"text,omitempty"`
Type string `json:"type,omitempty"`
Value string `json:"value,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | |
| text | string | Yes | |
| type | string | Yes | |
| style | string | No | |
| value | string | No |
AddUserGroupMembersResponse
Response for adding members to a user group
type AddUserGroupMembersResponse struct {
Duration string `json:"duration,omitempty"`
UserGroup UserGroupResponse `json:"user_group,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
AppResponseFields
type AppResponseFields struct {
ActivityMetricsConfig map[string]interface{} `json:"activity_metrics_config,omitempty"`
AllowMultiUserDevices bool `json:"allow_multi_user_devices,omitempty"`
AllowedFlagReasons []string `json:"allowed_flag_reasons,omitempty"`
AsyncUrlEnrichEnabled bool `json:"async_url_enrich_enabled,omitempty"`
AutoTranslationEnabled bool `json:"auto_translation_enabled,omitempty"`
BeforeMessageSendHookUrl string `json:"before_message_send_hook_url,omitempty"`
CallTypes map[string]interface{} `json:"call_types,omitempty"`
CampaignEnabled bool `json:"campaign_enabled,omitempty"`
CdnExpirationSeconds int `json:"cdn_expiration_seconds,omitempty"`
ChannelConfigs map[string]interface{} `json:"channel_configs,omitempty"`
CustomActionHandlerUrl string `json:"custom_action_handler_url,omitempty"`
DatadogInfo DataDogInfo `json:"datadog_info,omitempty"`
DisableAuthChecks bool `json:"disable_auth_checks,omitempty"`
DisablePermissionsChecks bool `json:"disable_permissions_checks,omitempty"`
EnforceUniqueUsernames string `json:"enforce_unique_usernames,omitempty"`
EventHooks []EventHook `json:"event_hooks,omitempty"`
FileUploadConfig FileUploadConfig `json:"file_upload_config,omitempty"`
Geofences []GeofenceResponse `json:"geofences,omitempty"`
Grants map[string]interface{} `json:"grants,omitempty"`
GuestUserCreationDisabled bool `json:"guest_user_creation_disabled,omitempty"`
Id int `json:"id,omitempty"`
ImageModerationEnabled bool `json:"image_moderation_enabled,omitempty"`
ImageModerationLabels []string `json:"image_moderation_labels,omitempty"`
ImageUploadConfig FileUploadConfig `json:"image_upload_config,omitempty"`
MaxAggregatedActivitiesLength int `json:"max_aggregated_activities_length,omitempty"`
ModerationAudioCallModerationEnabled bool `json:"moderation_audio_call_moderation_enabled,omitempty"`
ModerationDashboardPreferences ModerationDashboardPreferences `json:"moderation_dashboard_preferences,omitempty"`
ModerationEnabled bool `json:"moderation_enabled,omitempty"`
ModerationLlmConfigurabilityEnabled bool `json:"moderation_llm_configurability_enabled,omitempty"`
ModerationMultitenantBlocklistEnabled bool `json:"moderation_multitenant_blocklist_enabled,omitempty"`
ModerationS3ImageAccessRoleArn string `json:"moderation_s3_image_access_role_arn,omitempty"`
ModerationVideoCallModerationEnabled bool `json:"moderation_video_call_moderation_enabled,omitempty"`
ModerationWebhookUrl string `json:"moderation_webhook_url,omitempty"`
MultiTenantEnabled bool `json:"multi_tenant_enabled,omitempty"`
Name string `json:"name,omitempty"`
Organization string `json:"organization,omitempty"`
PermissionVersion string `json:"permission_version,omitempty"`
Placement string `json:"placement,omitempty"`
Policies map[string]interface{} `json:"policies,omitempty"`
PushNotifications PushNotificationFields `json:"push_notifications,omitempty"`
RemindersInterval int `json:"reminders_interval,omitempty"`
RevokeTokensIssuedBefore float64 `json:"revoke_tokens_issued_before,omitempty"`
SnsKey string `json:"sns_key,omitempty"`
SnsSecret string `json:"sns_secret,omitempty"`
SnsTopicArn string `json:"sns_topic_arn,omitempty"`
SqsKey string `json:"sqs_key,omitempty"`
SqsSecret string `json:"sqs_secret,omitempty"`
SqsUrl string `json:"sqs_url,omitempty"`
Suspended bool `json:"suspended,omitempty"`
SuspendedExplanation string `json:"suspended_explanation,omitempty"`
UseHookV2 bool `json:"use_hook_v2,omitempty"`
UserResponseTimeEnabled bool `json:"user_response_time_enabled,omitempty"`
UserSearchDisallowedRoles []string `json:"user_search_disallowed_roles,omitempty"`
WebhookEvents []string `json:"webhook_events,omitempty"`
WebhookUrl string `json:"webhook_url,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_multi_user_devices | bool | Yes | |
| async_url_enrich_enabled | bool | Yes | |
| auto_translation_enabled | bool | Yes | |
| call_types | map[string]interface{} | Yes | |
| campaign_enabled | bool | Yes | |
| cdn_expiration_seconds | int | Yes | |
| channel_configs | map[string]interface{} | Yes | |
| custom_action_handler_url | string | Yes | |
| disable_auth_checks | bool | Yes | |
| disable_permissions_checks | bool | Yes | |
| enforce_unique_usernames | string | Yes | |
| event_hooks | []EventHook | Yes | |
| file_upload_config | FileUploadConfig | Yes | |
| grants | map[string]interface{} | Yes | |
| guest_user_creation_disabled | bool | Yes | |
| id | int | Yes | |
| image_moderation_enabled | bool | Yes | |
| image_upload_config | FileUploadConfig | Yes | |
| max_aggregated_activities_length | int | Yes | |
| moderation_audio_call_moderation_enabled | bool | Yes | |
| moderation_enabled | bool | Yes | |
| moderation_llm_configurability_enabled | bool | Yes | |
| moderation_multitenant_blocklist_enabled | bool | Yes | |
| moderation_video_call_moderation_enabled | bool | Yes | |
| moderation_webhook_url | string | Yes | |
| multi_tenant_enabled | bool | Yes | |
| name | string | Yes | |
| organization | string | Yes | |
| permission_version | string | Yes | |
| placement | string | Yes | |
| policies | map[string]interface{} | Yes | |
| push_notifications | PushNotificationFields | Yes | |
| reminders_interval | int | Yes | |
| sns_key | string | Yes | |
| sns_secret | string | Yes | |
| sns_topic_arn | string | Yes | |
| sqs_key | string | Yes | |
| sqs_secret | string | Yes | |
| sqs_url | string | Yes | |
| suspended | bool | Yes | |
| suspended_explanation | string | Yes | |
| use_hook_v2 | bool | Yes | |
| user_response_time_enabled | bool | Yes | |
| user_search_disallowed_roles | []string | Yes | |
| webhook_events | []string | Yes | |
| webhook_url | string | Yes | |
| activity_metrics_config | map[string]interface{} | No | |
| allowed_flag_reasons | []string | No | |
| before_message_send_hook_url | string | No | |
| datadog_info | DataDogInfo | No | |
| geofences | []GeofenceResponse | No | |
| image_moderation_labels | []string | No | |
| moderation_dashboard_preferences | ModerationDashboardPreferences | No | |
| moderation_s3_image_access_role_arn | string | No | |
| revoke_tokens_issued_before | float64 | No |
AsyncModerationCallbackConfig
type AsyncModerationCallbackConfig struct {
Mode string `json:"mode,omitempty"`
ServerUrl string `json:"server_url,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| mode | string | No | |
| server_url | string | No |
AsyncModerationConfiguration
type AsyncModerationConfiguration struct {
Callback AsyncModerationCallbackConfig `json:"callback,omitempty"`
TimeoutMs int `json:"timeout_ms,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| callback | AsyncModerationCallbackConfig | No | |
| timeout_ms | int | No |
AutomodPlatformCircumventionConfig
type AutomodPlatformCircumventionConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Rules []AutomodRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | []AutomodRule | No |
AutomodSemanticFiltersConfig
type AutomodSemanticFiltersConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Rules []AutomodSemanticFiltersRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | []AutomodSemanticFiltersRule | No |
AutomodToxicityConfig
type AutomodToxicityConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Rules []AutomodRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| rules | []AutomodRule | No |
AzureRequest
Config for creating Azure Blob Storage storage
type AzureRequest struct {
AbsAccountName string `json:"abs_account_name,omitempty"`
AbsClientId string `json:"abs_client_id,omitempty"`
AbsClientSecret string `json:"abs_client_secret,omitempty"`
AbsTenantId string `json:"abs_tenant_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| abs_account_name | string | Yes | The account name |
| abs_client_id | string | Yes | The client id |
| abs_client_secret | string | Yes | The client secret |
| abs_tenant_id | string | Yes | The tenant id |
BlockListConfig
type BlockListConfig struct {
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
MatchSubstring bool `json:"match_substring,omitempty"`
Rules []BlockListRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | bool | No | |
| enabled | bool | No | |
| match_substring | bool | No | |
| rules | []BlockListRule | No |
BlockListResponse
Block list contains restricted words
type BlockListResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Id string `json:"id,omitempty"`
IsLeetCheckEnabled bool `json:"is_leet_check_enabled,omitempty"`
IsPluralCheckEnabled bool `json:"is_plural_check_enabled,omitempty"`
Name string `json:"name,omitempty"`
Team string `json:"team,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
Words []string `json:"words,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| is_leet_check_enabled | bool | Yes | |
| is_plural_check_enabled | bool | Yes | |
| name | string | Yes | Block list name |
| type | string | Yes | Block list type. One of: regex, domain, domain_allowlist, email, email_allowl... |
| words | []string | Yes | List of words to block |
| created_at | float64 | No | Date/time of creation |
| id | string | No | |
| team | string | No | |
| updated_at | float64 | No | Date/time of the last update |
BlockUsersResponse
type BlockUsersResponse struct {
BlockedByUserId string `json:"blocked_by_user_id,omitempty"`
BlockedUserId string `json:"blocked_user_id,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocked_by_user_id | string | Yes | User id who blocked another user |
| blocked_user_id | string | Yes | User id who got blocked |
| created_at | float64 | Yes | Timestamp when the user was blocked |
| duration | string | Yes | Duration of the request in milliseconds |
BlockedUserResponse
type BlockedUserResponse struct {
BlockedUser UserResponse `json:"blocked_user,omitempty"`
BlockedUserId string `json:"blocked_user_id,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
User UserResponse `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocked_user | UserResponse | Yes | User who got blocked |
| blocked_user_id | string | Yes | ID of the user who got blocked |
| created_at | float64 | Yes | |
| user | UserResponse | Yes | User who blocked another user |
| user_id | string | Yes | ID of the user who blocked another user |
BodyguardImageAnalysisConfig
type BodyguardImageAnalysisConfig struct {
Rules []BodyguardRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rules | []BodyguardRule | No |
ChannelResponse
Represents channel in chat
type ChannelResponse struct {
AutoTranslationEnabled bool `json:"auto_translation_enabled,omitempty"`
AutoTranslationLanguage string `json:"auto_translation_language,omitempty"`
Blocked bool `json:"blocked,omitempty"`
Cid string `json:"cid,omitempty"`
Config ChannelConfigWithInfo `json:"config,omitempty"`
Cooldown int `json:"cooldown,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
CreatedBy UserResponse `json:"created_by,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Disabled bool `json:"disabled,omitempty"`
FilterTags []string `json:"filter_tags,omitempty"`
Frozen bool `json:"frozen,omitempty"`
Hidden bool `json:"hidden,omitempty"`
HideMessagesBefore float64 `json:"hide_messages_before,omitempty"`
Id string `json:"id,omitempty"`
LastMessageAt float64 `json:"last_message_at,omitempty"`
MemberCount int `json:"member_count,omitempty"`
Members []ChannelMemberResponse `json:"members,omitempty"`
MessageCount int `json:"message_count,omitempty"`
MuteExpiresAt float64 `json:"mute_expires_at,omitempty"`
Muted bool `json:"muted,omitempty"`
OwnCapabilities []ChannelOwnCapability `json:"own_capabilities,omitempty"`
Team string `json:"team,omitempty"`
TruncatedAt float64 `json:"truncated_at,omitempty"`
TruncatedBy UserResponse `json:"truncated_by,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | string | Yes | Channel CID (<type>:<id>) |
| created_at | float64 | Yes | Date/time of creation |
| custom | map[string]interface{} | Yes | Custom data for this object |
| disabled | bool | Yes | |
| frozen | bool | Yes | Whether channel is frozen or not |
| id | string | Yes | Channel unique ID |
| type | string | Yes | Type of the channel |
| updated_at | float64 | Yes | Date/time of the last update |
| auto_translation_enabled | bool | No | Whether auto translation is enabled or not |
| auto_translation_language | string | No | Language to translate to when auto translation is active |
| blocked | bool | No | Whether this channel is blocked by current user or not |
| config | ChannelConfigWithInfo | No | Channel configuration |
| cooldown | int | No | Cooldown period after sending each message |
| created_by | UserResponse | No | Creator of the channel |
| deleted_at | float64 | No | Date/time of deletion |
| filter_tags | []string | No | List of filter tags associated with the channel |
| hidden | bool | No | Whether this channel is hidden by current user or not |
| hide_messages_before | float64 | No | Date since when the message history is accessible |
| last_message_at | float64 | No | Date of the last message sent |
| member_count | int | No | Number of members in the channel |
| members | []ChannelMemberResponse | No | List of channel members (max 100) |
| message_count | int | No | Number of messages in the channel |
| mute_expires_at | float64 | No | Date of mute expiration |
| muted | bool | No | Whether this channel is muted or not |
| own_capabilities | []ChannelOwnCapability | No | List of channel capabilities of authenticated user |
| team | string | No | Team the channel belongs to (multi-tenant only) |
| truncated_at | float64 | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | No |
ChatPreferencesInput
type ChatPreferencesInput struct {
ChannelMentions string `json:"channel_mentions,omitempty"`
DefaultPreference string `json:"default_preference,omitempty"`
DirectMentions string `json:"direct_mentions,omitempty"`
GroupMentions string `json:"group_mentions,omitempty"`
HereMentions string `json:"here_mentions,omitempty"`
RoleMentions string `json:"role_mentions,omitempty"`
ThreadReplies string `json:"thread_replies,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_mentions | string | No | |
| default_preference | string | No | |
| direct_mentions | string | No | |
| group_mentions | string | No | |
| here_mentions | string | No | |
| role_mentions | string | No | |
| thread_replies | string | No |
CheckExternalStorageResponse
Basic response information
type CheckExternalStorageResponse struct {
Duration string `json:"duration,omitempty"`
FileUrl string `json:"file_url,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| file_url | string | Yes |
CheckPushResponse
type CheckPushResponse struct {
DeviceErrors map[string]interface{} `json:"device_errors,omitempty"`
Duration string `json:"duration,omitempty"`
EventType string `json:"event_type,omitempty"`
GeneralErrors []string `json:"general_errors,omitempty"`
RenderedApnTemplate string `json:"rendered_apn_template,omitempty"`
RenderedFirebaseTemplate string `json:"rendered_firebase_template,omitempty"`
RenderedMessage map[string]interface{} `json:"rendered_message,omitempty"`
SkipDevices bool `json:"skip_devices,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| device_errors | map[string]interface{} | No | Object with device errors |
| event_type | string | No | The event type that was tested |
| general_errors | []string | No | List of general errors |
| rendered_apn_template | string | No | |
| rendered_firebase_template | string | No | |
| rendered_message | map[string]interface{} | No | |
| skip_devices | bool | No | Don't require existing devices to render templates |
CheckSNSResponse
type CheckSNSResponse struct {
Data map[string]interface{} `json:"data,omitempty"`
Duration string `json:"duration,omitempty"`
Error string `json:"error,omitempty"`
Status string `json:"status,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| status | string | Yes | Validation result. One of: ok, error |
| data | map[string]interface{} | No | Error data |
| error | string | No | Error text |
CheckSQSResponse
type CheckSQSResponse struct {
Data map[string]interface{} `json:"data,omitempty"`
Duration string `json:"duration,omitempty"`
Error string `json:"error,omitempty"`
Status string `json:"status,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| status | string | Yes | Validation result. One of: ok, error |
| data | map[string]interface{} | No | Error data |
| error | string | No | Error text |
CreateBlockListResponse
Basic response information
type CreateBlockListResponse struct {
Blocklist BlockListResponse `json:"blocklist,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| blocklist | BlockListResponse | No |
CreateExternalStorageResponse
Basic response information
type CreateExternalStorageResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
CreateGuestResponse
type CreateGuestResponse struct {
AccessToken string `json:"access_token,omitempty"`
Duration string `json:"duration,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| access_token | string | Yes | the access token to authenticate the user |
| duration | string | Yes | Duration of the request in milliseconds |
| user | UserResponse | Yes | User object which server acts upon |
CreateImportResponse
Basic response information
type CreateImportResponse struct {
Duration string `json:"duration,omitempty"`
ImportTask ImportTask `json:"import_task,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| import_task | ImportTask | No |
CreateImportURLResponse
Basic response information
type CreateImportURLResponse struct {
Duration string `json:"duration,omitempty"`
Path string `json:"path,omitempty"`
UploadUrl string `json:"upload_url,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| path | string | Yes | |
| upload_url | string | Yes |
CreateImportV2TaskResponse
Basic response information
type CreateImportV2TaskResponse struct {
AppPk int `json:"app_pk,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Duration string `json:"duration,omitempty"`
Id string `json:"id,omitempty"`
Product string `json:"product,omitempty"`
Settings ImportV2TaskSettings `json:"settings,omitempty"`
State int `json:"state,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| created_at | float64 | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| id | string | Yes | |
| product | string | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | int | Yes | |
| updated_at | float64 | Yes |
CreateRoleResponse
Basic response information
type CreateRoleResponse struct {
Duration string `json:"duration,omitempty"`
Role Role `json:"role,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| role | Role | Yes |
CreateUserGroupResponse
Response for creating a user group
type CreateUserGroupResponse struct {
Duration string `json:"duration,omitempty"`
UserGroup UserGroupResponse `json:"user_group,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The created user group |
Data
type Data struct {
Id string `json:"id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
DataDogInfo
type DataDogInfo struct {
ApiKey string `json:"api_key,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Site string `json:"site,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| api_key | string | No | |
| enabled | bool | No | |
| site | string | No |
DeactivateUserResponse
type DeactivateUserResponse struct {
Duration string `json:"duration,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| user | UserResponse | No | Deactivated user object |
DeactivateUsersResponse
Basic response information
type DeactivateUsersResponse struct {
Duration string `json:"duration,omitempty"`
TaskId string `json:"task_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| task_id | string | Yes |
DeleteExternalStorageResponse
Basic response information
type DeleteExternalStorageResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteImportV2TaskResponse
Basic response information
type DeleteImportV2TaskResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteUsersResponse
type DeleteUsersResponse struct {
Duration string `json:"duration,omitempty"`
TaskId string `json:"task_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| task_id | string | Yes | ID of the task to delete users |
DeviceResponse
Response for Device
type DeviceResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Disabled bool `json:"disabled,omitempty"`
DisabledReason string `json:"disabled_reason,omitempty"`
Id string `json:"id,omitempty"`
PushProvider string `json:"push_provider,omitempty"`
PushProviderName string `json:"push_provider_name,omitempty"`
UserId string `json:"user_id,omitempty"`
Voip bool `json:"voip,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | Date/time of creation |
| id | string | Yes | Device ID |
| push_provider | string | Yes | Push provider |
| user_id | string | Yes | User ID |
| disabled | bool | No | Whether device is disabled or not |
| disabled_reason | string | No | Reason explaining why device had been disabled |
| push_provider_name | string | No | Push provider name |
| voip | bool | No | When true the token is for Apple VoIP push notifications |
ErrorResult
type ErrorResult struct {
Stacktrace string `json:"stacktrace,omitempty"`
Type string `json:"type,omitempty"`
Version string `json:"version,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | |
| stacktrace | string | No | |
| version | string | No |
EventHook
type EventHook struct {
Callback AsyncModerationCallbackConfig `json:"callback,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Enabled bool `json:"enabled,omitempty"`
EventTypes []string `json:"event_types,omitempty"`
HookType string `json:"hook_type,omitempty"`
Id string `json:"id,omitempty"`
Product string `json:"product,omitempty"`
ShouldSendCustomEvents bool `json:"should_send_custom_events,omitempty"`
SnsAuthType string `json:"sns_auth_type,omitempty"`
SnsEventBasedMessageGroupIdEnabled bool `json:"sns_event_based_message_group_id_enabled,omitempty"`
SnsKey string `json:"sns_key,omitempty"`
SnsRegion string `json:"sns_region,omitempty"`
SnsRoleArn string `json:"sns_role_arn,omitempty"`
SnsSecret string `json:"sns_secret,omitempty"`
SnsTopicArn string `json:"sns_topic_arn,omitempty"`
SqsAuthType string `json:"sqs_auth_type,omitempty"`
SqsKey string `json:"sqs_key,omitempty"`
SqsQueueUrl string `json:"sqs_queue_url,omitempty"`
SqsRegion string `json:"sqs_region,omitempty"`
SqsRoleArn string `json:"sqs_role_arn,omitempty"`
SqsSecret string `json:"sqs_secret,omitempty"`
TimeoutMs int `json:"timeout_ms,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
WebhookUrl string `json:"webhook_url,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| callback | AsyncModerationCallbackConfig | No | |
| created_at | float64 | No | |
| enabled | bool | No | |
| event_types | []string | No | |
| hook_type | string | No | |
| id | string | No | |
| product | string | No | |
| should_send_custom_events | bool | No | |
| sns_auth_type | string | No | |
| sns_event_based_message_group_id_enabled | bool | No | |
| sns_key | string | No | |
| sns_region | string | No | |
| sns_role_arn | string | No | |
| sns_secret | string | No | |
| sns_topic_arn | string | No | |
| sqs_auth_type | string | No | |
| sqs_key | string | No | |
| sqs_queue_url | string | No | |
| sqs_region | string | No | |
| sqs_role_arn | string | No | |
| sqs_secret | string | No | |
| timeout_ms | int | No | |
| updated_at | float64 | No | |
| webhook_url | string | No |
ExportUserResponse
type ExportUserResponse struct {
Duration string `json:"duration,omitempty"`
Messages []MessageResponse `json:"messages,omitempty"`
Reactions []ReactionResponse `json:"reactions,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| messages | []MessageResponse | No | List of exported messages |
| reactions | []ReactionResponse | No | List of exported reactions |
| user | UserResponse | No | Exported user object |
ExportUsersResponse
Basic response information
type ExportUsersResponse struct {
Duration string `json:"duration,omitempty"`
TaskId string `json:"task_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| task_id | string | Yes |
FeedsPreferences
type FeedsPreferences struct {
Comment string `json:"comment,omitempty"`
CommentMention string `json:"comment_mention,omitempty"`
CommentReaction string `json:"comment_reaction,omitempty"`
CommentReply string `json:"comment_reply,omitempty"`
CustomActivityTypes map[string]interface{} `json:"custom_activity_types,omitempty"`
Follow string `json:"follow,omitempty"`
Mention string `json:"mention,omitempty"`
Reaction string `json:"reaction,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | string | No | Push notification preference for comments on user's activities. One of: all, ... |
| comment_mention | string | No | Push notification preference for mentions in comments. One of: all, none |
| comment_reaction | string | No | Push notification preference for reactions on comments. One of: all, none |
| comment_reply | string | No | Push notification preference for replies to comments. One of: all, none |
| custom_activity_types | map[string]interface{} | No | Push notification preferences for custom activity types. Map of activity type... |
| follow | string | No | Push notification preference for new followers. One of: all, none |
| mention | string | No | Push notification preference for mentions in activities. One of: all, none |
| reaction | string | No | Push notification preference for reactions on user's activities or comments. ... |
Field
type Field struct {
Short bool `json:"short,omitempty"`
Title string `json:"title,omitempty"`
Value string `json:"value,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | bool | Yes | |
| title | string | Yes | |
| value | string | Yes |
FileUploadConfig
type FileUploadConfig struct {
AllowedFileExtensions []string `json:"allowed_file_extensions,omitempty"`
AllowedMimeTypes []string `json:"allowed_mime_types,omitempty"`
BlockedFileExtensions []string `json:"blocked_file_extensions,omitempty"`
BlockedMimeTypes []string `json:"blocked_mime_types,omitempty"`
SizeLimit int `json:"size_limit,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| size_limit | int | Yes | |
| allowed_file_extensions | []string | No | |
| allowed_mime_types | []string | No | |
| blocked_file_extensions | []string | No | |
| blocked_mime_types | []string | No |
FileUploadResponse
type FileUploadResponse struct {
Duration string `json:"duration,omitempty"`
File string `json:"file,omitempty"`
ThumbUrl string `json:"thumb_url,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| file | string | No | URL to the uploaded asset. Should be used to put to asset_url attachment field |
| thumb_url | string | No | URL of the file thumbnail for supported file formats. Should be put to `thumb... |
FirebaseConfig
type FirebaseConfig struct {
Disabled bool `json:"Disabled,omitempty"`
ApnTemplate string `json:"apn_template,omitempty"`
CredentialsJson string `json:"credentials_json,omitempty"`
DataTemplate string `json:"data_template,omitempty"`
NotificationTemplate string `json:"notification_template,omitempty"`
ServerKey string `json:"server_key,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| apn_template | string | No | |
| credentials_json | string | No | |
| data_template | string | No | |
| notification_template | string | No | |
| server_key | string | No |
FullUserResponse
type FullUserResponse struct {
AvgResponseTime int `json:"avg_response_time,omitempty"`
BanExpires float64 `json:"ban_expires,omitempty"`
Banned bool `json:"banned,omitempty"`
BlockedUserIds []string `json:"blocked_user_ids,omitempty"`
BypassModeration bool `json:"bypass_moderation,omitempty"`
ChannelMutes []ChannelMute `json:"channel_mutes,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeactivatedAt float64 `json:"deactivated_at,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Devices []DeviceResponse `json:"devices,omitempty"`
Id string `json:"id,omitempty"`
Image string `json:"image,omitempty"`
Invisible bool `json:"invisible,omitempty"`
Language string `json:"language,omitempty"`
LastActive float64 `json:"last_active,omitempty"`
LatestHiddenChannels []string `json:"latest_hidden_channels,omitempty"`
Mutes []UserMuteResponse `json:"mutes,omitempty"`
Name string `json:"name,omitempty"`
Online bool `json:"online,omitempty"`
PrivacySettings PrivacySettingsResponse `json:"privacy_settings,omitempty"`
RevokeTokensIssuedBefore float64 `json:"revoke_tokens_issued_before,omitempty"`
Role string `json:"role,omitempty"`
ShadowBanned bool `json:"shadow_banned,omitempty"`
Teams []string `json:"teams,omitempty"`
TeamsRole map[string]interface{} `json:"teams_role,omitempty"`
TotalUnreadCount int `json:"total_unread_count,omitempty"`
UnreadChannels int `json:"unread_channels,omitempty"`
UnreadCount int `json:"unread_count,omitempty"`
UnreadThreads int `json:"unread_threads,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | |
| blocked_user_ids | []string | Yes | |
| channel_mutes | []ChannelMute | Yes | |
| created_at | float64 | Yes | |
| custom | map[string]interface{} | Yes | |
| devices | []DeviceResponse | Yes | |
| id | string | Yes | |
| invisible | bool | Yes | |
| language | string | Yes | |
| mutes | []UserMuteResponse | Yes | |
| online | bool | Yes | |
| role | string | Yes | |
| shadow_banned | bool | Yes | |
| teams | []string | Yes | |
| total_unread_count | int | Yes | |
| unread_channels | int | Yes | |
| unread_count | int | Yes | |
| unread_threads | int | Yes | |
| updated_at | float64 | Yes | |
| avg_response_time | int | No | |
| ban_expires | float64 | No | |
| bypass_moderation | bool | No | |
| deactivated_at | float64 | No | |
| deleted_at | float64 | No | |
| image | string | No | |
| last_active | float64 | No | |
| latest_hidden_channels | []string | No | |
| name | string | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| revoke_tokens_issued_before | float64 | No | |
| teams_role | map[string]interface{} | No |
GetApplicationResponse
Basic response information
type GetApplicationResponse struct {
App AppResponseFields `json:"app,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app | AppResponseFields | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
GetBlockListResponse
Response for get block list
type GetBlockListResponse struct {
Blocklist BlockListResponse `json:"blocklist,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| blocklist | BlockListResponse | No | Block list object |
GetBlockedUsersResponse
type GetBlockedUsersResponse struct {
Blocks []BlockedUserResponse `json:"blocks,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocks | []BlockedUserResponse | Yes | Array of blocked user object |
| duration | string | Yes | Duration of the request in milliseconds |
GetCustomPermissionResponse
Basic response information
type GetCustomPermissionResponse struct {
Duration string `json:"duration,omitempty"`
Permission Permission `json:"permission,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| permission | Permission | Yes |
GetExternalStorageAWSS3Response
type GetExternalStorageAWSS3Response struct {
Bucket string `json:"bucket,omitempty"`
PathPrefix string `json:"path_prefix,omitempty"`
Region string `json:"region,omitempty"`
RoleArn string `json:"role_arn,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | string | Yes | |
| region | string | Yes | |
| role_arn | string | Yes | |
| path_prefix | string | No |
GetExternalStorageResponse
Basic response information
type GetExternalStorageResponse struct {
AwsS3 GetExternalStorageAWSS3Response `json:"aws_s3,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Duration string `json:"duration,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| type | string | Yes | |
| updated_at | float64 | Yes | |
| aws_s3 | GetExternalStorageAWSS3Response | No |
GetImportResponse
Basic response information
type GetImportResponse struct {
Duration string `json:"duration,omitempty"`
ImportTask ImportTask `json:"import_task,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| import_task | ImportTask | No |
GetImportV2TaskResponse
Basic response information
type GetImportV2TaskResponse struct {
AppPk int `json:"app_pk,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Duration string `json:"duration,omitempty"`
Id string `json:"id,omitempty"`
Product string `json:"product,omitempty"`
Result map[string]interface{} `json:"result,omitempty"`
Settings ImportV2TaskSettings `json:"settings,omitempty"`
State int `json:"state,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| created_at | float64 | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| id | string | Yes | |
| product | string | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | int | Yes | |
| updated_at | float64 | Yes | |
| result | map[string]interface{} | No |
GetOGResponse
type GetOGResponse struct {
Actions []Action `json:"actions,omitempty"`
AssetUrl string `json:"asset_url,omitempty"`
AuthorIcon string `json:"author_icon,omitempty"`
AuthorLink string `json:"author_link,omitempty"`
AuthorName string `json:"author_name,omitempty"`
Color string `json:"color,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Duration string `json:"duration,omitempty"`
Fallback string `json:"fallback,omitempty"`
Fields []Field `json:"fields,omitempty"`
Footer string `json:"footer,omitempty"`
FooterIcon string `json:"footer_icon,omitempty"`
Giphy Images `json:"giphy,omitempty"`
ImageUrl string `json:"image_url,omitempty"`
OgScrapeUrl string `json:"og_scrape_url,omitempty"`
OriginalHeight int `json:"original_height,omitempty"`
OriginalWidth int `json:"original_width,omitempty"`
Pretext string `json:"pretext,omitempty"`
Text string `json:"text,omitempty"`
ThumbUrl string `json:"thumb_url,omitempty"`
Title string `json:"title,omitempty"`
TitleLink string `json:"title_link,omitempty"`
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | map[string]interface{} | Yes | |
| duration | string | Yes | |
| actions | []Action | No | |
| asset_url | string | No | URL of detected video or audio |
| author_icon | string | No | |
| author_link | string | No | og:site |
| author_name | string | No | og:site_name |
| color | string | No | |
| fallback | string | No | |
| fields | []Field | No | |
| footer | string | No | |
| footer_icon | string | No | |
| giphy | Images | No | |
| image_url | string | No | URL of detected image |
| og_scrape_url | string | No | extracted url from the text |
| original_height | int | No | |
| original_width | int | No | |
| pretext | string | No | |
| text | string | No | og:description |
| thumb_url | string | No | URL of detected thumb image |
| title | string | No | og:title |
| title_link | string | No | og:url |
| type | string | No | Attachment type, could be empty, image, audio or video |
GetPushTemplatesResponse
Basic response information
type GetPushTemplatesResponse struct {
Duration string `json:"duration,omitempty"`
Templates []PushTemplateResponse `json:"templates,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| templates | []PushTemplateResponse | Yes |
GetRateLimitsResponse
type GetRateLimitsResponse struct {
Android map[string]interface{} `json:"android,omitempty"`
Duration string `json:"duration,omitempty"`
Ios map[string]interface{} `json:"ios,omitempty"`
ServerSide map[string]interface{} `json:"server_side,omitempty"`
Web map[string]interface{} `json:"web,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| android | map[string]interface{} | No | Map of endpoint rate limits for the Android platform |
| ios | map[string]interface{} | No | Map of endpoint rate limits for the iOS platform |
| server_side | map[string]interface{} | No | Map of endpoint rate limits for the server-side platform |
| web | map[string]interface{} | No | Map of endpoint rate limits for the web platform |
GetTaskResponse
type GetTaskResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Duration string `json:"duration,omitempty"`
Error ErrorResult `json:"error,omitempty"`
Result map[string]interface{} `json:"result,omitempty"`
Status string `json:"status,omitempty"`
TaskId string `json:"task_id,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| duration | string | Yes | |
| status | string | Yes | Current status of task |
| task_id | string | Yes | ID of task |
| updated_at | float64 | Yes | |
| error | ErrorResult | No | Error produced by task |
| result | map[string]interface{} | No | Result produced by task after completion |
GetUserGroupResponse
Response for getting a user group
type GetUserGroupResponse struct {
Duration string `json:"duration,omitempty"`
UserGroup UserGroupResponse `json:"user_group,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The user group |
GoogleVisionConfig
type GoogleVisionConfig struct {
Enabled bool `json:"enabled,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | bool | No |
HuaweiConfig
type HuaweiConfig struct {
Disabled bool `json:"Disabled,omitempty"`
Id string `json:"id,omitempty"`
Secret string `json:"secret,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| id | string | No | |
| secret | string | No |
ImageSize
type ImageSize struct {
Crop string `json:"crop,omitempty"`
Height int `json:"height,omitempty"`
Resize string `json:"resize,omitempty"`
Width int `json:"width,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| crop | string | No | Crop mode. One of: top, bottom, left, right, center |
| height | int | No | Target image height |
| resize | string | No | Resize method. One of: clip, crop, scale, fill |
| width | int | No | Target image width |
ImageUploadResponse
type ImageUploadResponse struct {
Duration string `json:"duration,omitempty"`
File string `json:"file,omitempty"`
ThumbUrl string `json:"thumb_url,omitempty"`
UploadSizes []ImageSize `json:"upload_sizes,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| file | string | No | |
| thumb_url | string | No | |
| upload_sizes | []ImageSize | No | Array of image size configurations |
Images
type Images struct {
FixedHeight ImageData `json:"fixed_height,omitempty"`
FixedHeightDownsampled ImageData `json:"fixed_height_downsampled,omitempty"`
FixedHeightStill ImageData `json:"fixed_height_still,omitempty"`
FixedWidth ImageData `json:"fixed_width,omitempty"`
FixedWidthDownsampled ImageData `json:"fixed_width_downsampled,omitempty"`
FixedWidthStill ImageData `json:"fixed_width_still,omitempty"`
Original ImageData `json:"original,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| fixed_height | ImageData | Yes | |
| fixed_height_downsampled | ImageData | Yes | |
| fixed_height_still | ImageData | Yes | |
| fixed_width | ImageData | Yes | |
| fixed_width_downsampled | ImageData | Yes | |
| fixed_width_still | ImageData | Yes | |
| original | ImageData | Yes |
ImportTask
type ImportTask struct {
CreatedAt float64 `json:"created_at,omitempty"`
History []ImportTaskHistory `json:"history,omitempty"`
Id string `json:"id,omitempty"`
Mode string `json:"mode,omitempty"`
Path string `json:"path,omitempty"`
Size int `json:"size,omitempty"`
State string `json:"state,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| history | []ImportTaskHistory | Yes | |
| id | string | Yes | |
| mode | string | Yes | |
| path | string | Yes | |
| state | string | Yes | |
| updated_at | float64 | Yes | |
| size | int | No |
ImportV2TaskItem
type ImportV2TaskItem struct {
AppPk int `json:"app_pk,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Id string `json:"id,omitempty"`
Product string `json:"product,omitempty"`
Result map[string]interface{} `json:"result,omitempty"`
Settings ImportV2TaskSettings `json:"settings,omitempty"`
State int `json:"state,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_pk | int | Yes | |
| created_at | float64 | Yes | |
| id | string | Yes | |
| product | string | Yes | |
| settings | ImportV2TaskSettings | Yes | |
| state | int | Yes | |
| updated_at | float64 | Yes | |
| result | map[string]interface{} | No |
ImportV2TaskSettings
type ImportV2TaskSettings struct {
MergeCustom bool `json:"merge_custom,omitempty"`
Mode string `json:"mode,omitempty"`
Path string `json:"path,omitempty"`
S3 ImportV2TaskSettingsS3 `json:"s3,omitempty"`
SkipReferencesCheck bool `json:"skip_references_check,omitempty"`
Source string `json:"source,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| merge_custom | bool | No | |
| mode | string | No | |
| path | string | No | |
| s3 | ImportV2TaskSettingsS3 | No | |
| skip_references_check | bool | No | |
| source | string | No |
ImportV2TaskSettingsS3
type ImportV2TaskSettingsS3 struct {
Bucket string `json:"bucket,omitempty"`
Dir string `json:"dir,omitempty"`
Region string `json:"region,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | string | No | |
| dir | string | No | |
| region | string | No |
LLMConfig
type LLMConfig struct {
AppContext string `json:"app_context,omitempty"`
Async bool `json:"async,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Rules []LLMRule `json:"rules,omitempty"`
SeverityDescriptions map[string]interface{} `json:"severity_descriptions,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app_context | string | No | |
| async | bool | No | |
| enabled | bool | No | |
| rules | []LLMRule | No | |
| severity_descriptions | map[string]interface{} | No |
ListBlockListResponse
Basic response information
type ListBlockListResponse struct {
Blocklists []BlockListResponse `json:"blocklists,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklists | []BlockListResponse | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
ListDevicesResponse
List devices response
type ListDevicesResponse struct {
Devices []DeviceResponse `json:"devices,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| devices | []DeviceResponse | Yes | List of devices |
| duration | string | Yes |
ListExternalStorageResponse
Basic response information
type ListExternalStorageResponse struct {
Duration string `json:"duration,omitempty"`
ExternalStorages map[string]interface{} `json:"external_storages,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| external_storages | map[string]interface{} | Yes |
ListImportV2TasksResponse
Basic response information
type ListImportV2TasksResponse struct {
Duration string `json:"duration,omitempty"`
ImportTasks []ImportV2TaskItem `json:"import_tasks,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| import_tasks | []ImportV2TaskItem | Yes | |
| next | string | No | |
| prev | string | No |
ListImportsResponse
Basic response information
type ListImportsResponse struct {
Duration string `json:"duration,omitempty"`
ImportTasks []ImportTask `json:"import_tasks,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| import_tasks | []ImportTask | Yes |
ListPermissionsResponse
Basic response information
type ListPermissionsResponse struct {
Duration string `json:"duration,omitempty"`
Permissions []Permission `json:"permissions,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| permissions | []Permission | Yes |
ListPushProvidersResponse
Basic response information
type ListPushProvidersResponse struct {
Duration string `json:"duration,omitempty"`
PushProviders []PushProviderResponse `json:"push_providers,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| push_providers | []PushProviderResponse | Yes |
ListRolesResponse
Basic response information
type ListRolesResponse struct {
Duration string `json:"duration,omitempty"`
Roles []Role `json:"roles,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| roles | []Role | Yes |
ListUserGroupsResponse
Response for listing user groups
type ListUserGroupsResponse struct {
Duration string `json:"duration,omitempty"`
UserGroups []UserGroupResponse `json:"user_groups,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_groups | []UserGroupResponse | Yes | List of user groups |
MessageResponse
Represents any chat message
type MessageResponse struct {
Attachments []Attachment `json:"attachments,omitempty"`
Cid string `json:"cid,omitempty"`
Command string `json:"command,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
DeletedForMe bool `json:"deleted_for_me,omitempty"`
DeletedReplyCount int `json:"deleted_reply_count,omitempty"`
Draft DraftResponse `json:"draft,omitempty"`
Html string `json:"html,omitempty"`
I18n map[string]interface{} `json:"i18n,omitempty"`
Id string `json:"id,omitempty"`
ImageLabels map[string]interface{} `json:"image_labels,omitempty"`
LatestReactions []ReactionResponse `json:"latest_reactions,omitempty"`
Member ChannelMemberResponse `json:"member,omitempty"`
MentionedChannel bool `json:"mentioned_channel,omitempty"`
MentionedGroupIds []string `json:"mentioned_group_ids,omitempty"`
MentionedHere bool `json:"mentioned_here,omitempty"`
MentionedRoles []string `json:"mentioned_roles,omitempty"`
MentionedUsers []UserResponse `json:"mentioned_users,omitempty"`
MessageTextUpdatedAt float64 `json:"message_text_updated_at,omitempty"`
Mml string `json:"mml,omitempty"`
Moderation ModerationV2Response `json:"moderation,omitempty"`
OwnReactions []ReactionResponse `json:"own_reactions,omitempty"`
ParentId string `json:"parent_id,omitempty"`
PinExpires float64 `json:"pin_expires,omitempty"`
Pinned bool `json:"pinned,omitempty"`
PinnedAt float64 `json:"pinned_at,omitempty"`
PinnedBy UserResponse `json:"pinned_by,omitempty"`
Poll PollResponseData `json:"poll,omitempty"`
PollId string `json:"poll_id,omitempty"`
QuotedMessage MessageResponse `json:"quoted_message,omitempty"`
QuotedMessageId string `json:"quoted_message_id,omitempty"`
ReactionCounts map[string]interface{} `json:"reaction_counts,omitempty"`
ReactionGroups map[string]interface{} `json:"reaction_groups,omitempty"`
ReactionScores map[string]interface{} `json:"reaction_scores,omitempty"`
Reminder ReminderResponseData `json:"reminder,omitempty"`
ReplyCount int `json:"reply_count,omitempty"`
RestrictedVisibility []string `json:"restricted_visibility,omitempty"`
Shadowed bool `json:"shadowed,omitempty"`
SharedLocation SharedLocationResponseData `json:"shared_location,omitempty"`
ShowInChannel bool `json:"show_in_channel,omitempty"`
Silent bool `json:"silent,omitempty"`
Text string `json:"text,omitempty"`
ThreadParticipants []UserResponse `json:"thread_participants,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | []Attachment | Yes | Array of message attachments |
| cid | string | Yes | Channel unique identifier in <type>:<id> format |
| created_at | float64 | Yes | Date/time of creation |
| custom | map[string]interface{} | Yes | |
| deleted_reply_count | int | Yes | |
| html | string | Yes | Contains HTML markup of the message. Can only be set when using server-side API |
| id | string | Yes | Message ID is unique string identifier of the message |
| latest_reactions | []ReactionResponse | Yes | List of 10 latest reactions to this message |
| mentioned_channel | bool | Yes | Whether the message mentioned the channel tag |
| mentioned_here | bool | Yes | Whether the message mentioned online users with @here tag |
| mentioned_users | []UserResponse | Yes | List of mentioned users |
| own_reactions | []ReactionResponse | Yes | List of 10 latest reactions of authenticated user to this message |
| pinned | bool | Yes | Whether message is pinned or not |
| reaction_counts | map[string]interface{} | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | map[string]interface{} | Yes | An object containing scores of reactions of each type. Key: reaction type (st... |
| reply_count | int | Yes | Number of replies to this message |
| restricted_visibility | []string | Yes | A list of user ids that have restricted visibility to the message, if the lis... |
| shadowed | bool | Yes | Whether the message was shadowed or not |
| silent | bool | Yes | Whether message is silent or not |
| text | string | Yes | Text of the message. Should be empty if mml is provided |
| type | string | Yes | Contains type of the message. One of: regular, ephemeral, error, reply, syste... |
| updated_at | float64 | Yes | Date/time of the last update |
| user | UserResponse | Yes | Sender of the message. Required when using server-side API |
| command | string | No | Contains provided slash command |
| deleted_at | float64 | No | Date/time of deletion |
| deleted_for_me | bool | No | |
| draft | DraftResponse | No | |
| i18n | map[string]interface{} | No | Object with translations. Key language contains the original language key. ... |
| image_labels | map[string]interface{} | No | Contains image moderation information |
| member | ChannelMemberResponse | No | Channel member data for the message sender including only the channel_role |
| mentioned_group_ids | []string | No | List of user group IDs mentioned in the message. Group members who are also c... |
| mentioned_roles | []string | No | List of roles mentioned in the message (e.g. admin, channel_moderator, custom... |
| message_text_updated_at | float64 | No | |
| mml | string | No | Should be empty if text is provided. Can only be set when using server-side... |
| moderation | ModerationV2Response | No | |
| parent_id | string | No | ID of parent message (thread) |
| pin_expires | float64 | No | Date when pinned message expires |
| pinned_at | float64 | No | Date when message got pinned |
| pinned_by | UserResponse | No | Contains user who pinned the message |
| poll | PollResponseData | No | |
| poll_id | string | No | Identifier of the poll to include in the message |
| quoted_message | MessageResponse | No | Contains quoted message |
| quoted_message_id | string | No | |
| reaction_groups | map[string]interface{} | No | |
| reminder | ReminderResponseData | No | |
| shared_location | SharedLocationResponseData | No | Contains shared location data |
| show_in_channel | bool | No | Whether thread reply should be shown in the channel as well |
| thread_participants | []UserResponse | No | List of users who participate in thread |
ModerationConfig
type ModerationConfig struct {
AiImageConfig AIImageConfig `json:"ai_image_config,omitempty"`
AiImageLiteConfig BodyguardImageAnalysisConfig `json:"ai_image_lite_config,omitempty"`
AiTextConfig AITextConfig `json:"ai_text_config,omitempty"`
AiVideoConfig AIVideoConfig `json:"ai_video_config,omitempty"`
Async bool `json:"async,omitempty"`
AutomodPlatformCircumventionConfig AutomodPlatformCircumventionConfig `json:"automod_platform_circumvention_config,omitempty"`
AutomodSemanticFiltersConfig AutomodSemanticFiltersConfig `json:"automod_semantic_filters_config,omitempty"`
AutomodToxicityConfig AutomodToxicityConfig `json:"automod_toxicity_config,omitempty"`
BlockListConfig BlockListConfig `json:"block_list_config,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
GoogleVisionConfig GoogleVisionConfig `json:"google_vision_config,omitempty"`
Key string `json:"key,omitempty"`
LlmConfig LLMConfig `json:"llm_config,omitempty"`
SupportedVideoCallHarmTypes []string `json:"supported_video_call_harm_types,omitempty"`
Team string `json:"team,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
VelocityFilterConfig VelocityFilterConfig `json:"velocity_filter_config,omitempty"`
VideoCallRuleConfig VideoCallRuleConfig `json:"video_call_rule_config,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| ai_image_config | AIImageConfig | No | |
| ai_image_lite_config | BodyguardImageAnalysisConfig | No | |
| ai_text_config | AITextConfig | No | |
| ai_video_config | AIVideoConfig | No | |
| async | bool | No | |
| automod_platform_circumvention_config | AutomodPlatformCircumventionConfig | No | |
| automod_semantic_filters_config | AutomodSemanticFiltersConfig | No | |
| automod_toxicity_config | AutomodToxicityConfig | No | |
| block_list_config | BlockListConfig | No | |
| created_at | float64 | No | |
| google_vision_config | GoogleVisionConfig | No | |
| key | string | No | |
| llm_config | LLMConfig | No | |
| supported_video_call_harm_types | []string | No | |
| team | string | No | |
| updated_at | float64 | No | |
| velocity_filter_config | VelocityFilterConfig | No | |
| video_call_rule_config | VideoCallRuleConfig | No |
ModerationDashboardPreferences
type ModerationDashboardPreferences struct {
AllowedModerationActionReasons []string `json:"allowed_moderation_action_reasons,omitempty"`
AsyncReviewQueueUpsert bool `json:"async_review_queue_upsert,omitempty"`
DisableAuditLogs bool `json:"disable_audit_logs,omitempty"`
DisableFlaggingReviewedEntity bool `json:"disable_flagging_reviewed_entity,omitempty"`
EscalationQueueEnabled bool `json:"escalation_queue_enabled,omitempty"`
EscalationReasons []string `json:"escalation_reasons,omitempty"`
FlagUserOnFlaggedContent bool `json:"flag_user_on_flagged_content,omitempty"`
KeyframeClassificationsMap map[string]interface{} `json:"keyframe_classifications_map,omitempty"`
MediaQueueBlurEnabled bool `json:"media_queue_blur_enabled,omitempty"`
OverviewDashboard OverviewDashboardConfig `json:"overview_dashboard,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allowed_moderation_action_reasons | []string | No | |
| async_review_queue_upsert | bool | No | |
| disable_audit_logs | bool | No | |
| disable_flagging_reviewed_entity | bool | No | |
| escalation_queue_enabled | bool | No | |
| escalation_reasons | []string | No | |
| flag_user_on_flagged_content | bool | No | |
| keyframe_classifications_map | map[string]interface{} | No | |
| media_queue_blur_enabled | bool | No | |
| overview_dashboard | OverviewDashboardConfig | No |
OnlyUserID
type OnlyUserID struct {
Id string `json:"id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
OverviewDashboardConfig
type OverviewDashboardConfig struct {
DefaultDateRangeDays int `json:"default_date_range_days,omitempty"`
VisibleCharts []string `json:"visible_charts,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| default_date_range_days | int | No | |
| visible_charts | []string | No |
Permission
type Permission struct {
Action string `json:"action,omitempty"`
Condition map[string]interface{} `json:"condition,omitempty"`
Custom bool `json:"custom,omitempty"`
Description string `json:"description,omitempty"`
Id string `json:"id,omitempty"`
Level string `json:"level,omitempty"`
Name string `json:"name,omitempty"`
Owner bool `json:"owner,omitempty"`
SameTeam bool `json:"same_team,omitempty"`
Tags []string `json:"tags,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | Action name this permission is for (e.g. SendMessage) |
| custom | bool | Yes | Whether this is a custom permission or built-in |
| description | string | Yes | Description of the permission |
| id | string | Yes | Unique permission ID |
| level | string | Yes | Level at which permission could be applied (app or channel). One of: app, cha... |
| name | string | Yes | Name of the permission |
| owner | bool | Yes | Whether this permission applies to resource owner or not |
| same_team | bool | Yes | Whether this permission applies to teammates (multi-tenancy mode only) |
| tags | []string | Yes | List of tags of the permission |
| condition | map[string]interface{} | No | MongoDB style condition which decides whether or not the permission is granted |
PollOptionInput
type PollOptionInput struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Text string `json:"text,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | map[string]interface{} | No | |
| text | string | No |
PollOptionRequest
type PollOptionRequest struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Id string `json:"id,omitempty"`
Text string `json:"text,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| custom | map[string]interface{} | No | |
| text | string | No |
PollOptionResponse
type PollOptionResponse struct {
Duration string `json:"duration,omitempty"`
PollOption PollOptionResponseData `json:"poll_option,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| poll_option | PollOptionResponseData | Yes | Poll option |
PollOptionResponseData
type PollOptionResponseData struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Id string `json:"id,omitempty"`
Text string `json:"text,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | map[string]interface{} | Yes | |
| id | string | Yes | |
| text | string | Yes |
PollResponse
type PollResponse struct {
Duration string `json:"duration,omitempty"`
Poll PollResponseData `json:"poll,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| poll | PollResponseData | Yes | Poll |
PollResponseData
type PollResponseData struct {
AllowAnswers bool `json:"allow_answers,omitempty"`
AllowUserSuggestedOptions bool `json:"allow_user_suggested_options,omitempty"`
AnswersCount int `json:"answers_count,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
CreatedBy UserResponse `json:"created_by,omitempty"`
CreatedById string `json:"created_by_id,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
Description string `json:"description,omitempty"`
EnforceUniqueVote bool `json:"enforce_unique_vote,omitempty"`
Id string `json:"id,omitempty"`
IsClosed bool `json:"is_closed,omitempty"`
LatestAnswers []PollVoteResponseData `json:"latest_answers,omitempty"`
LatestVotesByOption map[string]interface{} `json:"latest_votes_by_option,omitempty"`
MaxVotesAllowed int `json:"max_votes_allowed,omitempty"`
Name string `json:"name,omitempty"`
Options []PollOptionResponseData `json:"options,omitempty"`
OwnVotes []PollVoteResponseData `json:"own_votes,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
VoteCount int `json:"vote_count,omitempty"`
VoteCountsByOption map[string]interface{} `json:"vote_counts_by_option,omitempty"`
VotingVisibility string `json:"voting_visibility,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | bool | Yes | |
| allow_user_suggested_options | bool | Yes | |
| answers_count | int | Yes | |
| created_at | float64 | Yes | |
| created_by_id | string | Yes | |
| custom | map[string]interface{} | Yes | |
| description | string | Yes | |
| enforce_unique_vote | bool | Yes | |
| id | string | Yes | |
| latest_answers | []PollVoteResponseData | Yes | |
| latest_votes_by_option | map[string]interface{} | Yes | |
| name | string | Yes | |
| options | []PollOptionResponseData | Yes | |
| own_votes | []PollVoteResponseData | Yes | |
| updated_at | float64 | Yes | |
| vote_count | int | Yes | |
| vote_counts_by_option | map[string]interface{} | Yes | |
| voting_visibility | string | Yes | |
| created_by | UserResponse | No | |
| is_closed | bool | No | |
| max_votes_allowed | int | No |
PollVoteResponseData
type PollVoteResponseData struct {
AnswerText string `json:"answer_text,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Id string `json:"id,omitempty"`
IsAnswer bool `json:"is_answer,omitempty"`
OptionId string `json:"option_id,omitempty"`
PollId string `json:"poll_id,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| id | string | Yes | |
| option_id | string | Yes | |
| poll_id | string | Yes | |
| updated_at | float64 | Yes | |
| answer_text | string | No | |
| is_answer | bool | No | |
| user | UserResponse | No | |
| user_id | string | No |
PollVotesResponse
type PollVotesResponse struct {
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Prev string `json:"prev,omitempty"`
Votes []PollVoteResponseData `json:"votes,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| votes | []PollVoteResponseData | Yes | Poll votes |
| next | string | No | |
| prev | string | No |
PrivacySettingsResponse
type PrivacySettingsResponse struct {
DeliveryReceipts DeliveryReceiptsResponse `json:"delivery_receipts,omitempty"`
ReadReceipts ReadReceiptsResponse `json:"read_receipts,omitempty"`
TypingIndicators TypingIndicatorsResponse `json:"typing_indicators,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
PushConfig
type PushConfig struct {
OfflineOnly bool `json:"offline_only,omitempty"`
Version string `json:"version,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| version | string | Yes | |
| offline_only | bool | No |
PushNotificationSettingsResponse
type PushNotificationSettingsResponse struct {
Disabled bool `json:"disabled,omitempty"`
DisabledUntil float64 `json:"disabled_until,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| disabled | bool | No | |
| disabled_until | float64 | No |
PushPreferenceInput
type PushPreferenceInput struct {
CallLevel string `json:"call_level,omitempty"`
ChannelCid string `json:"channel_cid,omitempty"`
ChatLevel string `json:"chat_level,omitempty"`
ChatPreferences ChatPreferencesInput `json:"chat_preferences,omitempty"`
DisabledUntil float64 `json:"disabled_until,omitempty"`
FeedsLevel string `json:"feeds_level,omitempty"`
FeedsPreferences FeedsPreferences `json:"feeds_preferences,omitempty"`
RemoveDisable bool `json:"remove_disable,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| call_level | string | No | Set the level of call push notifications for the user. One of: all, none, def... |
| channel_cid | string | No | Set the push preferences for a specific channel. If empty it sets the default... |
| chat_level | string | No | Set the level of chat push notifications for the user. Note: "mentions" is de... |
| chat_preferences | ChatPreferencesInput | No | |
| disabled_until | float64 | No | Disable push notifications till a certain time |
| feeds_level | string | No | Set the level of feeds push notifications for the user. One of: all, none, de... |
| feeds_preferences | FeedsPreferences | No | Set granular feeds preferences for reactions, comments, new followers, mentio... |
| remove_disable | bool | No | Remove the disabled until time. (IE stop snoozing notifications) |
| user_id | string | No | The user id for which to set the push preferences. Required when using server... |
PushProvider
type PushProvider struct {
ApnAuthKey string `json:"apn_auth_key,omitempty"`
ApnAuthType string `json:"apn_auth_type,omitempty"`
ApnDevelopment bool `json:"apn_development,omitempty"`
ApnHost string `json:"apn_host,omitempty"`
ApnKeyId string `json:"apn_key_id,omitempty"`
ApnNotificationTemplate string `json:"apn_notification_template,omitempty"`
ApnP12Cert string `json:"apn_p12_cert,omitempty"`
ApnTeamId string `json:"apn_team_id,omitempty"`
ApnTopic string `json:"apn_topic,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Description string `json:"description,omitempty"`
DisabledAt float64 `json:"disabled_at,omitempty"`
DisabledReason string `json:"disabled_reason,omitempty"`
FirebaseApnTemplate string `json:"firebase_apn_template,omitempty"`
FirebaseCredentials string `json:"firebase_credentials,omitempty"`
FirebaseDataTemplate string `json:"firebase_data_template,omitempty"`
FirebaseHost string `json:"firebase_host,omitempty"`
FirebaseNotificationTemplate string `json:"firebase_notification_template,omitempty"`
FirebaseServerKey string `json:"firebase_server_key,omitempty"`
HuaweiAppId string `json:"huawei_app_id,omitempty"`
HuaweiAppSecret string `json:"huawei_app_secret,omitempty"`
HuaweiHost string `json:"huawei_host,omitempty"`
Name string `json:"name,omitempty"`
PushTemplates []PushTemplate `json:"push_templates,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
XiaomiAppSecret string `json:"xiaomi_app_secret,omitempty"`
XiaomiPackageName string `json:"xiaomi_package_name,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| name | string | Yes | |
| type | string | Yes | |
| updated_at | float64 | Yes | |
| apn_auth_key | string | No | |
| apn_auth_type | string | No | |
| apn_development | bool | No | |
| apn_host | string | No | |
| apn_key_id | string | No | |
| apn_notification_template | string | No | |
| apn_p12_cert | string | No | |
| apn_team_id | string | No | |
| apn_topic | string | No | |
| description | string | No | |
| disabled_at | float64 | No | |
| disabled_reason | string | No | |
| firebase_apn_template | string | No | |
| firebase_credentials | string | No | |
| firebase_data_template | string | No | |
| firebase_host | string | No | |
| firebase_notification_template | string | No | |
| firebase_server_key | string | No | |
| huawei_app_id | string | No | |
| huawei_app_secret | string | No | |
| huawei_host | string | No | |
| push_templates | []PushTemplate | No | |
| xiaomi_app_secret | string | No | |
| xiaomi_package_name | string | No |
PushProviderRequest
type PushProviderRequest struct {
ApnAuthKey string `json:"apn_auth_key,omitempty"`
ApnAuthType string `json:"apn_auth_type,omitempty"`
ApnDevelopment bool `json:"apn_development,omitempty"`
ApnHost string `json:"apn_host,omitempty"`
ApnKeyId string `json:"apn_key_id,omitempty"`
ApnNotificationTemplate string `json:"apn_notification_template,omitempty"`
ApnP12Cert string `json:"apn_p12_cert,omitempty"`
ApnTeamId string `json:"apn_team_id,omitempty"`
ApnTopic string `json:"apn_topic,omitempty"`
Description string `json:"description,omitempty"`
DisabledAt float64 `json:"disabled_at,omitempty"`
DisabledReason string `json:"disabled_reason,omitempty"`
FirebaseApnTemplate string `json:"firebase_apn_template,omitempty"`
FirebaseCredentials string `json:"firebase_credentials,omitempty"`
FirebaseDataTemplate string `json:"firebase_data_template,omitempty"`
FirebaseHost string `json:"firebase_host,omitempty"`
FirebaseNotificationTemplate string `json:"firebase_notification_template,omitempty"`
FirebaseServerKey string `json:"firebase_server_key,omitempty"`
HuaweiAppId string `json:"huawei_app_id,omitempty"`
HuaweiAppSecret string `json:"huawei_app_secret,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
XiaomiAppSecret string `json:"xiaomi_app_secret,omitempty"`
XiaomiPackageName string `json:"xiaomi_package_name,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | |
| apn_auth_key | string | No | |
| apn_auth_type | string | No | |
| apn_development | bool | No | |
| apn_host | string | No | |
| apn_key_id | string | No | |
| apn_notification_template | string | No | |
| apn_p12_cert | string | No | |
| apn_team_id | string | No | |
| apn_topic | string | No | |
| description | string | No | |
| disabled_at | float64 | No | |
| disabled_reason | string | No | |
| firebase_apn_template | string | No | |
| firebase_credentials | string | No | |
| firebase_data_template | string | No | |
| firebase_host | string | No | |
| firebase_notification_template | string | No | |
| firebase_server_key | string | No | |
| huawei_app_id | string | No | |
| huawei_app_secret | string | No | |
| type | string | No | |
| xiaomi_app_secret | string | No | |
| xiaomi_package_name | string | No |
PushProviderResponse
type PushProviderResponse struct {
ApnAuthKey string `json:"apn_auth_key,omitempty"`
ApnAuthType string `json:"apn_auth_type,omitempty"`
ApnDevelopment bool `json:"apn_development,omitempty"`
ApnHost string `json:"apn_host,omitempty"`
ApnKeyId string `json:"apn_key_id,omitempty"`
ApnP12Cert string `json:"apn_p12_cert,omitempty"`
ApnSandboxCertificate bool `json:"apn_sandbox_certificate,omitempty"`
ApnSupportsRemoteNotifications bool `json:"apn_supports_remote_notifications,omitempty"`
ApnSupportsVoipNotifications bool `json:"apn_supports_voip_notifications,omitempty"`
ApnTeamId string `json:"apn_team_id,omitempty"`
ApnTopic string `json:"apn_topic,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Description string `json:"description,omitempty"`
DisabledAt float64 `json:"disabled_at,omitempty"`
DisabledReason string `json:"disabled_reason,omitempty"`
FirebaseApnTemplate string `json:"firebase_apn_template,omitempty"`
FirebaseCredentials string `json:"firebase_credentials,omitempty"`
FirebaseDataTemplate string `json:"firebase_data_template,omitempty"`
FirebaseHost string `json:"firebase_host,omitempty"`
FirebaseNotificationTemplate string `json:"firebase_notification_template,omitempty"`
FirebaseServerKey string `json:"firebase_server_key,omitempty"`
HuaweiAppId string `json:"huawei_app_id,omitempty"`
HuaweiAppSecret string `json:"huawei_app_secret,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
XiaomiAppSecret string `json:"xiaomi_app_secret,omitempty"`
XiaomiPackageName string `json:"xiaomi_package_name,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| name | string | Yes | |
| type | string | Yes | |
| updated_at | float64 | Yes | |
| apn_auth_key | string | No | |
| apn_auth_type | string | No | |
| apn_development | bool | No | |
| apn_host | string | No | |
| apn_key_id | string | No | |
| apn_p12_cert | string | No | |
| apn_sandbox_certificate | bool | No | |
| apn_supports_remote_notifications | bool | No | |
| apn_supports_voip_notifications | bool | No | |
| apn_team_id | string | No | |
| apn_topic | string | No | |
| description | string | No | |
| disabled_at | float64 | No | |
| disabled_reason | string | No | |
| firebase_apn_template | string | No | |
| firebase_credentials | string | No | |
| firebase_data_template | string | No | |
| firebase_host | string | No | |
| firebase_notification_template | string | No | |
| firebase_server_key | string | No | |
| huawei_app_id | string | No | |
| huawei_app_secret | string | No | |
| xiaomi_app_secret | string | No | |
| xiaomi_package_name | string | No |
PushTemplate
type PushTemplate struct {
CreatedAt float64 `json:"created_at,omitempty"`
EnablePush bool `json:"enable_push,omitempty"`
EventType string `json:"event_type,omitempty"`
Template string `json:"template,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| enable_push | bool | Yes | |
| event_type | string | Yes | |
| updated_at | float64 | Yes | |
| template | string | No |
PushTemplateResponse
type PushTemplateResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
EnablePush bool `json:"enable_push,omitempty"`
EventType string `json:"event_type,omitempty"`
PushProviderInternalId string `json:"push_provider_internal_id,omitempty"`
Template string `json:"template,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | Time when the template was created |
| enable_push | bool | Yes | Whether push notification is enabled for this event |
| event_type | string | Yes | Type of event this template applies to |
| push_provider_internal_id | string | Yes | Internal ID of the push provider |
| updated_at | float64 | Yes | Time when the template was last updated |
| template | string | No | The push notification template |
QueryPollsResponse
type QueryPollsResponse struct {
Duration string `json:"duration,omitempty"`
Next string `json:"next,omitempty"`
Polls []PollResponseData `json:"polls,omitempty"`
Prev string `json:"prev,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| polls | []PollResponseData | Yes | Polls data returned by the query |
| next | string | No | |
| prev | string | No |
QueryUsersResponse
type QueryUsersResponse struct {
Duration string `json:"duration,omitempty"`
Users []FullUserResponse `json:"users,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| users | []FullUserResponse | Yes | Array of users as result of filters applied. |
ReactionResponse
type ReactionResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
MessageId string `json:"message_id,omitempty"`
Score int `json:"score,omitempty"`
Type string `json:"type,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
User UserResponse `json:"user,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | Date/time of creation |
| custom | map[string]interface{} | Yes | Custom data for this object |
| message_id | string | Yes | Message ID |
| score | int | Yes | Score of the reaction |
| type | string | Yes | Type of reaction |
| updated_at | float64 | Yes | Date/time of the last update |
| user | UserResponse | Yes | User |
| user_id | string | Yes | User ID |
ReactivateUserResponse
type ReactivateUserResponse struct {
Duration string `json:"duration,omitempty"`
User UserResponse `json:"user,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| user | UserResponse | No | Deactivated user object |
ReactivateUsersResponse
Basic response information
type ReactivateUsersResponse struct {
Duration string `json:"duration,omitempty"`
TaskId string `json:"task_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| task_id | string | Yes |
RemoveUserGroupMembersResponse
Response for removing members from a user group
type RemoveUserGroupMembersResponse struct {
Duration string `json:"duration,omitempty"`
UserGroup UserGroupResponse `json:"user_group,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
Response
Basic response information
type Response struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
Role
type Role struct {
CreatedAt float64 `json:"created_at,omitempty"`
Custom bool `json:"custom,omitempty"`
Name string `json:"name,omitempty"`
Scopes []string `json:"scopes,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | Date/time of creation |
| custom | bool | Yes | Whether this is a custom role or built-in |
| name | string | Yes | Unique role name |
| scopes | []string | Yes | List of scopes where this role is currently present. .app means that role i... |
| updated_at | float64 | Yes | Date/time of the last update |
S3Request
Config for creating Amazon S3 storage.
type S3Request struct {
S3ApiKey string `json:"s3_api_key,omitempty"`
S3CustomEndpointUrl string `json:"s3_custom_endpoint_url,omitempty"`
S3Region string `json:"s3_region,omitempty"`
S3Secret string `json:"s3_secret,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| s3_region | string | Yes | The AWS region where the bucket is hosted |
| s3_api_key | string | No | The AWS API key. To use Amazon S3 as your storage provider, you have two auth... |
| s3_custom_endpoint_url | string | No | The custom endpoint for S3. If you want to use a custom endpoint, you must al... |
| s3_secret | string | No | The AWS API Secret |
SearchUserGroupsResponse
Response for searching user groups
type SearchUserGroupsResponse struct {
Duration string `json:"duration,omitempty"`
UserGroups []UserGroupResponse `json:"user_groups,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_groups | []UserGroupResponse | Yes | List of matching user groups |
SharedLocationResponse
type SharedLocationResponse struct {
Channel ChannelResponse `json:"channel,omitempty"`
ChannelCid string `json:"channel_cid,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
CreatedByDeviceId string `json:"created_by_device_id,omitempty"`
Duration string `json:"duration,omitempty"`
EndAt float64 `json:"end_at,omitempty"`
Latitude float64 `json:"latitude,omitempty"`
Longitude float64 `json:"longitude,omitempty"`
Message MessageResponse `json:"message,omitempty"`
MessageId string `json:"message_id,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | Channel CID |
| created_at | float64 | Yes | Date/time of creation |
| created_by_device_id | string | Yes | Device ID that created the live location |
| duration | string | Yes | |
| latitude | float64 | Yes | Latitude coordinate |
| longitude | float64 | Yes | Longitude coordinate |
| message_id | string | Yes | Message ID |
| updated_at | float64 | Yes | Date/time of the last update |
| user_id | string | Yes | User ID |
| channel | ChannelResponse | No | |
| end_at | float64 | No | Time when the live location expires |
| message | MessageResponse | No |
SharedLocationResponseData
type SharedLocationResponseData struct {
Channel ChannelResponse `json:"channel,omitempty"`
ChannelCid string `json:"channel_cid,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
CreatedByDeviceId string `json:"created_by_device_id,omitempty"`
EndAt float64 `json:"end_at,omitempty"`
Latitude float64 `json:"latitude,omitempty"`
Longitude float64 `json:"longitude,omitempty"`
Message MessageResponse `json:"message,omitempty"`
MessageId string `json:"message_id,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
UserId string `json:"user_id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | string | Yes | |
| created_at | float64 | Yes | |
| created_by_device_id | string | Yes | |
| latitude | float64 | Yes | |
| longitude | float64 | Yes | |
| message_id | string | Yes | |
| updated_at | float64 | Yes | |
| user_id | string | Yes | |
| channel | ChannelResponse | No | |
| end_at | float64 | No | |
| message | MessageResponse | No |
SharedLocationsResponse
type SharedLocationsResponse struct {
ActiveLiveLocations []SharedLocationResponseData `json:"active_live_locations,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_live_locations | []SharedLocationResponseData | Yes | |
| duration | string | Yes |
SortParamRequest
type SortParamRequest struct {
Direction int `json:"direction,omitempty"`
Field string `json:"field,omitempty"`
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | int | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One o... |
| field | string | No | Name of field to sort by |
| type | string | No | Type of field to sort by. Empty string or omitted means string type (default)... |
Time
type Time struct {
}UnblockUsersResponse
type UnblockUsersResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
UpdateBlockListResponse
Basic response information
type UpdateBlockListResponse struct {
Blocklist BlockListResponse `json:"blocklist,omitempty"`
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| blocklist | BlockListResponse | No |
UpdateExternalStorageResponse
Basic response information
type UpdateExternalStorageResponse struct {
Bucket string `json:"bucket,omitempty"`
Duration string `json:"duration,omitempty"`
Name string `json:"name,omitempty"`
Path string `json:"path,omitempty"`
Type string `json:"type,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | string | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| name | string | Yes | |
| path | string | Yes | |
| type | string | Yes |
UpdateUserGroupResponse
Response for updating a user group
type UpdateUserGroupResponse struct {
Duration string `json:"duration,omitempty"`
UserGroup UserGroupResponse `json:"user_group,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
UpdateUserPartialRequest
type UpdateUserPartialRequest struct {
Id string `json:"id,omitempty"`
Set map[string]interface{} `json:"set,omitempty"`
Unset []string `json:"unset,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID to update |
| set | map[string]interface{} | No | |
| unset | []string | No |
UpdateUsersResponse
type UpdateUsersResponse struct {
Duration string `json:"duration,omitempty"`
MembershipDeletionTaskId string `json:"membership_deletion_task_id,omitempty"`
Users map[string]interface{} `json:"users,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| membership_deletion_task_id | string | Yes | |
| users | map[string]interface{} | Yes | Object containing users |
UpsertExternalStorageAWSS3Request
type UpsertExternalStorageAWSS3Request struct {
Bucket string `json:"bucket,omitempty"`
PathPrefix string `json:"path_prefix,omitempty"`
Region string `json:"region,omitempty"`
RoleArn string `json:"role_arn,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bucket | string | Yes | |
| region | string | Yes | |
| role_arn | string | Yes | |
| path_prefix | string | No |
UpsertExternalStorageResponse
Basic response information
type UpsertExternalStorageResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
UpsertPushPreferencesResponse
type UpsertPushPreferencesResponse struct {
Duration string `json:"duration,omitempty"`
UserChannelPreferences map[string]interface{} `json:"user_channel_preferences,omitempty"`
UserPreferences map[string]interface{} `json:"user_preferences,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| user_channel_preferences | map[string]interface{} | Yes | The channel specific push notification preferences, only returned for channel... |
| user_preferences | map[string]interface{} | Yes | The user preferences, always returned regardless if you edited it |
UpsertPushProviderResponse
Basic response information
type UpsertPushProviderResponse struct {
Duration string `json:"duration,omitempty"`
PushProvider PushProviderResponse `json:"push_provider,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| push_provider | PushProviderResponse | Yes |
UpsertPushTemplateResponse
Basic response information
type UpsertPushTemplateResponse struct {
Duration string `json:"duration,omitempty"`
Template PushTemplateResponse `json:"template,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| template | PushTemplateResponse | No |
User
type User struct {
Data map[string]interface{} `json:"data,omitempty"`
Id string `json:"id,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| data | map[string]interface{} | No |
UserGroupResponse
type UserGroupResponse struct {
CreatedAt float64 `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
Id string `json:"id,omitempty"`
Members []UserGroupMember `json:"members,omitempty"`
Name string `json:"name,omitempty"`
TeamId string `json:"team_id,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float64 | Yes | |
| id | string | Yes | |
| name | string | Yes | |
| updated_at | float64 | Yes | |
| created_by | string | No | |
| description | string | No | |
| members | []UserGroupMember | No | |
| team_id | string | No |
UserRequest
User request object
type UserRequest struct {
Custom map[string]interface{} `json:"custom,omitempty"`
Id string `json:"id,omitempty"`
Image string `json:"image,omitempty"`
Invisible bool `json:"invisible,omitempty"`
Language string `json:"language,omitempty"`
Name string `json:"name,omitempty"`
PrivacySettings PrivacySettingsResponse `json:"privacy_settings,omitempty"`
Role string `json:"role,omitempty"`
Teams []string `json:"teams,omitempty"`
TeamsRole map[string]interface{} `json:"teams_role,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID |
| custom | map[string]interface{} | No | Custom user data |
| image | string | No | User's profile image URL |
| invisible | bool | No | |
| language | string | No | |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | |
| role | string | No | User's global role |
| teams | []string | No | List of teams the user belongs to |
| teams_role | map[string]interface{} | No | Map of team-specific roles for the user |
UserResponse
User response object
type UserResponse struct {
AvgResponseTime int `json:"avg_response_time,omitempty"`
BanExpires float64 `json:"ban_expires,omitempty"`
Banned bool `json:"banned,omitempty"`
BlockedUserIds []string `json:"blocked_user_ids,omitempty"`
BypassModeration bool `json:"bypass_moderation,omitempty"`
CreatedAt float64 `json:"created_at,omitempty"`
Custom map[string]interface{} `json:"custom,omitempty"`
DeactivatedAt float64 `json:"deactivated_at,omitempty"`
DeletedAt float64 `json:"deleted_at,omitempty"`
Devices []DeviceResponse `json:"devices,omitempty"`
Id string `json:"id,omitempty"`
Image string `json:"image,omitempty"`
Invisible bool `json:"invisible,omitempty"`
Language string `json:"language,omitempty"`
LastActive float64 `json:"last_active,omitempty"`
Name string `json:"name,omitempty"`
Online bool `json:"online,omitempty"`
PrivacySettings PrivacySettingsResponse `json:"privacy_settings,omitempty"`
PushNotifications PushNotificationSettingsResponse `json:"push_notifications,omitempty"`
RevokeTokensIssuedBefore float64 `json:"revoke_tokens_issued_before,omitempty"`
Role string `json:"role,omitempty"`
ShadowBanned bool `json:"shadow_banned,omitempty"`
Teams []string `json:"teams,omitempty"`
TeamsRole map[string]interface{} `json:"teams_role,omitempty"`
UpdatedAt float64 `json:"updated_at,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | Whether a user is banned or not |
| blocked_user_ids | []string | Yes | |
| created_at | float64 | Yes | Date/time of creation |
| custom | map[string]interface{} | Yes | Custom data for this object |
| id | string | Yes | Unique user identifier |
| invisible | bool | Yes | |
| language | string | Yes | Preferred language of a user |
| online | bool | Yes | Whether a user online or not |
| role | string | Yes | Determines the set of user permissions |
| shadow_banned | bool | Yes | Whether a user is shadow banned |
| teams | []string | Yes | List of teams user is a part of |
| updated_at | float64 | Yes | Date/time of the last update |
| avg_response_time | int | No | |
| ban_expires | float64 | No | Date when ban expires |
| bypass_moderation | bool | No | |
| deactivated_at | float64 | No | Date of deactivation |
| deleted_at | float64 | No | Date/time of deletion |
| devices | []DeviceResponse | No | List of devices user is using |
| image | string | No | |
| last_active | float64 | No | Date of last activity |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | User privacy settings |
| push_notifications | PushNotificationSettingsResponse | No | User push notification settings |
| revoke_tokens_issued_before | float64 | No | Revocation date for tokens |
| teams_role | map[string]interface{} | No |
ValidateExternalStorageResponse
Basic response information
type ValidateExternalStorageResponse struct {
Duration string `json:"duration,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
VelocityFilterConfig
type VelocityFilterConfig struct {
AdvancedFilters bool `json:"advanced_filters,omitempty"`
Async bool `json:"async,omitempty"`
CascadingActions bool `json:"cascading_actions,omitempty"`
CidsPerUser int `json:"cids_per_user,omitempty"`
Enabled bool `json:"enabled,omitempty"`
FirstMessageOnly bool `json:"first_message_only,omitempty"`
Rules []VelocityFilterConfigRule `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| advanced_filters | bool | No | |
| async | bool | No | |
| cascading_actions | bool | No | |
| cids_per_user | int | No | |
| enabled | bool | No | |
| first_message_only | bool | No | |
| rules | []VelocityFilterConfigRule | No |
VideoCallRuleConfig
type VideoCallRuleConfig struct {
FlagAllLabels bool `json:"flag_all_labels,omitempty"`
FlaggedLabels []string `json:"flagged_labels,omitempty"`
Rules []HarmConfig `json:"rules,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| flag_all_labels | bool | No | |
| flagged_labels | []string | No | |
| rules | []HarmConfig | No |
XiaomiConfig
type XiaomiConfig struct {
Disabled bool `json:"Disabled,omitempty"`
PackageName string `json:"package_name,omitempty"`
Secret string `json:"secret,omitempty"`
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Disabled | bool | No | |
| package_name | string | No | |
| secret | string | No |