Appearance
Common
About 7769 wordsAbout 26 min
Swift SDK - Feeds API
Table of Contents
- getApp
- listBlockLists
- createBlockList
- updateBlockList
- deleteBlockList
- listDevices
- createDevice
- deleteDevice
- createGuest
- longPoll
- getOG
- createPoll
- updatePoll
- queryPolls
- getPoll
- updatePollPartial
- deletePoll
- createPollOption
- updatePollOption
- getPollOption
- deletePollOption
- queryPollVotes
- updatePushNotificationPreferences
- uploadFile
- deleteFile
- uploadImage
- deleteImage
- listUserGroups
- createUserGroup
- searchUserGroups
- getUserGroup
- updateUserGroup
- deleteUserGroup
- addUserGroupMembers
- removeUserGroupMembers
- queryUsers
- updateUsers
- updateUsersPartial
- getBlockedUsers
- blockUsers
- getUserLiveLocations
- updateLiveLocation
- unblockUsers
- Types Reference
getApp
Retrieve the current application settings to understand and verify the configuration of your app. Use this method when you need to access or review the app's settings for troubleshooting or validation purposes.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getApp()
print(response)Response: GetApplicationResponse
listBlockLists
Obtain a list of all block lists to manage or review the existing lists effectively. Use this method when you need a comprehensive overview of all block lists in your system.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.listBlockLists()
print(response)Response: ListBlockListResponse
Parameters
Query Parameters:
team(String)
createBlockList
Establish a new block list to prevent certain elements from interacting with your application. This method is essential when introducing new restrictions or security measures.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.createBlockList(
request: .init(
name: "Example Name",
words: ["value1", "value2"],
isLeetCheckEnabled: true,
isPluralCheckEnabled: true
)
)
print(response)Response: CreateBlockListResponse
Parameters
Request Body:
isLeetCheckEnabled(Bool)isPluralCheckEnabled(Bool)name(String) (required): Block list nameteam(String)type(String): Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, wordwords([String]) (required): List of words to block
updateBlockList
Modify an existing block list to add, remove, or change its entries. This is useful when updating the list to reflect new restrictions or allow previously blocked interactions.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateBlockList(
request: .init(
isLeetCheckEnabled: true,
isPluralCheckEnabled: true
)
)
print(response)Response: UpdateBlockListResponse
Parameters
Path Parameters:
name(String) (required)
Request Body:
isLeetCheckEnabled(Bool)isPluralCheckEnabled(Bool)team(String)words([String]): List of words to block
deleteBlockList
Remove a block list to eliminate its restrictions from your application. Use this method when a block list is no longer needed, or when consolidating lists for efficiency.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteBlockList(
name: "example_value"
)
print(response)Response: Response
Parameters
Path Parameters:
name(String) (required)
Query Parameters:
team(String)
listDevices
Retrieve a comprehensive list of all registered devices, useful for monitoring and managing device inventory.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.listDevices()
print(response)Response: ListDevicesResponse
createDevice
Add a new device to your system, ideal for onboarding new hardware into your network.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.createDevice(
request: .init(
id: "example-id",
pushProvider: "example_value",
pushProviderName: "example_value",
voipToken: true
)
)
print(response)Response: Response
Parameters
Request Body:
id(String) (required): Device IDpushProvider(String) (required): Push providerpushProviderName(String): Push provider namevoipToken(Bool): When true the token is for Apple VoIP push notifications
deleteDevice
Remove a specific device from your records, perfect for decommissioning or replacing outdated equipment.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteDevice(
id: "example-id"
)
print(response)Response: Response
Parameters
Query Parameters:
id(String) (required)
createGuest
Register a temporary guest user, ideal for providing limited access to your system without creating a permanent account.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.createGuest(
request: .init(
user: "example_value"
)
)
print(response)Response: CreateGuestResponse
Parameters
Request Body:
user(UserRequest) (required): User object which server acts upon
longPoll
The longPoll method initiates a long polling connection to receive updates from a server in real-time. Use this method when you need to continuously listen for new data or events without maintaining a persistent connection, such as when working with APIs that do not support WebSockets.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.longPoll()
print(response)Parameters
Query Parameters:
json()connectionID(String)
getOG
Retrieves Open Graph data, which can be used to enhance the display of web content when shared on social media platforms.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getOG(
url: "example_value"
)
print(response)Response: GetOGResponse
Parameters
Query Parameters:
url(String) (required)
createPoll
Initiate a new poll with specified parameters, ideal for gathering feedback or opinions from a group of users.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.createPoll(
request: .init(
name: "Example Name",
custom: [:],
allowAnswers: true
)
)
print(response)Response: PollResponse
Parameters
Request Body:
custom([String: Any])allowAnswers(Bool): Indicates whether users can suggest user defined answersallowUserSuggestedOptions(Bool)description(String): A description of the pollenforceUniqueVote(Bool): Indicates whether users can cast multiple votesid(String)isClosed(Bool): Indicates whether the poll is open for votingmaxVotesAllowed(Int): Indicates the maximum amount of votes a user can castname(String) (required): The name of the polloptions([PollOptionInput])votingVisibility(String)
updatePoll
Modify an existing poll's details, such as its title or description, to keep it relevant and up-to-date.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updatePoll(
request: .init(
id: "example-id",
name: "Example Name",
custom: [:],
allowAnswers: true
)
)
print(response)Response: PollResponse
Parameters
Request Body:
custom([String: Any])allowAnswers(Bool): Allow answersallowUserSuggestedOptions(Bool): Allow user suggested optionsdescription(String): Poll descriptionenforceUniqueVote(Bool): Enforce unique voteid(String) (required): Poll IDisClosed(Bool): Is closedmaxVotesAllowed(Int): Max votes allowedname(String) (required): Poll nameoptions([PollOptionRequest]): Poll optionsvotingVisibility(String): Voting visibility
queryPolls
Search and filter through existing polls based on specific criteria, helping you quickly find the polls of interest.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryPolls(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: QueryPollsResponse
Parameters
Query Parameters:
userID(String)
Request Body:
filter([String: Any]): Filter to apply to the querylimit(Int)next(String)prev(String)sort([SortParamRequest]): Array of sort parameters
getPoll
Access the details of a specific poll, essential for reviewing its content and status before engagement.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getPoll(
pollID: "example_value"
)
print(response)Response: PollResponse
Parameters
Path Parameters:
pollID(String) (required)
Query Parameters:
userID(String)
updatePollPartial
Make targeted updates to specific fields of a poll without altering its entire structure, useful for quick adjustments.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updatePollPartial(
request: .init(
set: [:],
unset: ["value1", "value2"]
)
)
print(response)Response: PollResponse
Parameters
Path Parameters:
pollID(String) (required)
Request Body:
set([String: Any]): Sets new field valuesunset([String]): Array of field names to unset
deletePoll
Remove a poll from the system, useful for maintaining a clean and relevant set of active polls.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deletePoll(
pollID: "example_value"
)
print(response)Response: Response
Parameters
Path Parameters:
pollID(String) (required)
Query Parameters:
userID(String)
createPollOption
Add a new option to an existing poll, expanding the choices available to participants for more comprehensive feedback.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.createPollOption(
request: .init(
text: "Hello, World!",
custom: [:]
)
)
print(response)Response: PollOptionResponse
Parameters
Path Parameters:
pollID(String) (required)
Request Body:
custom([String: Any])text(String) (required): Option text
updatePollOption
Modify an existing poll option to correct or improve the available responses, ensuring clarity and accuracy.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updatePollOption(
request: .init(
id: "example-id",
text: "Hello, World!",
custom: [:]
)
)
print(response)Response: PollOptionResponse
Parameters
Path Parameters:
pollID(String) (required)
Request Body:
custom([String: Any])id(String) (required): Option IDtext(String) (required): Option text
getPollOption
Retrieve details about a specific poll option, aiding in the analysis or review of available choices within a poll.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getPollOption(
pollID: "example_value",
optionID: "example_value"
)
print(response)Response: PollOptionResponse
Parameters
Path Parameters:
pollID(String) (required)optionID(String) (required)
Query Parameters:
userID(String)
deletePollOption
Remove a specific option from a poll, useful for managing and updating active polls by eliminating outdated or incorrect choices.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deletePollOption(
pollID: "example_value",
optionID: "example_value"
)
print(response)Response: Response
Parameters
Path Parameters:
pollID(String) (required)optionID(String) (required)
Query Parameters:
userID(String)
queryPollVotes
Retrieve the current vote counts for a poll, enabling you to assess poll engagement and results in real-time.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryPollVotes(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: PollVotesResponse
Parameters
Path Parameters:
pollID(String) (required)
Query Parameters:
userID(String)
Request Body:
filter([String: Any]): Filter to apply to the querylimit(Int)next(String)prev(String)sort([SortParamRequest]): Array of sort parameters
updatePushNotificationPreferences
Modify user preferences for receiving push notifications, ensuring users only receive relevant and desired notifications.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updatePushNotificationPreferences(
request: .init(
preferences: []
)
)
print(response)Response: UpsertPushPreferencesResponse
Parameters
Request Body:
preferences([PushPreferenceInput]) (required): A list of push preferences for channels, calls, or the user.
uploadFile
Add a file to the server to facilitate storage and access within your application. Use this method to manage file resources and enhance document availability for users.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.uploadFile(
request: .init(
file: "example_value",
user: "example_value"
)
)
print(response)Response: FileUploadResponse
Parameters
Request Body:
file(String): file fielduser(OnlyUserID): user for the request server side only
deleteFile
Remove a file from the server to manage storage and ensure only relevant files are retained. Use this method to free up space and maintain an organized file system.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteFile()
print(response)Response: Response
Parameters
Query Parameters:
url(String)
uploadImage
Upload an image to the server for integration into your application’s content. Use this method to manage visual assets and improve the aesthetic and functional aspects of your application.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.uploadImage(
request: .init(
file: "example_value",
uploadSizes: []
)
)
print(response)Response: ImageUploadResponse
Parameters
Request Body:
file(String)uploadSizes([ImageSize]): field with JSON-encoded array of image size configurationsuser(OnlyUserID)
deleteImage
Delete an image from the server to manage space and ensure only necessary images are stored. Use this method when an image is outdated or no longer required.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteImage()
print(response)Response: Response
Parameters
Query Parameters:
url(String)
listUserGroups
Retrieve a list of all user groups. Use this method to view all existing user groups in your system for management or auditing purposes.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.listUserGroups()
print(response)Response: ListUserGroupsResponse
Parameters
Query Parameters:
limit(Int)idGt(String)createdAtGt(String)teamID(String)
createUserGroup
Establish a new user group. Use this method to organize users into a new group for easier management and permissions assignment.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.createUserGroup(
request: .init(
name: "Example Name",
description: "example_value",
id: "example-id"
)
)
print(response)Response: CreateUserGroupResponse
Parameters
Request Body:
description(String): An optional description for the groupid(String): Optional user group ID. If not provided, a UUID v7 will be generatedmemberIds([String]): Optional initial list of user IDs to add as membersname(String) (required): The user friendly name of the user groupteamID(String): Optional team ID to scope the group to a team
searchUserGroups
Find user groups based on specific criteria. Use this method to quickly locate user groups that meet certain conditions or attributes.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.searchUserGroups(
query: "example_value"
)
print(response)Response: SearchUserGroupsResponse
Parameters
Query Parameters:
query(String) (required)limit(Int)nameGt(String)idGt(String)teamID(String)
getUserGroup
Obtain detailed information about a specific user group. Use this method to review the properties and configuration of a particular user group.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getUserGroup(
id: "example-id"
)
print(response)Response: GetUserGroupResponse
Parameters
Path Parameters:
id(String) (required)
Query Parameters:
teamID(String)
updateUserGroup
Modify the details of an existing user group. Use this method to change the attributes or membership of a user group as needed.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateUserGroup(
request: .init(
description: "example_value",
name: "Example Name"
)
)
print(response)Response: UpdateUserGroupResponse
Parameters
Path Parameters:
id(String) (required)
Request Body:
description(String): The new description for the groupname(String): The new name of the user groupteamID(String)
deleteUserGroup
Remove a user group from the system. Use this method when a user group is no longer needed, to maintain cleanliness and organization.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteUserGroup(
id: "example-id"
)
print(response)Response: Response
Parameters
Path Parameters:
id(String) (required)
Query Parameters:
teamID(String)
addUserGroupMembers
Use this method to add multiple users to a specified user group, streamlining group management and access control. Ideal for onboarding new team members or updating group memberships efficiently.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.addUserGroupMembers(
request: .init(
memberIds: ["id-1", "id-2"],
asAdmin: true,
teamID: "example_value"
)
)
print(response)Response: AddUserGroupMembersResponse
Parameters
Path Parameters:
id(String) (required)
Request Body:
asAdmin(Bool): Whether to add the members as group admins. Defaults to falsememberIds([String]) (required): List of user IDs to add as membersteamID(String)
removeUserGroupMembers
This method allows you to remove multiple users from a specified user group, helping to maintain organized and current access permissions. It is useful for managing group changes when users no longer need access or have left a team.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.removeUserGroupMembers(
request: .init(
memberIds: ["id-1", "id-2"],
teamID: "example_value"
)
)
print(response)Response: RemoveUserGroupMembersResponse
Parameters
Path Parameters:
id(String) (required)
Request Body:
memberIds([String]) (required): List of user IDs to removeteamID(String)
queryUsers
Retrieve information about users based on specific criteria to analyze user data or make informed decisions. Use this method to efficiently filter and access user details in your application.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryUsers()
print(response)Response: QueryUsersResponse
Parameters
Query Parameters:
payload()
updateUsers
Add or modify user information to ensure current and accurate user data within the system. Use this method to manage user profiles effectively and support proper user engagement.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateUsers(
request: .init(
users: ["john", "jane"]
)
)
print(response)Response: UpdateUsersResponse
Parameters
Request Body:
users([String: Any]) (required): Object containing users
updateUsersPartial
Apply partial updates to a user's information, allowing for specific changes without overwriting the entire user profile. Use this method for targeted updates to user data, enhancing flexibility and precision.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateUsersPartial(
request: .init(
users: ["john", "jane"]
)
)
print(response)Response: UpdateUsersResponse
Parameters
Request Body:
users([UpdateUserPartialRequest]) (required)
getBlockedUsers
Retrieve a list of users that have been blocked. Use this method to monitor and manage users who are restricted from accessing certain features or areas of your application.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getBlockedUsers()
print(response)Response: GetBlockedUsersResponse
blockUsers
Prevent specified users from accessing certain features or areas of your application. This method is useful for managing user behavior and maintaining community standards.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.blockUsers(
request: .init(
blockedUserID: "john"
)
)
print(response)Response: BlockUsersResponse
Parameters
Request Body:
blockedUserID(String) (required): User id to block
getUserLiveLocations
Fetch the current live location data of users. This is useful in applications where real-time location tracking is necessary, such as delivery or ride-sharing services.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getUserLiveLocations()
print(response)Response: SharedLocationsResponse
updateLiveLocation
Update the live location data for a user. Use this method to ensure that your application has the most current and accurate location information for users.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateLiveLocation(
request: .init(
messageID: "message-789",
endAt: 1.0,
latitude: 1.0
)
)
print(response)Response: SharedLocationResponse
Parameters
Request Body:
endAt(Double): Time when the live location expireslatitude(Double): Latitude coordinatelongitude(Double): Longitude coordinatemessageID(String) (required): Live location ID
unblockUsers
Remove the block on specified users, allowing them to regain access to previously restricted features or areas. Use this to reverse previous blocking actions when a user is deemed compliant.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.unblockUsers(
request: .init(
blockedUserID: "john"
)
)
print(response)Response: UnblockUsersResponse
Parameters
Request Body:
blockedUserID(String) (required)
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
Action
struct Action {
var name: String
var style: String?
var text: String
var type: String
var value: String?
}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
struct AddUserGroupMembersResponse {
var duration: String
var userGroup: UserGroupResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
AppResponseFields
struct AppResponseFields {
var asyncURLEnrichEnabled: Bool
var autoTranslationEnabled: Bool
var fileUploadConfig: FileUploadConfig
var id: Int
var imageUploadConfig: FileUploadConfig
var name: String
var placement: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async_url_enrich_enabled | Bool | Yes | |
| auto_translation_enabled | Bool | Yes | |
| file_upload_config | FileUploadConfig | Yes | |
| id | Int | Yes | |
| image_upload_config | FileUploadConfig | Yes | |
| name | String | Yes | |
| placement | String | Yes |
BlockListResponse
Block list contains restricted words
struct BlockListResponse {
var createdAt: Double?
var id: String?
var isLeetCheckEnabled: Bool
var isPluralCheckEnabled: Bool
var name: String
var team: String?
var type: String
var updatedAt: Double?
var words: [String]
}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 | Double | No | Date/time of creation |
| id | String | No | |
| team | String | No | |
| updated_at | Double | No | Date/time of the last update |
BlockUsersResponse
struct BlockUsersResponse {
var blockedByUserID: String
var blockedUserID: String
var createdAt: Double
var duration: String
}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 | Double | Yes | Timestamp when the user was blocked |
| duration | String | Yes | Duration of the request in milliseconds |
BlockedUserResponse
struct BlockedUserResponse {
var blockedUser: UserResponse
var blockedUserID: String
var createdAt: Double
var user: UserResponse
var userID: String
}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 | Double | Yes | |
| user | UserResponse | Yes | User who blocked another user |
| user_id | String | Yes | ID of the user who blocked another user |
ChannelResponse
Represents channel in chat
struct ChannelResponse {
var autoTranslationEnabled: Bool?
var autoTranslationLanguage: String?
var blocked: Bool?
var cid: String
var config: ChannelConfigWithInfo?
var cooldown: Int?
var createdAt: Double
var createdBy: UserResponse?
var custom: [String: Any]
var deletedAt: Double?
var disabled: Bool
var filterTags: [String]?
var frozen: Bool
var hidden: Bool?
var hideMessagesBefore: Double?
var id: String
var lastMessageAt: Double?
var memberCount: Int?
var members: [ChannelMemberResponse]?
var messageCount: Int?
var muteExpiresAt: Double?
var muted: Bool?
var ownCapabilities: [ChannelOwnCapability]?
var team: String?
var truncatedAt: Double?
var truncatedBy: UserResponse?
var type: String
var updatedAt: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | String | Yes | Channel CID (<type>:<id>) |
| created_at | Double | Yes | Date/time of creation |
| custom | [String: Any] | 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 | Double | 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 | Double | 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 | Double | No | Date since when the message history is accessible |
| last_message_at | Double | 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 | Double | 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 | Double | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | No |
ChatPreferencesInput
struct ChatPreferencesInput {
var channelMentions: String /* all | none */?
var defaultPreference: String /* all | none */?
var directMentions: String /* all | none */?
var groupMentions: String /* all | none */?
var hereMentions: String /* all | none */?
var roleMentions: String /* all | none */?
var threadReplies: String /* all | none */?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_mentions | String /* all | none */ | No |
| default_preference | String /* all | none */ | No |
| direct_mentions | String /* all | none */ | No |
| group_mentions | String /* all | none */ | No |
| here_mentions | String /* all | none */ | No |
| role_mentions | String /* all | none */ | No |
| thread_replies | String /* all | none */ | No |
CreateBlockListResponse
Basic response information
struct CreateBlockListResponse {
var blocklist: BlockListResponse?
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| blocklist | BlockListResponse | No |
CreateGuestResponse
struct CreateGuestResponse {
var accessToken: String
var duration: String
var user: UserResponse
}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 |
CreateUserGroupResponse
Response for creating a user group
struct CreateUserGroupResponse {
var duration: String
var userGroup: UserGroupResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| user_group | UserGroupResponse | No | The created user group |
DeviceResponse
Response for Device
struct DeviceResponse {
var createdAt: Double
var disabled: Bool?
var disabledReason: String?
var id: String
var pushProvider: String
var pushProviderName: String?
var userID: String
var voip: Bool?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | 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 |
FeedsPreferences
struct FeedsPreferences {
var comment: String /* all | none */?
var commentMention: String /* all | none */?
var commentReaction: String /* all | none */?
var commentReply: String /* all | none */?
var customActivityTypes: [String: Any]?
var follow: String /* all | none */?
var mention: String /* all | none */?
var reaction: String /* all | none */?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | String /* all | none */ | No |
| comment_mention | String /* all | none */ | No |
| comment_reaction | String /* all | none */ | No |
| comment_reply | String /* all | none */ | No |
| custom_activity_types | [String: Any] | No | Push notification preferences for custom activity types. Map of activity type... |
| follow | String /* all | none */ | No |
| mention | String /* all | none */ | No |
| reaction | String /* all | none */ | No |
Field
struct Field {
var short: Bool
var title: String
var value: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | Bool | Yes | |
| title | String | Yes | |
| value | String | Yes |
FileUploadResponse
struct FileUploadResponse {
var duration: String
var file: String?
var thumbURL: String?
}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... |
FullUserResponse
struct FullUserResponse {
var avgResponseTime: Int?
var banExpires: Double?
var banned: Bool
var blockedUserIds: [String]
var channelMutes: [ChannelMute]
var createdAt: Double
var custom: [String: Any]
var deactivatedAt: Double?
var deletedAt: Double?
var devices: [DeviceResponse]
var id: String
var image: String?
var invisible: Bool
var language: String
var lastActive: Double?
var latestHiddenChannels: [String]?
var mutes: [UserMuteResponse]
var name: String?
var online: Bool
var privacySettings: PrivacySettingsResponse?
var revokeTokensIssuedBefore: Double?
var role: String
var shadowBanned: Bool
var teams: [String]
var teamsRole: [String: Any]?
var totalUnreadCount: Int
var unreadChannels: Int
var unreadCount: Int
var unreadThreads: Int
var updatedAt: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | Bool | Yes | |
| blocked_user_ids | [String] | Yes | |
| channel_mutes | [ChannelMute] | Yes | |
| created_at | Double | Yes | |
| custom | [String: Any] | 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 | Double | Yes | |
| avg_response_time | Int | No | |
| ban_expires | Double | No | |
| deactivated_at | Double | No | |
| deleted_at | Double | No | |
| image | String | No | |
| last_active | Double | No | |
| latest_hidden_channels | [String] | No | |
| name | String | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| revoke_tokens_issued_before | Double | No | |
| teams_role | [String: Any] | No |
GetApplicationResponse
Basic response information
struct GetApplicationResponse {
var app: AppResponseFields
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| app | AppResponseFields | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
GetBlockedUsersResponse
struct GetBlockedUsersResponse {
var blocks: [BlockedUserResponse]
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocks | [BlockedUserResponse] | Yes | Array of blocked user object |
| duration | String | Yes | Duration of the request in milliseconds |
GetOGResponse
struct GetOGResponse {
var actions: [Action]?
var assetURL: String?
var authorIcon: String?
var authorLink: String?
var authorName: String?
var color: String?
var custom: [String: Any]
var duration: String
var fallback: String?
var fields: [Field]?
var footer: String?
var footerIcon: String?
var giphy: Images?
var imageURL: String?
var ogScrapeURL: String?
var originalHeight: Int?
var originalWidth: Int?
var pretext: String?
var text: String?
var thumbURL: String?
var title: String?
var titleLink: String?
var type: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | [String: Any] | 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 |
GetUserGroupResponse
Response for getting a user group
struct GetUserGroupResponse {
var duration: String
var userGroup: UserGroupResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| user_group | UserGroupResponse | No | The user group |
ImageSize
struct ImageSize {
var crop: String?
var height: Int?
var resize: String?
var width: Int?
}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
struct ImageUploadResponse {
var duration: String
var file: String?
var thumbURL: String?
var uploadSizes: [ImageSize]?
}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
struct Images {
var fixedHeight: ImageData
var fixedHeightDownsampled: ImageData
var fixedHeightStill: ImageData
var fixedWidth: ImageData
var fixedWidthDownsampled: ImageData
var fixedWidthStill: ImageData
var original: ImageData
}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 |
ListBlockListResponse
Basic response information
struct ListBlockListResponse {
var blocklists: [BlockListResponse]
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| blocklists | [BlockListResponse] | Yes | |
| duration | String | Yes | Duration of the request in milliseconds |
ListDevicesResponse
List devices response
struct ListDevicesResponse {
var devices: [DeviceResponse]
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| devices | [DeviceResponse] | Yes | List of devices |
| duration | String | Yes |
ListUserGroupsResponse
Response for listing user groups
struct ListUserGroupsResponse {
var duration: String
var userGroups: [UserGroupResponse]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| user_groups | [UserGroupResponse] | Yes | List of user groups |
MessageResponse
Represents any chat message
struct MessageResponse {
var attachments: [Attachment]
var cid: String
var command: String?
var createdAt: Double
var custom: [String: Any]
var deletedAt: Double?
var deletedForMe: Bool?
var deletedReplyCount: Int
var draft: DraftResponse?
var html: String
var i18n: [String: Any]?
var id: String
var imageLabels: [String: Any]?
var latestReactions: [ReactionResponse]
var member: ChannelMemberResponse?
var mentionedChannel: Bool
var mentionedGroupIds: [String]?
var mentionedHere: Bool
var mentionedRoles: [String]?
var mentionedUsers: [UserResponse]
var messageTextUpdatedAt: Double?
var mml: String?
var moderation: ModerationV2Response?
var ownReactions: [ReactionResponse]
var parentID: String?
var pinExpires: Double?
var pinned: Bool
var pinnedAt: Double?
var pinnedBy: UserResponse?
var poll: PollResponseData?
var pollID: String?
var quotedMessage: MessageResponse?
var quotedMessageID: String?
var reactionCounts: [String: Any]
var reactionGroups: [String: Any]?
var reactionScores: [String: Any]
var reminder: ReminderResponseData?
var replyCount: Int
var restrictedVisibility: [String]
var shadowed: Bool
var sharedLocation: SharedLocationResponseData?
var showInChannel: Bool?
var silent: Bool
var text: String
var threadParticipants: [UserResponse]?
var type: String
var updatedAt: Double
var user: UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | [Attachment] | Yes | Array of message attachments |
| cid | String | Yes | Channel unique identifier in <type>:<id> format |
| created_at | Double | Yes | Date/time of creation |
| custom | [String: Any] | 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 | [String: Any] | Yes | An object containing number of reactions of each type. Key: reaction type (st... |
| reaction_scores | [String: Any] | 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 | Double | 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 | Double | No | Date/time of deletion |
| deleted_for_me | Bool | No | |
| draft | DraftResponse | No | |
| i18n | [String: Any] | No | Object with translations. Key language contains the original language key. ... |
| image_labels | [String: Any] | 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 | Double | 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 | Double | No | Date when pinned message expires |
| pinned_at | Double | 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 | [String: Any] | 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 |
OnlyUserID
struct OnlyUserID {
var id: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes |
PagerRequest
struct PagerRequest {
var limit: Int?
var next: String?
var prev: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | Int | No | |
| next | String | No | |
| prev | String | No |
PollOptionInput
struct PollOptionInput {
var custom: [String: Any]?
var text: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | [String: Any] | No | |
| text | String | No |
PollOptionRequest
struct PollOptionRequest {
var custom: [String: Any]?
var id: String
var text: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | |
| custom | [String: Any] | No | |
| text | String | No |
PollOptionResponse
struct PollOptionResponse {
var duration: String
var pollOption: PollOptionResponseData
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| poll_option | PollOptionResponseData | Yes | Poll option |
PollOptionResponseData
struct PollOptionResponseData {
var custom: [String: Any]
var id: String
var text: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | [String: Any] | Yes | |
| id | String | Yes | |
| text | String | Yes |
PollResponse
struct PollResponse {
var duration: String
var poll: PollResponseData
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| poll | PollResponseData | Yes | Poll |
PollResponseData
struct PollResponseData {
var allowAnswers: Bool
var allowUserSuggestedOptions: Bool
var answersCount: Int
var createdAt: Double
var createdBy: UserResponse?
var createdByID: String
var custom: [String: Any]
var description: String
var enforceUniqueVote: Bool
var id: String
var isClosed: Bool?
var latestAnswers: [PollVoteResponseData]
var latestVotesByOption: [String: Any]
var maxVotesAllowed: Int?
var name: String
var options: [PollOptionResponseData]
var ownVotes: [PollVoteResponseData]
var updatedAt: Double
var voteCount: Int
var voteCountsByOption: [String: Any]
var votingVisibility: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | Bool | Yes | |
| allow_user_suggested_options | Bool | Yes | |
| answers_count | Int | Yes | |
| created_at | Double | Yes | |
| created_by_id | String | Yes | |
| custom | [String: Any] | Yes | |
| description | String | Yes | |
| enforce_unique_vote | Bool | Yes | |
| id | String | Yes | |
| latest_answers | [PollVoteResponseData] | Yes | |
| latest_votes_by_option | [String: Any] | Yes | |
| name | String | Yes | |
| options | [PollOptionResponseData] | Yes | |
| own_votes | [PollVoteResponseData] | Yes | |
| updated_at | Double | Yes | |
| vote_count | Int | Yes | |
| vote_counts_by_option | [String: Any] | Yes | |
| voting_visibility | String | Yes | |
| created_by | UserResponse | No | |
| is_closed | Bool | No | |
| max_votes_allowed | Int | No |
PollVoteResponseData
struct PollVoteResponseData {
var answerText: String?
var createdAt: Double
var id: String
var isAnswer: Bool?
var optionID: String
var pollID: String
var updatedAt: Double
var user: UserResponse?
var userID: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| id | String | Yes | |
| option_id | String | Yes | |
| poll_id | String | Yes | |
| updated_at | Double | Yes | |
| answer_text | String | No | |
| is_answer | Bool | No | |
| user | UserResponse | No | |
| user_id | String | No |
PollVotesResponse
struct PollVotesResponse {
var duration: String
var next: String?
var prev: String?
var votes: [PollVoteResponseData]
}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
struct PrivacySettingsResponse {
var deliveryReceipts: DeliveryReceiptsResponse?
var readReceipts: ReadReceiptsResponse?
var typingIndicators: TypingIndicatorsResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
PushPreferenceInput
struct PushPreferenceInput {
var callLevel: String /* all | none | default */?
var channelCid: String?
var chatLevel: String /* all | mentions | direct_mentions | all_mentions | none | default */?
var chatPreferences: ChatPreferencesInput?
var disabledUntil: Double?
var feedsLevel: String /* all | none | default */?
var feedsPreferences: FeedsPreferences?
var removeDisable: Bool?
var userID: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| call_level | String /* all | none | default */ |
| channel_cid | String | No | Set the push preferences for a specific channel. If empty it sets the default... |
| chat_level | String /* all | mentions | direct_mentions |
| chat_preferences | ChatPreferencesInput | No | |
| disabled_until | Double | No | Disable push notifications till a certain time |
| feeds_level | String /* all | none | default */ |
| 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... |
QueryPollsResponse
struct QueryPollsResponse {
var duration: String
var next: String?
var polls: [PollResponseData]
var prev: String?
}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
struct QueryUsersResponse {
var duration: String
var users: [FullUserResponse]
}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. |
RemoveUserGroupMembersResponse
Response for removing members from a user group
struct RemoveUserGroupMembersResponse {
var duration: String
var userGroup: UserGroupResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
Response
Basic response information
struct Response {
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
SearchUserGroupsResponse
Response for searching user groups
struct SearchUserGroupsResponse {
var duration: String
var userGroups: [UserGroupResponse]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| user_groups | [UserGroupResponse] | Yes | List of matching user groups |
SharedLocationResponse
struct SharedLocationResponse {
var channel: ChannelResponse?
var channelCid: String
var createdAt: Double
var createdByDeviceID: String
var duration: String
var endAt: Double?
var latitude: Double
var longitude: Double
var message: MessageResponse?
var messageID: String
var updatedAt: Double
var userID: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | String | Yes | Channel CID |
| created_at | Double | Yes | Date/time of creation |
| created_by_device_id | String | Yes | Device ID that created the live location |
| duration | String | Yes | |
| latitude | Double | Yes | Latitude coordinate |
| longitude | Double | Yes | Longitude coordinate |
| message_id | String | Yes | Message ID |
| updated_at | Double | Yes | Date/time of the last update |
| user_id | String | Yes | User ID |
| channel | ChannelResponse | No | |
| end_at | Double | No | Time when the live location expires |
| message | MessageResponse | No |
SharedLocationResponseData
struct SharedLocationResponseData {
var channel: ChannelResponse?
var channelCid: String
var createdAt: Double
var createdByDeviceID: String
var endAt: Double?
var latitude: Double
var longitude: Double
var message: MessageResponse?
var messageID: String
var updatedAt: Double
var userID: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| channel_cid | String | Yes | |
| created_at | Double | Yes | |
| created_by_device_id | String | Yes | |
| latitude | Double | Yes | |
| longitude | Double | Yes | |
| message_id | String | Yes | |
| updated_at | Double | Yes | |
| user_id | String | Yes | |
| channel | ChannelResponse | No | |
| end_at | Double | No | |
| message | MessageResponse | No |
SharedLocationsResponse
struct SharedLocationsResponse {
var activeLiveLocations: [SharedLocationResponseData]
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| active_live_locations | [SharedLocationResponseData] | Yes | |
| duration | String | Yes |
SortParam
struct SortParam {
var direction: Int
var field: String
var type: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | Int | Yes | |
| field | String | Yes | |
| type | String | Yes |
SortParamRequest
struct SortParamRequest {
var direction: Int?
var field: String?
var type: String?
}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
struct Time {
}UnblockUsersResponse
struct UnblockUsersResponse {
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
UpdateBlockListResponse
Basic response information
struct UpdateBlockListResponse {
var blocklist: BlockListResponse?
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| blocklist | BlockListResponse | No |
UpdateUserGroupResponse
Response for updating a user group
struct UpdateUserGroupResponse {
var duration: String
var userGroup: UserGroupResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| user_group | UserGroupResponse | No | The updated user group |
UpdateUserPartialRequest
struct UpdateUserPartialRequest {
var id: String
var set: [String: Any]?
var unset: [String]?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | User ID to update |
| set | [String: Any] | No | |
| unset | [String] | No |
UpdateUsersResponse
struct UpdateUsersResponse {
var duration: String
var membershipDeletionTaskID: String
var users: [String: Any]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| membership_deletion_task_id | String | Yes | |
| users | [String: Any] | Yes | Object containing users |
UpsertPushPreferencesResponse
struct UpsertPushPreferencesResponse {
var duration: String
var userChannelPreferences: [String: Any]
var userPreferences: [String: Any]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
| user_channel_preferences | [String: Any] | Yes | The channel specific push notification preferences, only returned for channel... |
| user_preferences | [String: Any] | Yes | The user preferences, always returned regardless if you edited it |
User
struct User {
var data: [String: Any]?
var id: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | |
| data | [String: Any] | No |
UserGroupResponse
struct UserGroupResponse {
var createdAt: Double
var createdBy: String?
var description: String?
var id: String
var members: [UserGroupMember]?
var name: String
var teamID: String?
var updatedAt: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| id | String | Yes | |
| name | String | Yes | |
| updated_at | Double | Yes | |
| created_by | String | No | |
| description | String | No | |
| members | [UserGroupMember] | No | |
| team_id | String | No |
UserRequest
User request object
struct UserRequest {
var custom: [String: Any]?
var id: String
var image: String?
var invisible: Bool?
var language: String?
var name: String?
var privacySettings: PrivacySettingsResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | User ID |
| custom | [String: Any] | 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 |
UserResponse
User response object
struct UserResponse {
var avgResponseTime: Int?
var banned: Bool
var blockedUserIds: [String]
var createdAt: Double
var custom: [String: Any]
var deactivatedAt: Double?
var deletedAt: Double?
var id: String
var image: String?
var language: String
var lastActive: Double?
var name: String?
var online: Bool
var revokeTokensIssuedBefore: Double?
var role: String
var teams: [String]
var teamsRole: [String: Any]?
var updatedAt: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | Bool | Yes | Whether a user is banned or not |
| blocked_user_ids | [String] | Yes | |
| created_at | Double | Yes | Date/time of creation |
| custom | [String: Any] | Yes | Custom data for this object |
| id | String | Yes | Unique user identifier |
| 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 |
| teams | [String] | Yes | List of teams user is a part of |
| updated_at | Double | Yes | Date/time of the last update |
| avg_response_time | Int | No | |
| deactivated_at | Double | No | Date of deactivation |
| deleted_at | Double | No | Date/time of deletion |
| image | String | No | |
| last_active | Double | No | Date of last activity |
| name | String | No | Optional name of user |
| revoke_tokens_issued_before | Double | No | Revocation date for tokens |
| teams_role | [String: Any] | No |